修改测试平台(进度导入报错)..
This commit is contained in:
parent
58ed28cbb1
commit
4286f4834b
Binary file not shown.
|
Before Width: | Height: | Size: 230 KiB After Width: | Height: | Size: 19 MiB |
@ -254,8 +254,8 @@ export default {
|
|||||||
gantt.form_blocks["datepicker"] = {
|
gantt.form_blocks["datepicker"] = {
|
||||||
render(sns) { //sns - the section's configuration object
|
render(sns) { //sns - the section's configuration object
|
||||||
return "<div class='gantt-lb-datepicker'>"+
|
return "<div class='gantt-lb-datepicker'>"+
|
||||||
"<input type='text' name='start' placeholder='请选择实际开始时间' style='height:20px;margin:0 0px 0 10px'>"+'-'+
|
"<input type='text' name='start' placeholder='请选择实际开始时间' style='height:20px;width:142px;margin:0 8px 0 158px'>"+'--'+
|
||||||
"<input type='text' name='end' placeholder='请选择实际结束时间' style='height:20px'>"+
|
"<input type='text' name='end' placeholder='请选择实际结束时间' style='height:20px;;width:140px;margin:0 0px 0 10px'>"+
|
||||||
"</div>";;
|
"</div>";;
|
||||||
},
|
},
|
||||||
set_value(node, value, task, section) {
|
set_value(node, value, task, section) {
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
:action="$http.defaults.baseURL + 'xmgl/progressTask/importData'"
|
:action="$http.defaults.baseURL + 'xmgl/progressTask/importData'"
|
||||||
:data="{ projectSn: projectSn, createUserId: createUserId }"
|
:data="{ projectSn: projectSn, createUserId: createUserId }"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
|
:headers="headers"
|
||||||
>
|
>
|
||||||
<el-button size="medium" type="primary">导入</el-button>
|
<el-button size="medium" type="primary">导入</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@ -58,16 +59,10 @@
|
|||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 预计完成日期 -->
|
<!-- 预计完成日期 -->
|
||||||
<el-table-column
|
<el-table-column prop="finishDate" label="计划完成日期">
|
||||||
prop="finishDate"
|
|
||||||
label="计划完成日期"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 实际开始日期 -->
|
<!-- 实际开始日期 -->
|
||||||
<el-table-column
|
<el-table-column prop="actualStartDate" label="实际开始日期">
|
||||||
prop="actualStartDate"
|
|
||||||
label="实际开始日期"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 实际完成日期 -->
|
<!-- 实际完成日期 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -165,10 +160,9 @@
|
|||||||
prop="startDate"
|
prop="startDate"
|
||||||
>
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@change="time1"
|
@change="time1"
|
||||||
v-model="workerInfo.startDate"
|
v-model="workerInfo.startDate"
|
||||||
:picker-options="dateAfter"
|
:picker-options="dateAfter"
|
||||||
|
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="计划开始日期"
|
placeholder="计划开始日期"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
@ -181,7 +175,7 @@
|
|||||||
prop="finishDate"
|
prop="finishDate"
|
||||||
>
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@change="time2"
|
@change="time2"
|
||||||
v-model="workerInfo.finishDate"
|
v-model="workerInfo.finishDate"
|
||||||
:picker-options="dateBefore"
|
:picker-options="dateBefore"
|
||||||
type="date"
|
type="date"
|
||||||
@ -215,8 +209,8 @@
|
|||||||
:label="$t('message.projectManage.principal')"
|
:label="$t('message.projectManage.principal')"
|
||||||
prop="dutyUserName"
|
prop="dutyUserName"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="workerInfo.dutyUserId"
|
v-model="workerInfo.dutyUserId"
|
||||||
:placeholder="$t('message.projectManage.pleaseChoose')"
|
:placeholder="$t('message.projectManage.pleaseChoose')"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@ -352,7 +346,7 @@ export default {
|
|||||||
status: "",
|
status: "",
|
||||||
taskTypeId: "",
|
taskTypeId: "",
|
||||||
progressRatio: "",
|
progressRatio: "",
|
||||||
dutyUserId:"",
|
dutyUserId: "",
|
||||||
fileUrl: "",
|
fileUrl: "",
|
||||||
duration: "",
|
duration: "",
|
||||||
remark: "",
|
remark: "",
|
||||||
@ -389,19 +383,23 @@ export default {
|
|||||||
},
|
},
|
||||||
dialogImageUrl: "",
|
dialogImageUrl: "",
|
||||||
showBigImg: false,
|
showBigImg: false,
|
||||||
times:'',
|
times: "",
|
||||||
// 时间限制
|
// 时间限制
|
||||||
pickerOptions:{ // 对象
|
pickerOptions: {
|
||||||
disabledDate: (time) => {
|
// 对象
|
||||||
let nowData = this.times
|
disabledDate: (time) => {
|
||||||
nowData = new Date(nowData.setDate(nowData.getDate() - 1))
|
let nowData = this.times;
|
||||||
return time > nowData
|
nowData = new Date(nowData.setDate(nowData.getDate() - 1));
|
||||||
// return time.getTime() < Date.now()- 1 * 24 * 3600 * 1000;
|
return time > nowData;
|
||||||
}
|
// return time.getTime() < Date.now()- 1 * 24 * 3600 * 1000;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
headers() {
|
||||||
|
return { Authorization: this.$store.state.userInfo.token };
|
||||||
|
},
|
||||||
dateAfter() {
|
dateAfter() {
|
||||||
// 动态起始时间
|
// 动态起始时间
|
||||||
const startTimestamp = Date.now() * 1 - 24 * 60 * 60 * 1000;
|
const startTimestamp = Date.now() * 1 - 24 * 60 * 60 * 1000;
|
||||||
@ -419,7 +417,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return timestamp <= startTimestamp;
|
return timestamp <= startTimestamp;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
dateBefore() {
|
dateBefore() {
|
||||||
@ -432,9 +430,9 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.projectSn = this.$store.state.projectSn;
|
this.projectSn = this.$store.state.projectSn;
|
||||||
@ -444,12 +442,12 @@ export default {
|
|||||||
this.getProgressListData();
|
this.getProgressListData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
time1(val){
|
time1(val) {
|
||||||
console.log('开始时间',val)
|
console.log("开始时间", val);
|
||||||
this.times = val
|
this.times = val;
|
||||||
},
|
},
|
||||||
time2(val){
|
time2(val) {
|
||||||
console.log('结束时间',val)
|
console.log("结束时间", val);
|
||||||
},
|
},
|
||||||
// 下载模板
|
// 下载模板
|
||||||
downloadFn() {
|
downloadFn() {
|
||||||
@ -489,7 +487,7 @@ export default {
|
|||||||
};
|
};
|
||||||
getProgressListDataApi(data).then((res) => {
|
getProgressListDataApi(data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// console.log("获取到的列表", res);
|
// console.log("获取到的列表", res);
|
||||||
this.listData = res.result;
|
this.listData = res.result;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -532,35 +530,41 @@ export default {
|
|||||||
// 编辑按钮
|
// 编辑按钮
|
||||||
editBefore(val) {
|
editBefore(val) {
|
||||||
this.workerInfo = JSON.parse(JSON.stringify(val));
|
this.workerInfo = JSON.parse(JSON.stringify(val));
|
||||||
console.log('当前点击的行',val)
|
console.log("当前点击的行", val);
|
||||||
this.fileList = val.fileUrl ? JSON.parse(val.fileUrl) : [];
|
this.fileList = val.fileUrl ? JSON.parse(val.fileUrl) : [];
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.getPrincipalLsit()
|
this.getPrincipalLsit();
|
||||||
},
|
},
|
||||||
//编辑
|
//编辑
|
||||||
submitBtn() {
|
submitBtn() {
|
||||||
this.$refs.addEditForm.validate((valid) => {
|
this.$refs.addEditForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.workerInfo.status == "1" && this.workerInfo.actualStartDate == null) {
|
if (
|
||||||
|
this.workerInfo.status == "1" &&
|
||||||
|
this.workerInfo.actualStartDate == null
|
||||||
|
) {
|
||||||
this.$message.error("请输入实际开始时间!");
|
this.$message.error("请输入实际开始时间!");
|
||||||
} else if (this.workerInfo.status == "2"&& this.workerInfo.actualFinishDate == null) {
|
} else if (
|
||||||
|
this.workerInfo.status == "2" &&
|
||||||
|
this.workerInfo.actualFinishDate == null
|
||||||
|
) {
|
||||||
// if (this.workerInfo.actualStartDate == null) {
|
// if (this.workerInfo.actualStartDate == null) {
|
||||||
// this.$message.error("请输入实际开始时间!");
|
// this.$message.error("请输入实际开始时间!");
|
||||||
// } else if (this.workerInfo.actualFinishDate == null) {
|
// } else if (this.workerInfo.actualFinishDate == null) {
|
||||||
this.$message.error("请输入实际完成时间!");
|
this.$message.error("请输入实际完成时间!");
|
||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
//赋值
|
//赋值
|
||||||
let data = this.workerInfo;
|
let data = this.workerInfo;
|
||||||
data.projectSn = this.projectSn;
|
data.projectSn = this.projectSn;
|
||||||
// console.log('编辑的参数',data)
|
// console.log('编辑的参数',data)
|
||||||
editProgressListDataApi(data).then((res)=>{
|
editProgressListDataApi(data).then((res) => {
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
this.$message.success("编辑成功!");
|
this.$message.success("编辑成功!");
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
this.getProgressListData()
|
this.getProgressListData();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@ -579,9 +583,9 @@ export default {
|
|||||||
display: inline-block !important;
|
display: inline-block !important;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
.table_wrap{
|
.table_wrap {
|
||||||
height: 800px;
|
height: 800px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user