|
@@ -52,7 +52,7 @@
|
|
|
<el-button size="default" style="margin-left: 20px" type="primary" :disabled = "method === 'view'" @click="exportPlan()" plain>
|
|
|
导出
|
|
|
</el-button>
|
|
|
- <a v-if="inputForm.planStartDate !=='' && inputForm.planEndDate !== ''" style="margin-left: 1em;font-size: 14px">项目起始时间:{{inputForm.planStartDate}} - {{inputForm.planEndDate}}</a>
|
|
|
+ <a v-if="commonJS.isNotEmpty(inputForm.planStartDate) && commonJS.isNotEmpty(inputForm.planEndDate)" style="margin-left: 1em;font-size: 14px">项目起始时间:{{inputForm.planStartDate}} - {{inputForm.planEndDate}}</a>
|
|
|
</el-divider>
|
|
|
<el-row :gutter="15">
|
|
|
<el-col :span="24">
|
|
@@ -73,11 +73,15 @@
|
|
|
<vxe-table-column field="taskPhase" title="任务阶段" :edit-render="{}" show-overflow="title" :rules="[{required: true, message:'请输入任务阶段', trigger:'blur'}]">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-autocomplete
|
|
|
+ value-key="taskPhase"
|
|
|
class="inline-input"
|
|
|
v-model="scope.row.taskPhase"
|
|
|
:fetch-suggestions="querySearch"
|
|
|
+ :trigger-on-focus="false"
|
|
|
+ clearable
|
|
|
placeholder="请输入内容"
|
|
|
- @select="handleSelect"
|
|
|
+ :popper-append-to-body="false"
|
|
|
+ :popper-class="vxetableignoreclear"
|
|
|
></el-autocomplete>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
@@ -189,6 +193,8 @@
|
|
|
detailkey: '',
|
|
|
visible: false,
|
|
|
restaurants: [],
|
|
|
+ tableIndex:0,
|
|
|
+ vxetableignoreclear:'vxe-table--ignore-clear'
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -220,7 +226,7 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.restaurants = this.loadAll();
|
|
|
+ this.loadAll();
|
|
|
},
|
|
|
components: {
|
|
|
UpLoadComponent,
|
|
@@ -266,9 +272,15 @@
|
|
|
this.$refs.uploadComponent.clearUpload()
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
- this.inputForm.planStartDate = this.moment(data.planStartDate).format('YYYY-MM-DD')
|
|
|
- this.inputForm.planEndDate = this.moment(data.planEndDate).format('YYYY-MM-DD')
|
|
|
-
|
|
|
+ this.inputForm.planStartDate = data.projectStartTime
|
|
|
+ this.inputForm.planEndDate = data.projectEndTime
|
|
|
+ // if (this.commonJS.isEmpty(data.planStartDate)){
|
|
|
+ // this.inputForm.planStartDate = this.moment(data.planStartDate).format('YYYY-MM-DD')
|
|
|
+ // }
|
|
|
+ // if (this.commonJS.isEmpty(data.planEndDate)){
|
|
|
+ // this.inputForm.planEndDate = this.moment(data.planEndDate).format('YYYY-MM-DD')
|
|
|
+ // }
|
|
|
+ console.log('this.inputForm.planStartDate',this.inputForm.planStartDate)
|
|
|
if (this.commonJS.isEmpty(this.inputForm.planDetailsList)) {
|
|
|
this.inputForm.planDetailsList = []
|
|
|
let phase = this.$dictUtils.getDictList('cw_project_plan_phase')
|
|
@@ -297,7 +309,6 @@
|
|
|
this.inputForm.planDetailsList[li].planEndDate = this.inputForm.planEndDate
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
this.$refs.uploadComponent.newUpload(this.method, this.inputForm.planFileList, 'cw_project_plan', null, '项目计划附件信息', null, null, false)
|
|
|
|
|
|
this.loading = false
|
|
@@ -404,29 +415,30 @@
|
|
|
this.inputForm.planDetailsList.splice(rowIndex, 1)
|
|
|
},
|
|
|
querySearch(queryString, cb) {
|
|
|
- var restaurants = this.restaurants;
|
|
|
- var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
|
|
- // 调用 callback 返回建议列表的数据
|
|
|
- console.log('results', results)
|
|
|
- cb(results);
|
|
|
+ console.log('queryString',queryString)
|
|
|
+ const restaurants = this.restaurants
|
|
|
+ let results = queryString
|
|
|
+ ? restaurants.filter(
|
|
|
+ this.createFilter(queryString)
|
|
|
+ )
|
|
|
+ : restaurants
|
|
|
+ console.log('results',results)
|
|
|
+ cb(results.map(restaurant => ({ taskPhase: restaurant.value })))
|
|
|
},
|
|
|
createFilter(queryString) {
|
|
|
- return (restaurant) => {
|
|
|
- return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
|
|
|
+ return (taskPhase) => {
|
|
|
+ return taskPhase.value.toUpperCase().startsWith(queryString.toUpperCase());
|
|
|
};
|
|
|
},
|
|
|
loadAll() {
|
|
|
- let task = []
|
|
|
- projectRecordsService.getTaskPhase().then((data)=>{
|
|
|
- task=data
|
|
|
+ projectRecordsService.getTaskPhase().then((data)=>{
|
|
|
+ this.restaurants=data
|
|
|
})
|
|
|
- console.log('task',task)
|
|
|
- return projectRecordsService.getTaskPhase()
|
|
|
- },
|
|
|
- handleSelect(item) {
|
|
|
- console.log(item);
|
|
|
- console.log('index', index);
|
|
|
+
|
|
|
},
|
|
|
+ // handleSubmit(item) {
|
|
|
+ //
|
|
|
+ // },
|
|
|
// 自定义服务端导出
|
|
|
exportPlan() {
|
|
|
let optionName = this.inputForm.projectName+"项目计划.xls"
|