zhangqi 3 months ago
parent
commit
a886fe9b7e

+ 5 - 0
src/HDrpManagement/projectChange/modules/detail.vue

@@ -16,6 +16,7 @@
     @pageChange="pageChange"
     @onEditSuccess="queryMainData($route.query.id)"
     @logSuccess="queryMainData"
+    @followAdd="followAdd"
     @sysTag="sysTag">
     <!-- 使用此插槽可不传[tags] -->
 <!--    <tagPanl slot="tags" :data="tagObj" ownertable="sa_project" :id="mainData.sa_projectid" @onSuccess="queryMainData"/>-->
@@ -734,6 +735,10 @@ export default {
     },
     dialogClose(){
       this.$refs.details.$refs.tag.queryTag()
+    },
+    followAdd(){
+      this.queryMainData()
+      this.projectStage()
     }
   },
   mounted () {

+ 5 - 1
src/components/normal-basic-layout/details/index.vue

@@ -102,7 +102,8 @@
           <group v-if="activeApp.isdatateam" :isGroup="isGroup" :status="status" :disabled="disabled" ref="group" style="margin-bottom:10px"  :justsaler="justsaler" :ownertable="ownertable?ownertable:idname.slice(0, this.idname.length - 2)" @onSuccess="onSuccess" @teamList="teamList">
             <el-button slot="collapse" type="text" icon="el-icon-s-unfold" class="inline-16" @click="onCollapse"></el-button>
           </group>
-          <follow-up v-if="activeApp.isdatafollowup" :status="status" ref="follow" :disabled="disabled" :ownertable="ownertable?ownertable:idname.slice(0, this.idname.length - 2)" :editData="editData" :idname="idname" @logSuccess="logSuccess" @onMore="onMore" :bindData="{ ownertable: ownertable, ownerid: editData[idname], usetype: 'default' }">
+          <follow-up v-if="activeApp.isdatafollowup" :status="status" ref="follow" :disabled="disabled" :ownertable="ownertable?ownertable:idname.slice(0, this.idname.length - 2)" :editData="editData" :idname="idname" @logSuccess="logSuccess" @onMore="onMore"
+                     @followAdd="followAdd" :bindData="{ ownertable: ownertable, ownerid: editData[idname], usetype: 'default' }">
             <el-button slot="collapse" type="text" icon="el-icon-s-unfold" class="inline-16" @click="onCollapse"></el-button>
           </follow-up>
         </el-col>
@@ -544,6 +545,9 @@ export default {
       if (val == '查看更多'){
         this.$refs.tabRef.activeName = 'follow'
       }
+    },
+    followAdd(){
+      this.$emit('followAdd')
     }
   },
   mounted () {

+ 11 - 1
src/components/normal-basic-layout/details/modules/followTable/index.vue

@@ -15,7 +15,7 @@
       <el-table-column
           prop="createby"
           :label="$t('跟进人')"
-          min-width="60">
+          min-width="90">
         <template slot-scope="scope">
           <div>
             {{scope.row.createby}}
@@ -65,6 +65,16 @@
           <div v-else>{{scope.row.content}}</div>
         </template>
       </el-table-column>
+      <el-table-column
+          v-if="$route.path === '/projectChangeDetail'"
+          prop="squarestage"
+          :label="$t(`项目阶段`)"
+          min-width="500"
+      >
+        <template slot-scope="scope">
+          <div>{{scope.row.squarestage?scope.row.squarestage:''}}</div>
+        </template>
+      </el-table-column>
       <el-table-column
           prop="attcount"
           :label="$t(`附件数`)"

+ 74 - 7
src/components/normal-basic-layout/details/modules/followUp/addLog.vue

@@ -41,6 +41,16 @@
           <el-form-item :label="$t(`下次跟进计划`)" prop="nextplan" :rules="{ required: false, message: $t('请填写下次跟进计划'), trigger: 'blur'}" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
             <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 18 }" v-model="form.nextplan" :placeholder="$t(`请输入下次跟进计划`)" autocomplete="off"></el-input>
           </el-form-item>
+          <el-form-item :label="$t(`变更项目阶段`)" prop="squarestage" :rules="{ required: true, message: $t('请选择项目阶段'), trigger: 'change'}" v-if="$route.path === '/projectChangeDetail'">
+            <el-select v-model="form.squarestage" :placeholder="$t(`请选择项目阶段`)" @focus="squarestageFocus" style="width: 100%">
+              <el-option
+                  v-for="item in squarestageList"
+                  :key="item.stagename"
+                  :label="$t(item.stagename)"
+                  :value="item.stagename">
+              </el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item>
             <upload
               ref="upload"
@@ -71,7 +81,7 @@ import upload from '@/components/upload/preview_upload.vue'
 import previewImage from '@/components/previewImage/index.vue'
 import contactsList from '@/template/projectChange/contactsList.vue'
 export default {
-  props:['ownertable','status','disabled','bindDataFile'],
+  props:['ownertable','status','disabled','bindDataFile','editData'],
   components:{
     upload,
     previewImage,
@@ -90,6 +100,8 @@ export default {
         target:'',//目的
         results:'',//结果
         nextplan:'',//下次跟进计划
+        squarestage:'',
+        sa_project_stageid:''
       },
       selectTag:[],
       bindData:{},
@@ -108,7 +120,8 @@ export default {
             condition:''
           }
         }
-      }
+      },
+      squarestageList:[]
     }
   },
 
@@ -121,6 +134,7 @@ export default {
       console.log(this.$route,'route')
       this.path = this.$route.path
       console.log(this.path)
+      this.form.squarestage = this.editData.stagename
       this.queryFollowUpType()
     },
     /*获取跟进类型*/
@@ -129,12 +143,22 @@ export default {
       this.followUpType = res.data
     },
     submitLog () {
+      console.log(this.form.squarestage,'阶段')
+      if (this.squarestageList.length == 0){
+        this.stageData()
+      }else {
+        this.squarestageList.forEach(item=>{
+          if (item.stagename === this.form.squarestage){
+            this.form.sa_project_stageid = item.sa_project_stageid
+          }
+        })
+      }
       this.$refs.form.validate(async (valid)=>{
         if (!valid) return false
         let resource = this.$route.matched[1].meta.title
-        const res = await this.$api.requested({
-          "id": 20220930121601,
-          "content": {
+        let content = {}
+        if (this.$route.path === '/projectChangeDetail'){
+          content = {
             "sys_datafollowupid":0,
             "ownertable":this.ownertable,
             "ownerid":this.$route.query.id,
@@ -146,8 +170,29 @@ export default {
             "dataextend": {
               "contactsid": this.form.dataextend.contactsid // 跟进对象
             },
-            "resource":resource
+            "resource":resource,
+            "squarestage":this.form.squarestage,
+            "sa_project_stageid":this.form.sa_project_stageid
           }
+        }else {
+          content = {
+            "sys_datafollowupid":0,
+            "ownertable":this.ownertable,
+            "ownerid":this.$route.query.id,
+            "type":this.form.type,
+            "content":this.form.content,
+            "target":this.form.target,//目的
+            "results":this.form.results,//结果
+            "nextplan":this.form.nextplan,//下次跟进计划
+            "dataextend": {
+              "contactsid": this.form.dataextend.contactsid // 跟进对象
+            },
+            "resource":resource,
+          }
+        }
+        const res = await this.$api.requested({
+          "id": 20220930121601,
+          "content": content
         })
         this.tool.showMessage(res,()=>{
           this.bindData = {
@@ -160,6 +205,7 @@ export default {
 
           this.$refs['upload'].toUpload()
           this.$emit('onSuccess')
+          this.squarestageList = []
           this.selectTag = []
           this.form.dataextend.contactsid = []
         })
@@ -188,8 +234,29 @@ export default {
       this.dialogFormVisible = false
       this.selectTag = []
       this.form.dataextend.contactsid = []
+      this.squarestageList = []
       this.$refs.form.resetFields()
-    }
+    },
+    async squarestageFocus(){
+      if (this.squarestageList.length == 0){
+        this.stageData()
+      }
+    },
+    /*获取阶段*/
+    async stageData(){
+      const res = await this.$api.requested({
+        "id": 20221024102402,
+        "content": {
+          "sa_projectid":this.$route.query.id
+        }
+      })
+      this.squarestageList = res.data
+      this.squarestageList.forEach(item=>{
+        if (item.stagename === this.form.squarestage){
+          this.form.sa_project_stageid = item.sa_project_stageid
+        }
+      })
+    },
   }
 }
 

+ 72 - 8
src/components/normal-basic-layout/details/modules/followUp/editLog.vue

@@ -44,6 +44,16 @@
           <el-form-item :label="$t(`下次跟进计划`)" prop="nextplan" :rules="{ required: false, message: $t('请填写下次跟进计划'), trigger: 'blur'}" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
             <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 18 }" v-model="form.nextplan" :placeholder="$t(`请输入下次跟进计划`)" autocomplete="off"></el-input>
           </el-form-item>
+          <el-form-item :label="$t(`变更项目阶段`)" prop="squarestage" :rules="{ required: true, message: $t('请选择项目阶段'), trigger: 'change'}" v-if="$route.path === '/projectChangeDetail'">
+            <el-select v-model="form.squarestage" :placeholder="$t(`请选择项目阶段`)" @focus="squarestageFocus" style="width: 100%" disabled>
+              <el-option
+                  v-for="item in squarestageList"
+                  :key="item.stagename"
+                  :label="$t(item.stagename)"
+                  :value="item.stagename">
+              </el-option>
+            </el-select>
+          </el-form-item>
           <div class="flex-align-center flex-between pionter" v-for="file in data.attinfos" :key="file.index">
             <div class="flex-align-center">
               <img width="30" :src="checkFileType(file.postfix) === 'file'?require('@/assets/file_icons/file.svg'):file.url" class="inline-16" alt="">
@@ -79,7 +89,7 @@ import upload from '@/components/upload/hw_obs_upload.vue'
 import previewImage from '@/components/previewImage/index.vue'
 import contactsList from '@/template/projectChange/contactsList.vue'
 export default {
-  props:['data','ownertable','status','disabled','isOperation','bindDataFile'],
+  props:['data','ownertable','status','disabled','isOperation','bindDataFile','editData'],
   components:{
     upload,
     previewImage,
@@ -96,12 +106,14 @@ export default {
         dataextendContactsid:[],
         dataextend: {
           contactsid: [] // 跟进对象
-        }//扩展参数
+        },//扩展参数
+        squarestage:''
       },
       followUpType:[],
       selectTag:[],
       folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
-      attachmentids:[]
+      attachmentids:[],
+      squarestageList:[]
     }
   },
 
@@ -127,12 +139,38 @@ export default {
 
     // 更新接口
      submitLog () {
+       if (this.squarestageList.length == 0){
+         this.stageData()
+       }else {
+         this.squarestageList.forEach(item=>{
+           if (item.stagename === this.form.squarestage){
+             this.form.sa_project_stageid = item.sa_project_stageid
+           }
+         })
+       }
       this.$refs.form.validate(async(valid)=>{
         if (!valid) return false
         let resource = this.$route.matched[1].meta.title
-        const res = await this.$api.requested({
-          "id": 20220930121601,
-          "content": {
+        let content = {}
+        if (this.$route.path === '/projectChangeDetail'){
+          content = {
+            "sys_datafollowupid":this.data.sys_datafollowupid,
+            "ownertable":this.ownertable,
+            "ownerid":this.$route.query.id,
+            "type":this.form.type,
+            "content":this.form.content,
+            "target":this.form.target,//目的
+            "results":this.form.results,//结果
+            "nextplan":this.form.nextplan,//下次跟进计划
+            "dataextend": {
+              "contactsid": this.form.dataextend.contactsid // 跟进对象
+            },
+            "resource":resource,
+            "squarestage":this.form.squarestage,
+            "sa_project_stageid":this.form.sa_project_stageid
+          }
+        }else {
+          content = {
             "sys_datafollowupid":this.data.sys_datafollowupid,
             "ownertable":this.ownertable,
             "ownerid":this.$route.query.id,
@@ -144,8 +182,12 @@ export default {
             "dataextend": {
               "contactsid": this.form.dataextend.contactsid // 跟进对象
             },
-            "resource":resource
+            "resource":resource,
           }
+        }
+        const res = await this.$api.requested({
+          "id": 20220930121601,
+          "content": content
         })
         this.tool.showMessage(res,()=>{
           this.form.content = ''
@@ -158,6 +200,7 @@ export default {
 
           }).then(rs=>{
             this.attachmentids = []
+            this.squarestageList = []
             this.dialogFormVisible = false
             this.$emit('onSuccess')
           })
@@ -212,8 +255,29 @@ export default {
       this.selectTag = []
       this.form.dataextend.contactsid = []
       this.form.dataextendContactsid = []
+      this.squarestageList = []
       this.$refs.form.resetFields()
-    }
+    },
+    async squarestageFocus(){
+      if (this.squarestageList.length == 0){
+        this.stageData()
+      }
+    },
+    /*获取阶段*/
+    async stageData(){
+      const res = await this.$api.requested({
+        "id": 20221024102402,
+        "content": {
+          "sa_projectid":this.$route.query.id
+        }
+      })
+      this.squarestageList = res.data
+      this.squarestageList.forEach(item=>{
+        if (item.stagename === this.form.squarestage){
+          this.form.sa_project_stageid = item.sa_project_stageid
+        }
+      })
+    },
   }
 }
 

+ 7 - 3
src/components/normal-basic-layout/details/modules/followUp/followUp.vue

@@ -8,7 +8,7 @@
       <div style="display: flex;justify-content: space-between">
 <!--        <fullScreen class="inline-16" domId="containerFull" @onFull="onFull" @backFull="backFull"></fullScreen>-->
         <el-button type="default" size="mini" @click="onMore('查看更多')" class="inline-16">{{$t(`查看更多`)}}</el-button>
-        <addLog :ownertable="ownertable" @onSuccess="queryLogs" :status="status" :disabled="disabled" :bindDataFile="bindData" ></addLog>
+        <addLog :ownertable="ownertable" @onSuccess="queryLogs" :status="status" :disabled="disabled" :bindDataFile="bindData" :editData="editData"></addLog>
       </div>
     </div>
     <div style="padding: 0 10px 0 10px">
@@ -78,6 +78,9 @@
           <div class="padding-style" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail' || $route.path === '/projectProjectDetail' || $route.path === '/customerCustomerDetail'">
             <span class="span-style">{{$t(`下次跟进计划`)}}:{{i.nextplan}}</span>
           </div>
+          <div class="padding-style" v-if="$route.path === '/projectChangeDetail'">
+            <span class="span-style">{{$t(`项目阶段`)}}:{{i.squarestage}}</span>
+          </div>
           <div class="padding-style" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail' || $route.path === '/projectProjectDetail' || $route.path === '/customerCustomerDetail'">
             <span class="span-style">{{$t(`营销费用`)}}:</span>
             <span v-if="i.salesfeesamount || i.salesfeesamount == 0">
@@ -186,7 +189,7 @@
             </div>
             <div>
               <marketingExpenses  v-if="($route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail') && !disabled"  class="inline-16" ownertable="sa_customers" :ownerid="i.sys_datafollowupid" :dataTime="i.createdate" :userid="i.createuserid" @onSuccess="onSuccess" :ownertable="ownertable"></marketingExpenses>
-              <editLog v-if="nowUserid === i.createuserid && !disabled" :status="status" ref="edits" :data="i" :ownertable="ownertable" @onSuccess="queryLogs" :bindDataFile="bindData"></editLog>
+              <editLog v-if="nowUserid === i.createuserid && !disabled" :status="status" ref="edits" :data="i" :ownertable="ownertable" @onSuccess="queryLogs" :bindDataFile="bindData" :editData="editData"></editLog>
               <el-popconfirm
                   :confirm-button-text="$t('确定')" :cancel-button-text="$t('取消')"
                   :title="$t(`确定删除该跟进动态吗?`)"
@@ -212,7 +215,7 @@ import addLog from './addLog.vue'
 import editLog from './editLog.vue'
 import marketingExpenses from '@/components/marketingExpenses/index'
 export default {
-  props:['ownertable','status','disabled','bindData'],
+  props:['ownertable','status','disabled','bindData','editData'],
   components:{
     addLog,
     editLog,
@@ -258,6 +261,7 @@ export default {
       })
       this.logList = res.data
       this.total = res.total
+      this.$emit('followAdd')
       setTimeout(()=>{
         this.onMore()
       },1000)

+ 3 - 3
src/optionSystem/calculationAndSelection/index.vue

@@ -1220,7 +1220,7 @@ export default {
           .tooltip('opening*value*type', (opening, value, type) => {
             return {
               name: type,
-              value: `${value} (开度: ${opening}%)`
+              value: `${value}`
             }
           })
         
@@ -1439,7 +1439,7 @@ export default {
           .tooltip('opening*value*type', (opening, value, type) => {
             return {
               name: type,
-              value: `${value} (开度: ${opening}%)`
+              value: `${value}`
             }
           })
         
@@ -1561,7 +1561,7 @@ export default {
           .tooltip('opening*value*type', (opening, value, type) => {
             return {
               name: type,
-              value: `${value} (开度: ${opening}%)`
+              value: `${value}`
             }
           })
         

+ 3 - 3
src/optionSystem/optionOrder/detail/indexCalc.vue

@@ -375,7 +375,7 @@ export default {
            .tooltip('opening*value*type', (opening, value, type) => {
              return {
                name: type,
-               value: `${value} (开度: ${opening}%)`
+               value: `${value}`
              }
            })
          
@@ -485,7 +485,7 @@ export default {
            .tooltip('opening*value*type', (opening, value, type) => {
              return {
                name: type,
-               value: `${value} (开度: ${opening}%)`
+               value: `${value}`
              }
            })
          
@@ -595,7 +595,7 @@ export default {
            .tooltip('opening*value*type', (opening, value, type) => {
              return {
                name: type,
-               value: `${value} (开度: ${opening}%)`
+               value: `${value}`
              }
            })
          

+ 68 - 16
src/optionSystem/optionOrder/detail/modules/components/DieFa.vue

@@ -523,20 +523,31 @@
             ></MySelect>
           </div>
         </div>
-        <div
-          class="tips"
-          v-if="guangtouParam.content.where.drivetype == '电动' && resultArr[0]"
-          style="color: #3874f6; margin-top: 10px"
-        >
-          <i class="el-icon-warning" style="margin-right: 5px"></i
-          >{{ $t("建议开关阀时间")
-          }}{{
-            caliber.filter((v) => v.value == resultArr[0].caliber).length
-              ? caliber
-                  .filter((v) => v.value == resultArr[0].caliber)[0]
-                  .remarks.split(";")[0]
-              : "-"
-          }}{{ $t("秒") }}
+
+        <div style="display: flex;justify-content: left;margin-top: 10px">
+          <div
+              class="tips"
+              v-if="
+            guangtouParam.content.where.drivetype == '电动' && resultArr.length
+          "
+              style="color: #3874f6;margin-top: 2px"
+          >
+            <i class="el-icon-warning" style="margin-right: 5px"></i
+            >{{ $t("建议开关阀时间")
+            }}{{
+              caliber.filter((v) => v.value == resultArr[0].caliber).length
+                  ? caliber
+                      .filter((v) => v.value == resultArr[0].caliber)[0]
+                      .remarks.split(";")[0]
+                  : "-"
+            }}{{ $t("秒") }}
+          </div>
+          <div style="margin-left: 20px;display: flex;justify-content: left">
+            <div class="label" style="margin-top:2px;">{{$t(`开关阀安全时间:`)}}</div>
+            <el-input style="width: 160px;margin-right: 10px" size="small" v-model="mintime" :placeholder="$t(`开关阀安全时间`)"></el-input> -
+            <el-input style="width: 160px;margin-left: 10px" size="small" v-model="maxtime" :placeholder="$t(`开关阀安全时间`)"></el-input>
+          </div>
+          <el-button type="primary" style="margin-left: 10px" size="small" @click="Search('excelParam')">{{$t(`查询`)}}</el-button>
         </div>
 
         <!--执行器-->
@@ -775,6 +786,8 @@ export default {
             actuatorsignal: "",
             maxsquarewidth: "", //方阀杆最大宽度
             maxrounddiameter: "", //圆阀杆最大直径
+            mintime:"",
+            maxtime:""
           },
         },
       },
@@ -794,6 +807,21 @@ export default {
       },
       timer: null,
       product: {},
+      /*开关阀时间*/
+      dateDefault:{
+        id: 20220901092501,
+        content: {
+          optiontypeid: 115, //光头id
+          pageNumber: 1,
+          pageSize: 9999999,
+          where: {
+            condition: "",
+          },
+        },
+      },
+      diameter:'',
+      mintime:"",
+      maxtime:""
     };
   },
   watch: {
@@ -814,8 +842,9 @@ export default {
     },
   },
   methods: {
-    stepsChange() {},
     init() {
+      this.active = 2
+      this.queryDefaultDate(this.data)
       this.guangtouChange(this.data.filter.mainvalve.drivetype);
 
       Object.keys(this.data.filter.mainvalve).forEach((v) => {
@@ -853,6 +882,7 @@ export default {
         });
         this.$refs.fujianRef.listData();
       }, 1000);
+
     },
     calcTableHieght(id) {
       this.$nextTick(() => {
@@ -877,6 +907,7 @@ export default {
     },
     //搜索
     Search(type, position, init) {
+
       if (!init) this.isEdit = true;
       let index = 0;
       let whereKeys = Object.keys(this[type].content.where);
@@ -899,7 +930,9 @@ export default {
             whereKeys[i].indexOf("drivetype") != -1
           )
             continue;
-          this[type].content.where[whereKeys[i]] = "";
+          this[type].content.where[whereKeys[i]] = ""
+          this.excelParam.content.where.mintime = this.mintime
+          this.excelParam.content.where.maxtime = this.maxtime
         }
       }
       switch (type) {
@@ -1105,6 +1138,7 @@ export default {
       this.isEdit = true;
       data.parttype = type;
       if (type == "主阀") {
+        this.queryDefaultDate(data)
         this.resultArr[0] = data;
 
         if (
@@ -1239,6 +1273,11 @@ export default {
       if (this.isEdit)
         return this.$message.warning("已操作过选型单,请按步骤进行!!");
       this.active = val + 1;
+      if (this.active == 1){
+        this.resultArr.splice(1)
+        this.fujianArr = []
+        this.isEdit = true
+      }
     },
     //选项
     optionsList() {
@@ -1250,6 +1289,19 @@ export default {
         { remarks: "气动", value: "气动" },
       ];
     },
+    async queryDefaultDate(val){
+      const res = await this.$api.requested(this.dateDefault)
+      res.data.forEach(e=>{
+        if (e.value == val.caliber){
+          this.diameter = e
+        }
+      })
+      let newDiameter = this.diameter.remarks.split(';')
+      let diameter = newDiameter[1].split('-')
+      this.mintime = diameter[0]
+      this.maxtime = diameter[1]
+
+    }
   },
   created() {
     this.optionsList();

+ 55 - 14
src/optionSystem/selectOption/components/DieFa.vue

@@ -335,22 +335,30 @@
             ></MySelect>
           </div>
         </div>
-        <div
-          class="tips"
-          v-if="
+        <div style="display: flex;justify-content: left;margin-top: 10px">
+          <div
+              class="tips"
+              v-if="
             guangtouParam.content.where.drivetype == '电动' && resultArr.length
           "
-          style="color: #3874f6; margin-top: 10px"
-        >
-          <i class="el-icon-warning" style="margin-right: 5px"></i
-          >{{ $t("建议开关阀时间")
-          }}{{
-            caliber.filter((v) => v.value == resultArr[0].caliber).length
-              ? caliber
-                  .filter((v) => v.value == resultArr[0].caliber)[0]
-                  .remarks.split(";")[0]
-              : "-"
-          }}{{ $t("秒") }}
+              style="color: #3874f6;margin-top: 2px"
+          >
+            <i class="el-icon-warning" style="margin-right: 5px"></i
+            >{{ $t("建议开关阀时间")
+            }}{{
+              caliber.filter((v) => v.value == resultArr[0].caliber).length
+                  ? caliber
+                      .filter((v) => v.value == resultArr[0].caliber)[0]
+                      .remarks.split(";")[0]
+                  : "-"
+            }}{{ $t("秒") }}
+          </div>
+          <div style="margin-left: 20px;display: flex;justify-content: left">
+            <div class="label" style="margin-top:2px;">{{$t(`开关阀安全时间:`)}}</div>
+            <el-input style="width: 160px;margin-right: 10px" size="small" v-model="mintime" :placeholder="$t(`开关阀安全时间`)"></el-input> -
+            <el-input style="width: 160px;margin-left: 10px" size="small" v-model="maxtime" :placeholder="$t(`开关阀安全时间`)"></el-input>
+          </div>
+          <el-button type="primary" style="margin-left: 10px" size="small" @click="Search('excelParam')">{{$t(`查询`)}}</el-button>
         </div>
         <!--执行器-->
         <div v-if="guangtouParam.content.where.drivetype == '电动'">
@@ -866,6 +874,8 @@ export default {
             actuatorsignal: "",
             maxsquarewidth: "", //方阀杆最大宽度
             maxrounddiameter: "", //圆阀杆最大直径
+            mintime:"",
+            maxtime:""
           },
         },
       },
@@ -885,6 +895,21 @@ export default {
       },
       timer: null,
       product: {},
+      /*开关阀时间*/
+      dateDefault:{
+        id: 20220901092501,
+        content: {
+          optiontypeid: 115, //光头id
+          pageNumber: 1,
+          pageSize: 9999999,
+          where: {
+            condition: "",
+          },
+        },
+      },
+      diameter:'',
+      mintime:"",
+      maxtime:""
     };
   },
   watch: {
@@ -998,6 +1023,8 @@ export default {
           )
             continue;
           this[type].content.where[whereKeys[i]] = "";
+          this.excelParam.content.where.mintime = this.mintime
+          this.excelParam.content.where.maxtime = this.maxtime
         }
       }
       switch (type) {
@@ -1212,6 +1239,7 @@ export default {
       data.parttype = type;
       this.resultArr.push(data);
       if (type == "主阀") {
+        this.queryDefaultDate(data)
         this.guangtouChange(this.guangtouParam.content.where.drivetype);
         this.excelParam.content.itemid = data.itemid;
         this.excelParam.content.where.torque = data.torque;
@@ -1399,6 +1427,19 @@ export default {
         console.log(this.func, "功能");
       });
     },
+    async queryDefaultDate(val){
+      const res = await this.$api.requested(this.dateDefault)
+      res.data.forEach(e=>{
+        if (e.value == val.caliber){
+          this.diameter = e
+        }
+      })
+      let newDiameter = this.diameter.remarks.split(';')
+      let diameter = newDiameter[1].split('-')
+      this.mintime = diameter[0]
+      this.maxtime = diameter[1]
+
+    }
   },
   created() {
     this.optionsList();

+ 56 - 14
src/optionSystem/selectOption/components/DieFaModel.vue

@@ -334,22 +334,30 @@
             ></MySelect>
           </div>
         </div>
-        <div
-          class="tips"
-          v-if="
+        <div style="display: flex;justify-content: left;margin-top: 10px">
+          <div
+              class="tips"
+              v-if="
             guangtouParam.content.where.drivetype == '电动' && resultArr.length
           "
-          style="color: #3874f6; margin-top: 10px"
-        >
-          <i class="el-icon-warning" style="margin-right: 5px"></i
-          >{{ $t("建议开关阀时间")
-          }}{{
-            caliber.filter((v) => v.value == resultArr[0].caliber).length
-              ? caliber
-                  .filter((v) => v.value == resultArr[0].caliber)[0]
-                  .remarks.split(";")[0]
-              : "-"
-          }}{{ $t("秒") }}
+              style="color: #3874f6;margin-top: 2px"
+          >
+            <i class="el-icon-warning" style="margin-right: 5px"></i
+            >{{ $t("建议开关阀时间")
+            }}{{
+              caliber.filter((v) => v.value == resultArr[0].caliber).length
+                  ? caliber
+                      .filter((v) => v.value == resultArr[0].caliber)[0]
+                      .remarks.split(";")[0]
+                  : "-"
+            }}{{ $t("秒") }}
+          </div>
+          <div style="margin-left: 20px;display: flex;justify-content: left">
+            <div class="label" style="margin-top:2px;">{{$t(`开关阀安全时间:`)}}</div>
+            <el-input style="width: 160px;margin-right: 10px" size="small" v-model="mintime" :placeholder="$t(`开关阀安全时间`)"></el-input> -
+            <el-input style="width: 160px;margin-left: 10px" size="small" v-model="maxtime" :placeholder="$t(`开关阀安全时间`)"></el-input>
+          </div>
+          <el-button type="primary" style="margin-left: 10px" size="small" @click="Search('excelParam')">{{$t(`查询`)}}</el-button>
         </div>
         <!--执行器-->
         <div v-if="guangtouParam.content.where.drivetype == '电动'">
@@ -856,6 +864,8 @@ export default {
             actuatorsignal: "",
             maxsquarewidth: "", //方阀杆最大宽度
             maxrounddiameter: "", //圆阀杆最大直径
+            mintime:"",
+            maxtime:""
           },
         },
       },
@@ -875,6 +885,21 @@ export default {
       },
       timer: null,
       product: {},
+      /*开关阀时间*/
+      dateDefault:{
+        id: 20220901092501,
+        content: {
+          optiontypeid: 115, //光头id
+          pageNumber: 1,
+          pageSize: 9999999,
+          where: {
+            condition: "",
+          },
+        },
+      },
+      diameter:'',
+      mintime:"",
+      maxtime:""
     };
   },
   watch: {
@@ -963,6 +988,7 @@ export default {
     },
     //搜索
     Search(type, position) {
+
       let index = 0;
       let whereKeys = Object.keys(this[type].content.where);
       if (position) {
@@ -985,6 +1011,8 @@ export default {
           )
             continue;
           this[type].content.where[whereKeys[i]] = "";
+          this.excelParam.content.where.mintime = this.mintime
+          this.excelParam.content.where.maxtime = this.maxtime
         }
       }
       switch (type) {
@@ -1194,6 +1222,7 @@ export default {
       data.parttype = type;
       this.resultArr.push(data);
       if (type == "主阀") {
+        this.queryDefaultDate(data)
         this.guangtouChange(this.guangtouParam.content.where.drivetype);
         this.excelParam.content.itemid = data.itemid;
         this.excelParam.content.where.torque = data.torque;
@@ -1381,6 +1410,19 @@ export default {
         console.log(this.func, "功能");
       });
     },
+    async queryDefaultDate(val){
+      const res = await this.$api.requested(this.dateDefault)
+      res.data.forEach(e=>{
+        if (e.value == val.caliber){
+          this.diameter = e
+        }
+      })
+      let newDiameter = this.diameter.remarks.split(';')
+      let diameter = newDiameter[1].split('-')
+      this.mintime = diameter[0]
+      this.maxtime = diameter[1]
+
+    }
   },
   created() {
     this.optionsList();

+ 57 - 15
src/optionSystem/valveOption/DieFa.vue

@@ -556,23 +556,32 @@
             ></MySelect>
           </div>
         </div>
-        <div
-          class="tips"
-          v-if="
+        <div style="display: flex;justify-content: left;margin-top: 10px">
+          <div
+              class="tips"
+              v-if="
             guangtouParam.content.where.drivetype == '电动' && resultArr.length
           "
-          style="color: #3874f6; margin-top: 10px"
-        >
-          <i class="el-icon-warning" style="margin-right: 5px"></i
-          >{{ $t("建议开关阀时间")
-          }}{{
-            caliber.filter((v) => v.value == resultArr[0].caliber).length
-              ? caliber
-                  .filter((v) => v.value == resultArr[0].caliber)[0]
-                  .remarks.split(";")[0]
-              : "-"
-          }}{{ $t("秒") }}
+              style="color: #3874f6;margin-top: 2px"
+          >
+            <i class="el-icon-warning" style="margin-right: 5px"></i
+            >{{ $t("建议开关阀时间")
+            }}{{
+              caliber.filter((v) => v.value == resultArr[0].caliber).length
+                  ? caliber
+                      .filter((v) => v.value == resultArr[0].caliber)[0]
+                      .remarks.split(";")[0]
+                  : "-"
+            }}{{ $t("秒") }}
+          </div>
+          <div style="margin-left: 20px;display: flex;justify-content: left">
+            <div class="label" style="margin-top:2px;">{{$t(`开关阀安全时间:`)}}</div>
+            <el-input style="width: 160px;margin-right: 10px" size="small" v-model="mintime" :placeholder="$t(`开关阀安全时间`)"></el-input> -
+            <el-input style="width: 160px;margin-left: 10px" size="small" v-model="maxtime" :placeholder="$t(`开关阀安全时间`)"></el-input>
+          </div>
+          <el-button type="primary" style="margin-left: 10px" size="small" @click="Search('excelParam')">{{$t(`查询`)}}</el-button>
         </div>
+
         <!--执行器-->
         <div v-if="guangtouParam.content.where.drivetype == '电动'">
           <MyTable
@@ -1138,6 +1147,8 @@ export default {
             actuatorsignal: "",
             maxsquarewidth: "", //方阀杆最大宽度
             maxrounddiameter: "", //圆阀杆最大直径
+            mintime:"",
+            maxtime:""
           },
         },
       },
@@ -1157,6 +1168,21 @@ export default {
       },
       timer: null,
       product: {},
+      /*开关阀时间*/
+      dateDefault:{
+        id: 20220901092501,
+        content: {
+          optiontypeid: 115, //光头id
+          pageNumber: 1,
+          pageSize: 9999999,
+          where: {
+            condition: "",
+          },
+        },
+      },
+      diameter:'',
+      mintime:"",
+      maxtime:""
     };
   },
   watch: {
@@ -1291,7 +1317,9 @@ export default {
             whereKeys[i].includes("drivetype")
           )
             continue;
-          this[type].content.where[whereKeys[i]] = "";
+          this[type].content.where[whereKeys[i]] = ""
+          this.excelParam.content.where.mintime = this.mintime
+          this.excelParam.content.where.maxtime = this.maxtime
         }
       }
       if (this.loading) return;
@@ -1419,6 +1447,7 @@ export default {
       data.parttype = type;
       this.resultArr.push(data);
       if (type == "主阀") {
+        this.queryDefaultDate(data)
         this.guangtouChange(this.guangtouParam.content.where.drivetype);
         Object.assign(this.excelParam.content.where, {
           itemid: data.itemid,
@@ -1579,6 +1608,19 @@ export default {
         console.log(this.supplyvoltage, "电源电压");
       });
     },
+    async queryDefaultDate(val){
+      const res = await this.$api.requested(this.dateDefault)
+      res.data.forEach(e=>{
+        if (e.value == val.caliber){
+          this.diameter = e
+        }
+      })
+      let newDiameter = this.diameter.remarks.split(';')
+      let diameter = newDiameter[1].split('-')
+      this.mintime = diameter[0]
+      this.maxtime = diameter[1]
+
+    }
   },
   created() {
     this.optionsList();