修改测试平台(进度导入报错)..

This commit is contained in:
yjl 2023-02-07 17:34:55 +08:00
parent 58ed28cbb1
commit 4286f4834b
3 changed files with 53 additions and 49 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 KiB

After

Width:  |  Height:  |  Size: 19 MiB

View File

@ -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) {

View File

@ -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
@ -168,7 +163,6 @@
@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"
@ -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) => { disabledDate: (time) => {
let nowData = this.times let nowData = this.times;
nowData = new Date(nowData.setDate(nowData.getDate() - 1)) nowData = new Date(nowData.setDate(nowData.getDate() - 1));
return time > nowData return time > nowData;
// return time.getTime() < Date.now()- 1 * 24 * 3600 * 1000; // 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() {
@ -532,18 +530,24 @@ 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) {
@ -554,13 +558,13 @@ export default {
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,7 +583,7 @@ 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;
} }