瀏覽代碼

计划排期,拆解工单搜索优化,大屏密码验证优化

wyh 2 年之前
父節點
當前提交
7e5054d7d5

+ 82 - 41
itdmWeb/src/views/module-iTDM/itdmGongdanMaster/itdmGongdanMasterList.vue

@@ -3,17 +3,37 @@
         <div class="table-page-search-wrapper">
             <a-form layout="inline" @keyup.enter.native="getHjlist">
                 <a-row :gutter="24">
-                <a-col :xl="6" :lg="7" :md="8" :sm="24">
-                    <a-form-item label="委托编号">
-                    <a-input placeholder="请输入委托编号" v-model="tasks.queryParam.weituoNo"></a-input>
-                    </a-form-item>
-                </a-col>
-                <a-col :xl="6" :lg="7" :md="8" :sm="24">
-                    <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-                    <a-button type="primary" @click="getHjlist" icon="search">查询</a-button>
-                    <!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">提交</a-button> -->
-                    </span>
-                </a-col>
+                  <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                      <a-form-item label="委托单位">
+                        <a-select
+                        v-model="tasks.queryParamNo.weituoClient"
+                        placeholder="请选择委托单位"
+                        show-search
+                        allowClear
+                        :options="weituoClientOptions"
+                        @change="getWeituoClientOptions">
+                        </a-select>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                      <a-form-item label="委托编号">
+                      <!-- <a-input placeholder="请输入委托编号" v-model="tasks.queryParam.weituoNo"></a-input> -->
+                        <a-select
+                        v-model="tasks.queryParam.weituoNo"
+                        placeholder="请选择委托编号"
+                        show-search
+                        allowClear
+                        :options="weituoNoOptions">
+                        </a-select>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                      <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                      <a-button type="primary" @click="getHjlist" icon="search">查询</a-button>
+                      <!-- <a-button type="primary" @click="searchReset" icon="reload">重置</a-button> -->
+                      <!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">提交</a-button> -->
+                      </span>
+                  </a-col>
                 </a-row>
             </a-form>
         </div>
@@ -24,7 +44,7 @@
 <script>
 import {gantt} from 'dhtmlx-gantt';
 import { notification } from 'ant-design-vue';
-import {getDeviceList, getXmjlList, getManagerList, getCgqList, saveProject, ajaxGetDictItems, saveProjectJl, delProjectJl} from '@/api/api'
+import {getWeituoClientList, getWeituoInfoListByClient, getDeviceList, getXmjlList, getManagerList, getCgqList, saveProject, ajaxGetDictItems, saveProjectJl, delProjectJl} from '@/api/api'
 import store from '@/store'
 export default {
   name: 'gantt',
@@ -42,13 +62,21 @@ export default {
           testTypeOptions: [],
         },
         queryParam:{
-          weituoNo: undefined
+          weituoNo: undefined,
+        },
+        queryParamNo:{
+          weituoClient: undefined
         },
       },
+      // 委托单位列表
+      weituoClientOptions : [],
+      // 委托编号列表
+      weituoNoOptions:[],
       eventIDs : [],
     }
   },
   created() {
+    this.getClientList();
     // 清空数据
     gantt.clearAll();
     // 获取当前登录用户的信息
@@ -413,6 +441,33 @@ export default {
   },
 
   methods: {
+    // 获取委托单位下拉列表
+    getClientList(){
+      getWeituoClientList().then((res) =>{
+        console.log(res)
+        this.weituoClientOptions = res.result.map( res => {
+          return{
+            value: res,
+            label: res
+          }
+        })
+      })
+    },
+    // 监听委托单位获取
+    getWeituoClientOptions(value){
+      console.log(value);
+      console.log(this.tasks.queryParamNo)
+      this.weituoNoOptions = []
+      this.tasks.queryParam.weituoNo = ''
+      getWeituoInfoListByClient(this.tasks.queryParamNo).then((res) =>{
+        this.weituoNoOptions = res.result.map( res => {
+          return{
+            value: res.weituoNo,  //传的值
+            label: res.weituoNo,  //展示
+          }
+        })
+      })
+    },
     // 获取设备下拉列表
     getDevicelist(){
       getDeviceList().then((res) => {
@@ -520,39 +575,25 @@ export default {
           // gantt.init(this.$refs.gantt);
           // // gantt.parse(this.$props.tasks);
           // gantt.parse(this.tasks);
-        } else {
-          notification.open({
-            message: '注意',
-            description: '该委托编号不存在',
-          });
         }
+        // else {
+        //   notification.open({
+        //     message: '注意',
+        //     description: '该委托编号不存在',
+        //   });
+        // }
         // gantt.init(this.$refs.gantt);
         // gantt.parse(this.tasks);
       })
     },
-    // // 提交
-    // searchReset() {
-    //   var json = gantt.serialize();
-    //   console.log(json)
-    //   var data = json.data.map( res => {
-    //     return{
-    //       weituoId: res.weituoId,
-    //         testItemsId: res.testItemsId,
-    //         yangpinId:res.yangpinId,
-    //         shebeiId:res.shebeiId,
-    //         pm: res.pm,
-    //         jihuaStartDate: res.start_date,
-    //         lastTime: res.duration,
-    //         // jihuaEndDate: res.jihuaEndDate,
-    //         reportNo: res.reportNo,
-    //         chuanganqiArray:res.chuanganqi,
-    //         testPlanId:res.testPlanId,
-    //         status:res.status,
-    //         testItems: res.testItems,
-    //     }
-    //   })
-    //   console.log(data.length)
-    // },
+    // 重置
+    searchReset(){
+      this.tasks.queryParamNo.weituoClient = '',
+      this.tasks.queryParam.weituoNo = '',
+      this.tasks.data = []
+      // gantt.init(this.$refs.gantt);
+      // gantt.parse(this.tasks);
+    }
 
   }
 }

+ 9 - 9
itdmWeb/src/views/module-iTDM/itdmScreen/itdmScreenIndex.vue

@@ -105,7 +105,7 @@
           :columns="columnsB"
           :dataSource="tableDataB"
           :pagination="false">
-          
+
             <span slot="action" slot-scope="text, record">
               <!-- <a @click="yuYingDele(record)">删除</a> -->
               <a-popconfirm title="确定删除吗?" @confirm="() => yuYingDele(record)">
@@ -208,12 +208,12 @@
       @ok="submitForm"
       @cancel="handleCancel"
       cancelText="关闭">
-      
+
       <a-form-model ref="form" :model="form" :rules="rules">
         <a-row>
           <a-col :span="24">
             <a-form-model-item label="密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mima">
-              <a-input v-model="form.mima" placeholder="请输入密码"  ></a-input>
+              <a-input-password v-model="form.mima" placeholder="请输入密码"  ></a-input-password>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -379,7 +379,7 @@ import {delBaojing, confirmPa} from '@/api/api'
           this.deviceOptions = this.allDevOptions
           return false
         }
-        for (var i = 0; i < deOption.length; i++) { 
+        for (var i = 0; i < deOption.length; i++) {
           console.log(deOption[i].deviceStatus)
           if(deOption[i].deviceStatus == num){
             this.deviceOptions.push(deOption[i])
@@ -588,7 +588,7 @@ import {delBaojing, confirmPa} from '@/api/api'
         // console.log(JSON.parse(msg.data).length)
         var wsData = JSON.parse(msg.data)
         console.log(wsData)
-        for (var i = 0; i < wsData.length; i++) { 
+        for (var i = 0; i < wsData.length; i++) {
           console.log(wsData[i].name)
           // 通用数据1
           if(wsData[i].name == '通用数据1'){
@@ -668,7 +668,7 @@ import {delBaojing, confirmPa} from '@/api/api'
             //   this.yuYin = this.boBaoWZ
             //    this.voiceBroadcast(this.yuYin)
             // }
-            
+
 
             this.voiceBroadcast(this.boBaoWZ)
           }
@@ -1105,7 +1105,7 @@ import {delBaojing, confirmPa} from '@/api/api'
     background-color:#103A5A;
     border: 0px;
   }
-  
+
   ::v-deep .ant-table-header .ant-table-hide-scrollbar{
     background-color: #0A5D89 !important;
     color: #c6f7ff;
@@ -1121,7 +1121,7 @@ import {delBaojing, confirmPa} from '@/api/api'
     color: #b1d9df;
   }
   // 表格鼠标悬停背景颜色
-  ::v-deep table tbody tr:hover>td { 
+  ::v-deep table tbody tr:hover>td {
       background-color:#546b94!important
   }
   // ::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td{
@@ -1283,7 +1283,7 @@ import {delBaojing, confirmPa} from '@/api/api'
   //   // background-color:#0A5D89;
   //   color: #c6f7ff;
   // }
-  
+
   // 输入框中字体设置
   ::v-deep .ant-form-item-label > label{
     color: #c6f7ff;

+ 60 - 4
itdmWeb/src/views/module-iTDM/itdmTestPlan/itdmTestPlanList1.vue

@@ -5,9 +5,28 @@
       <a-form layout="inline" @keyup.enter.native="getHjlist">
         <a-row :gutter="24">
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="委托编号">
-              <a-input placeholder="请输入委托编号" v-model="tasks.queryParam.weituoNo"></a-input>
-            </a-form-item>
+              <a-form-item label="委托单位">
+                <a-select
+                v-model="tasks.queryParamNo.weituoClient"
+                placeholder="请选择委托单位"
+                show-search
+                allowClear
+                :options="weituoClientOptions"
+                @change="getWeituoClientOptions">
+                </a-select>
+              </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="委托编号">
+              <!-- <a-input placeholder="请输入委托编号" v-model="tasks.queryParam.weituoNo"></a-input> -->
+                <a-select
+                v-model="tasks.queryParam.weituoNo"
+                placeholder="请选择委托编号"
+                show-search
+                allowClear
+                :options="weituoNoOptions">
+                </a-select>
+              </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
@@ -24,7 +43,7 @@
 
 <script>
 import Gantt from '../../../components/Gantt.vue';
-
+import {getWeituoClientList, getWeituoInfoListByClient } from '@/api/api'
 import { getAction } from '@api/manage'
 import { gantt } from 'dhtmlx-gantt'
 
@@ -44,11 +63,48 @@ export default {
         queryParam:{
           weituoNo: undefined
         },
+        queryParamNo:{
+          weituoClient: undefined
+        },
       },
+      // 委托单位列表
+      weituoClientOptions : [],
+      // 委托编号列表
+      weituoNoOptions:[],
     }
   },
+  created() {
+    this.getClientList();
+  },
 
   methods: {
+    // 获取委托单位下拉列表
+    getClientList(){
+      getWeituoClientList().then((res) =>{
+        console.log(res)
+        this.weituoClientOptions = res.result.map( res => {
+          return{
+            value: res,
+            label: res
+          }
+        })
+      })
+    },
+    // 监听委托单位获取
+    getWeituoClientOptions(value){
+      console.log(value);
+      console.log(this.tasks.queryParamNo)
+      this.weituoNoOptions = []
+      this.tasks.queryParam.weituoNo = ''
+      getWeituoInfoListByClient(this.tasks.queryParamNo).then((res) =>{
+        this.weituoNoOptions = res.result.map( res => {
+          return{
+            value: res.weituoNo,  //传的值
+            label: res.weituoNo,  //展示
+          }
+        })
+      })
+    },
     getHjlist(){
       let that = this
       var queryParam = that.tasks.queryParam