|
@@ -33,7 +33,7 @@
|
|
|
总填报:
|
|
|
<span :style="parseFloat(item1.reportTime)>parseFloat(item1.calculateTime)+0.5?'color:red':''">{{item1.reportTime}}h</span>
|
|
|
</span>
|
|
|
- <el-link v-if="user.role != 0" type="primary" :underline="false" @click="junpToDeskTop">系统智能统计:{{item1.calculateTime}}h</el-link>
|
|
|
+ <el-link v-if="user.role != 0" type="primary" :underline="false" @click="junpToDeskTop(item1.id)">系统智能统计:{{item1.calculateTime}}h</el-link>
|
|
|
<span v-else>系统智能统计:{{item1.calculateTime}}h</span>
|
|
|
</span>
|
|
|
<div class="checkbtn">
|
|
@@ -74,11 +74,11 @@
|
|
|
<el-form-item label="投入项目" :prop="'domains.' + index + '.projectId'"
|
|
|
:rules="{ required: true, message: '请选择投入项目', trigger: ['change','blur'] }">
|
|
|
<el-select v-model="domain.projectId" placeholder="请选择" style="width:200px;"
|
|
|
- :disabled="workForm.domains.length!=0 && workForm.domains[0].state!=2">
|
|
|
+ :disabled="workForm.domains.length==0?true:(workForm.domains[0].state==2?false:true)">
|
|
|
<el-option v-for="item in projectList" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
<el-link v-if="index >= 1" type="primary" :underline="false" @click="delDomain(index)" style="float:right;margin-right:10px;"
|
|
|
- :disabled="workForm.domains.length!=0 && workForm.domains[0].state!=2">
|
|
|
+ :disabled="workForm.domains.length==0?true:(workForm.domains[0].state==2?false:true)">
|
|
|
<i class="fa fa-trash" style="color: red;;font-size:18px;"></i>
|
|
|
</el-link>
|
|
|
</el-form-item>
|
|
@@ -86,19 +86,20 @@
|
|
|
<el-form-item label="投入时长" :prop="'domains.' + index + '.workingTime'"
|
|
|
:rules="{ required: true, message: '请输入投入时长', trigger: 'blur' }">
|
|
|
<el-input v-model.number="domain.workingTime" placeholder="请输入投入时长" type='number' clearable style="width:200px;"
|
|
|
- :disabled="workForm.domains.length!=0 && workForm.domains[0].state!=2"></el-input>
|
|
|
+ :disabled="workForm.domains.length==0?true:(workForm.domains[0].state==2?false:true)"></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="工作事项" :prop="'domains.' + index + '.content'" :rules="{ required: true, message: '请输入工作事项', trigger: 'blur' }">
|
|
|
<el-input v-model="domain.content" type="textarea" :rows="4" placeholder="请输入投入时长" clearable
|
|
|
- :disabled="workForm.domains.length!=0 && workForm.domains[0].state!=2"></el-input>
|
|
|
+ :disabled="workForm.domains.length==0?true:(workForm.domains[0].state==2?false:true)"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-divider v-if="workForm.domains.length>1"></el-divider>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" :disabled="workForm.domains.length!=0 && workForm.domains[0].state!=2" @click="submitDepartment">提交</el-button>
|
|
|
+ <el-button type="primary" @click="submitDepartment"
|
|
|
+ :disabled="workForm.domains.length==0?true:(workForm.domains[0].state==2?false:true)" >提交</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</section>
|
|
@@ -131,7 +132,7 @@
|
|
|
projectId: "",
|
|
|
workingTime: "",
|
|
|
content: "",
|
|
|
- state: "",
|
|
|
+ state: 2,
|
|
|
}],
|
|
|
},
|
|
|
workRules: {
|
|
@@ -297,10 +298,11 @@
|
|
|
projectId: "",
|
|
|
workingTime: "",
|
|
|
content: "",
|
|
|
- state: "",
|
|
|
+ state: 2,
|
|
|
}],
|
|
|
}
|
|
|
}
|
|
|
+ console.log(this.workForm)
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -387,9 +389,9 @@
|
|
|
},
|
|
|
|
|
|
// 跳转
|
|
|
- junpToDeskTop() {
|
|
|
+ junpToDeskTop(id) {
|
|
|
let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
|
|
|
- this.$router.push("/desktop/" + this.user.id + "/" + this.date +day);
|
|
|
+ this.$router.push("/desktop/" + id + "/" + this.date +day);
|
|
|
},
|
|
|
|
|
|
// 通过日报
|