|
@@ -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);
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|