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