flx:优化
This commit is contained in:
parent
e1d70b11f2
commit
420197914a
File diff suppressed because it is too large
Load Diff
@ -115,6 +115,26 @@ export default {
|
||||
activeIndex: "1",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const find = this.$store.state.menuList.find(
|
||||
(item) => item.path == "/project/safeSame/inspectionLedger"
|
||||
);
|
||||
if (find) {
|
||||
const findAction = [
|
||||
"inspectionLedger_rectificationRecord",
|
||||
"inspectionLedger_myToDoList",
|
||||
"inspectionLedger_pendingReview",
|
||||
"inspectionLedger_myHiddenTrouble",
|
||||
"inspectionLedger_hazardousWorkDistribution",
|
||||
"inspectionLedger_hiddenDangerAnalysis",
|
||||
];
|
||||
const findIndex = findAction.findIndex((item) =>
|
||||
find.actionList.some((i) => i.actionCode == item)
|
||||
);
|
||||
this.activeIndex = `${findIndex + 1}`;
|
||||
console.log(447788, find.actionList, findIndex);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSelect(key, keyPath) {
|
||||
// console.log(key, keyPath);
|
||||
|
||||
@ -69,6 +69,12 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="风险级别" prop="riskType">
|
||||
<el-select v-model="queryParams.riskType" placeholder="请选择">
|
||||
<el-option label="一般风险" :value="1"></el-option>
|
||||
<el-option label="高风险" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="施工人员" prop="operator">
|
||||
<el-input
|
||||
v-model="queryParams.operator"
|
||||
@ -173,6 +179,24 @@
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="riskType"
|
||||
align="center"
|
||||
label="风险级别"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
class="status-box"
|
||||
:class="{
|
||||
ybfx_active: scope.row.riskType == 1,
|
||||
gfx_active: scope.row.riskType == 2,
|
||||
}"
|
||||
>
|
||||
{{scope.row.riskType == 2 ? '高风险' : '一般风险'}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="devName"
|
||||
align="center"
|
||||
@ -195,12 +219,12 @@
|
||||
label="作业内容"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
prop="safetyMeasure"
|
||||
align="center"
|
||||
label="安全措施"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
></el-table-column> -->
|
||||
<el-table-column
|
||||
prop="constructionAreaNames"
|
||||
align="center"
|
||||
@ -516,7 +540,7 @@
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="安全措施" prop="safetyMeasure">
|
||||
<!-- <el-form-item label="安全措施" prop="safetyMeasure">
|
||||
<el-input
|
||||
type="textarea"
|
||||
placeholder="请输入"
|
||||
@ -526,16 +550,18 @@
|
||||
show-word-limit
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="工作票附件" prop="workTicketAttachment">
|
||||
<el-upload
|
||||
:action="$store.state.UPLOADURL"
|
||||
list-type="picture-card"
|
||||
name="files"
|
||||
multiple
|
||||
:limit="20"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
:file-list="workTicketForm.workTicketAttachment"
|
||||
:on-exceed="handleExceed"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-success="(res, file) => handleSuccess(res, file, 1)"
|
||||
:on-remove="(file, fileList) => handleRemove(file, fileList, 1)"
|
||||
>
|
||||
@ -956,9 +982,16 @@
|
||||
<div>作业人员</div>
|
||||
<div>{{ workTicketDetail.operator }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<!-- <div>
|
||||
<div>安全措施</div>
|
||||
<div>{{ workTicketDetail.safetyMeasure }}</div>
|
||||
</div> -->
|
||||
<div>
|
||||
<div>施工时间</div>
|
||||
<div>
|
||||
{{ workTicketDetail.constructionTimeBegin }} -
|
||||
{{ workTicketDetail.constructionTimeEnd }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@ -978,13 +1011,6 @@
|
||||
<div>申请时间</div>
|
||||
<div>{{ workTicketDetail.applicationTime }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>施工时间</div>
|
||||
<div>
|
||||
{{ workTicketDetail.constructionTimeBegin }} -
|
||||
{{ workTicketDetail.constructionTimeEnd }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>作业内容</div>
|
||||
<div>
|
||||
@ -1400,6 +1426,7 @@ export default {
|
||||
typeId: "",
|
||||
constructionTime: [],
|
||||
workTicketNumber: "",
|
||||
riskType: "",
|
||||
status: "",
|
||||
operator: "",
|
||||
constructionAreas: "",
|
||||
@ -1459,7 +1486,9 @@ export default {
|
||||
videoItemList: [],
|
||||
videoConfig: {
|
||||
enableNotPlugin: 1,
|
||||
},
|
||||
},
|
||||
imageNumber:0,
|
||||
uploadList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -1723,12 +1752,36 @@ export default {
|
||||
handleExceed(file, fileList) {
|
||||
this.$message.warning("上传图片超出限制个数!");
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
this.imageNumber++;
|
||||
},
|
||||
handleSuccess(res, file, type) {
|
||||
console.log(res, file, type);
|
||||
if (res.status == "SUCCESS") {
|
||||
const obj = {
|
||||
1: "workTicketAttachment",
|
||||
2: "otherAttachment",
|
||||
};
|
||||
if(type == 1) {
|
||||
this.uploadList.push({
|
||||
name: file.name,
|
||||
url:
|
||||
this.$store.state.FILEURL +
|
||||
file.response.data[0].imageUrl,
|
||||
newUrl: file.response.data[0].imageUrl,
|
||||
})
|
||||
if(this.imageNumber == this.uploadList.length){
|
||||
this.workTicketForm.workTicketAttachment = this.workTicketForm.workTicketAttachment.concat(this.uploadList)
|
||||
this.uploadList = []
|
||||
this.imageNumber = 0
|
||||
}
|
||||
this.$refs.workTicketForm && this.$refs.workTicketForm.clearValidate(
|
||||
"workTicketAttachment"
|
||||
);
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
this.workTicketForm[obj[type]].push({
|
||||
name: file.name,
|
||||
url:
|
||||
@ -1736,11 +1789,6 @@ export default {
|
||||
file.response.data[0].imageUrl,
|
||||
newUrl: file.response.data[0].imageUrl,
|
||||
});
|
||||
if (type == 1) {
|
||||
this.$refs.workTicketForm.clearValidate(
|
||||
"workTicketAttachment"
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
handleQuery() {
|
||||
@ -1752,6 +1800,7 @@ export default {
|
||||
this.queryParams.typeId = "";
|
||||
this.queryParams.constructionTime = [];
|
||||
this.queryParams.workTicketNumber = "";
|
||||
this.queryParams.riskType = "";
|
||||
this.queryParams.status = "";
|
||||
this.queryParams.operator = "";
|
||||
this.queryParams.constructionAreas = "";
|
||||
@ -1820,6 +1869,7 @@ export default {
|
||||
? this.queryParams.constructionTime[1]
|
||||
: "",
|
||||
workTicketNumber: this.queryParams.workTicketNumber,
|
||||
riskType: this.queryParams.riskType,
|
||||
status: this.queryParams.status,
|
||||
operator: this.queryParams.operator,
|
||||
constructionAreas: this.queryParams.constructionAreas,
|
||||
@ -3000,6 +3050,10 @@ export default {
|
||||
border-radius: 2px;
|
||||
border: 1px solid #f1f1f1;
|
||||
}
|
||||
.gfx_active {
|
||||
background-color: #ff0000;
|
||||
color: #ffffff;
|
||||
}
|
||||
.wks_active {
|
||||
background-color: #898989;
|
||||
color: #1a1a1a;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user