main
zhen 11 months ago
parent 1380b490ae
commit 7494428859
  1. 172
      src/views/smart/operationticketDetail.vue

@ -5,14 +5,15 @@
<span > <span >
<el-col > <el-col >
审核状态: 审核状态:
<el-select v-model="checkStatusValue" > <avue-input v-model="form" placeholder="" class="frame_class1" style = "width: 100px"></avue-input>
<el-option <!-- <el-select v-model="checkStatusValue" >-->
v-for="item in optionCheckStatus" <!-- <el-option-->
:key="item.value" <!-- v-for="item in optionCheckStatus"-->
:label="item.label" <!-- :key="item.value"-->
:value="item.value"> <!-- :label="item.label"-->
</el-option> <!-- :value="item.value">-->
</el-select> <!-- </el-option>-->
<!-- </el-select>-->
</el-col> </el-col>
</span> </span>
</div> </div>
@ -59,6 +60,11 @@
@click="back" @click="back"
v-if="addUpdateShowButton"> v-if="addUpdateShowButton">
取消</el-button> 取消</el-button>
<el-button type="primary"
size="small"
@click="handleDetailcls"
v-if="shouldShowButton">
关票</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="auditing" @click="auditing"
@ -81,11 +87,32 @@
删除</el-button> 删除</el-button>
</span> </span>
</div> </div>
<el-dialog title="关票提醒"
append-to-body
:visible.sync="closeTicketBox"
width="555px">
<avue-form :option="closeTicketOption" v-model="closeTicketForm" ref="closeTicketForm">
</avue-form>
<div class="container">
<span>
<el-button type="primary"
size="small"
plain
@click="handleDetailCancel">取消
</el-button>
<el-button type="submit"
size="small"
plain
@click="handleDetailClose">关票
</el-button>
</span>
</div>
</el-dialog>
</basic-container> </basic-container>
<!-- https://avuejs.com/form/form-rules.html#%E5%A4%96%E7%BD%AE%E9%AA%8C%E8%AF%81--> <!-- https://avuejs.com/form/form-rules.html#%E5%A4%96%E7%BD%AE%E9%AA%8C%E8%AF%81-->
</template> </template>
<script> <script>
import {getList, getDetail, add, update, remove} from "@/api/smart/operationticket"; import {getList, getDetail, add, update, remove, closeticket} from "@/api/smart/operationticket";
import { import {
item_add, item_add,
item_update, item_update,
@ -103,20 +130,22 @@ export default {
name: "operationticketDetail", name: "operationticketDetail",
data () { data () {
return { return {
checkStatusValue: this.$route.query.reviewStatus, // checkStatusValue: this.$route.query.reviewStatus,
optionCheckStatus: [{ // optionCheckStatus: [{
value: 1, // value: 1,
label: '审核中', // label: '',
}, { // }, {
value: 2, // value: 2,
label: '已审核', // label: '',
}, { // }, {
value: 3, // value: 3,
label: '未通过', // label: '',
}, { // }, {
value: 4, // value: undefined,
label: ' ' // label: ' '
}], // }],
form:'',
closeTicketBox: false,
defaultOperationTicketNo: "", defaultOperationTicketNo: "",
frame_class: '', frame_class: '',
type: {}, type: {},
@ -386,6 +415,7 @@ export default {
}, },
{ {
label: '作业前风险辨识', label: '作业前风险辨识',
arrow: false,
column: [ column: [
{ {
label: "人员资格", label: "人员资格",
@ -531,7 +561,42 @@ export default {
}] }]
}, },
] ]
} },
closeTicketForm: {},
closeTicketOption: {
height: 'auto',
calcHeight: 210,
emptyBtn:false,
submitBtn:false,
tip: false,
border: true,
index: false,
selection: true,
column: [
{
label: "是否合格",
type: "select",
prop: "isQuakified",
dicUrl: "/api/daf-system/dict/dictionary?code=is_qualified",
props: {
label: "dictValue",
value: "dictKey"
},
rules: [{
required: true,
message: "是否合格",
trigger: "blur"
}],
span: 24
},
{
label: "作业后风险管控情况评价",
type: "textarea",
prop: "riskControlEvaluation",
span: 24
},
]
},
} }
}, },
computed: { computed: {
@ -561,6 +626,28 @@ export default {
this.frame_class = 'frame_class1'; this.frame_class = 'frame_class1';
this.SearchDetail(); this.SearchDetail();
} }
switch (this.$route.query.reviewStatus){
case 1:
this.form = "审核中";
break;
case 2:
this.form = "已审核";
break;
case 3:
this.form = "未通过";
break;
default:
this.form =" ";
}
// if(this.$route.query.reviewStatus ===1){
// this.form = "";
// }else if(this.$route.query.reviewStatus ===2){
// this.form = "";
// }else if(this.$route.query.reviewStatus ===3){
// this.form = "";
// }else {
// this.form =" ";
// }
}, },
methods: { methods: {
handleFormSubmit() { handleFormSubmit() {
@ -690,6 +777,30 @@ export default {
}); });
}, },
handleDetailcls() {
debugger
this.updateid = this.$route.query.id;
this.closeTicketBox = true;
},
handleDetailCancel() {
debugger
this.closeTicketBox = false;
},
handleDetailClose() {
debugger
return closeticket( this.updateid, this.closeTicketForm.isQuakified,this.closeTicketForm.riskControlEvaluation)
.then(() => {
this.$router.push({
path: "/smart/operationticket",
query: {},
});
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection()
});
},
// //
item_rowDel (form, index,done) { item_rowDel (form, index,done) {
this.$confirm("确定将选择数据删除?", { this.$confirm("确定将选择数据删除?", {
@ -829,4 +940,17 @@ export default {
display: flex; display: flex;
justify-content: flex-end; /* 将子元素推到容器的末端 */ justify-content: flex-end; /* 将子元素推到容器的末端 */
} }
.avue-group__title{
color: rgb(64, 149, 229) !important;
font-size: 16px !important;
line-height: 22px !important;
font-weight: bold !important;
}
.el-form-item__label{
width: 110px !important;
}
.el-form-item__content{
margin-left: 110px!important;
}
</style> </style>

Loading…
Cancel
Save