Merge remote-tracking branch 'origin/main'

main
Dayu 11 months ago
commit 85f07eda33
  1. 3
      src/api/smart/operationitem.js
  2. 30
      src/api/smart/operationticket.js
  3. 110
      src/views/smart/operationticket.vue
  4. 105
      src/views/smart/operationticketDetail.vue

@ -22,12 +22,13 @@ export const getDetail = (id) => {
}) })
} }
export const getItemDetail = (id) => { export const getItemDetail = (id , operationTicketNo) => {
return request({ return request({
url: '/api/smart/operationitem/detail', url: '/api/smart/operationitem/detail',
method: 'get', method: 'get',
params: { params: {
id, id,
operationTicketNo,
} }
}) })
} }

@ -47,4 +47,34 @@ export const update = (row) => {
data: row data: row
}) })
} }
export const auditing = (ids) => {
return request({
url: '/api/smart/operationticket/auditing',
method: 'post',
params: {
ids,
}
})
}
export const reject = (ids) => {
return request({
url: '/api/smart/operationticket/reject',
method: 'post',
params: {
ids,
}
})
}
export const closeticket = (ids,isQuakified,riskControlEvaluation) => {
return request({
url: '/api/smart/operationticket/closeticket',
method: 'post',
params: {
ids,
isQuakified,
riskControlEvaluation,
}
})
}

@ -57,13 +57,34 @@
<el-button @click="rowDel(row)" type="text">删除</el-button> <el-button @click="rowDel(row)" type="text">删除</el-button>
</template> </template>
</avue-crud> </avue-crud>
<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>
</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 {mapGetters} from "vuex"; import {mapGetters} from "vuex";
import {auditing, reject} from "@/api/leger/equipmentledger"; import {auditing, reject} from "@/api/smart/operationticket";
import expUtil from "@/util/exportUtil"; import expUtil from "@/util/exportUtil";
import {getToken} from "@/util/auth"; import {getToken} from "@/util/auth";
@ -71,8 +92,10 @@
data() { data() {
return { return {
form: {}, form: {},
updateid:0,
query: {}, query: {},
loading: true, loading: true,
closeTicketBox: false,
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
@ -219,6 +242,9 @@
label: "计划开始时间", label: "计划开始时间",
prop: "plannedStartTime", prop: "plannedStartTime",
search: true, search: true,
type: "date",
format: 'yyyy/MM/dd',
valueFormat: "yyyyMMdd",
rules: [{ rules: [{
required: true, required: true,
message: "请输入计划开始时间", message: "请输入计划开始时间",
@ -361,9 +387,15 @@
label: "状态", label: "状态",
prop: "sts", prop: "sts",
search: true, search: true,
type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=operation_sts",
props: {
label: "dictValue",
value: "dictKey"
},
rules: [{ rules: [{
required: true, required: true,
message: "请输入系统状态", message: "请输入状态",
trigger: "blur" trigger: "blur"
}] }]
}, },
@ -380,6 +412,11 @@
{ {
label: "审核状态", label: "审核状态",
prop: "reviewStatus", prop: "reviewStatus",
dicUrl: "/api/daf-system/dict/dictionary?code=check_status",
props: {
label: "dictValue",
value: "dictKey"
},
hide: true, hide: true,
rules: [{ rules: [{
required: true, required: true,
@ -389,6 +426,41 @@
}, },
] ]
}, },
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
},
]
},
data: [] data: []
}; };
}, },
@ -417,6 +489,7 @@
return ids.join(","); return ids.join(",");
} }
}, },
methods: { methods: {
rowSave(row, done, loading) { rowSave(row, done, loading) {
add(row).then(() => { add(row).then(() => {
@ -537,13 +610,27 @@
}, },
handleDetailcls(row) { handleDetailcls(row) {
debugger debugger
this.$router.push({ this.updateid = row.id;
path: "/smart/operationticketDetail", this.closeTicketBox = true;
query: { },
frameMode:"search", handleDetailCancel() {
id: row.id debugger
}, this.closeTicketBox = false;
}); },
handleDetailClose() {
debugger
return closeticket( this.updateid, this.closeTicketForm.isQuakified,this.closeTicketForm.riskControlEvaluation)
.then(() => {
this.closeTicketForm.isQuakifie = -1;
this.closeTicketForm.riskControlEvaluation = '';
this.closeTicketBox = false;
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection()
});
}, },
handleDetailSearch(row) { handleDetailSearch(row) {
debugger debugger
@ -552,7 +639,8 @@
query: { query: {
frameMode:"search", frameMode:"search",
id: row.id, id: row.id,
operationTicketNo:row.operationTicketNo operationTicketNo:row.operationTicketNo,
reviewStatus: row.reviewStatus
}, },
}); });
}, },

@ -1,5 +1,22 @@
<template> <template>
<basic-container> <basic-container>
<el-row :span="24">
<div class="check_status_class">
<span >
<el-col >
审核状态:
<el-select v-model="checkStatusValue">
<el-option
v-for="item in optionCheckStatus"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
</span>
</div>
</el-row>
<avue-tabs :option="option" <avue-tabs :option="option"
@change="handleChange"></avue-tabs> @change="handleChange"></avue-tabs>
<span v-if="type.prop==='information'"> <span v-if="type.prop==='information'">
@ -77,6 +94,20 @@ export default {
name: "operationticketDetail", name: "operationticketDetail",
data () { data () {
return { return {
checkStatusValue: this.$route.query.reviewStatus,
optionCheckStatus: [{
value: "1",
label: '审核中'
}, {
value: "2",
label: '已审核'
}, {
value: "3",
label: '未通过'
}, {
value: "4",
label: ' '
}],
frame_class: '', frame_class: '',
type: {}, type: {},
shouldShowButton:{}, shouldShowButton:{},
@ -95,6 +126,7 @@ export default {
tab1_option: { tab1_option: {
submitBtn: false, submitBtn: false,
emptyBtn: false, emptyBtn: false,
isShowItem: false,
group:[ group:[
{ {
column: [ column: [
@ -269,9 +301,42 @@ export default {
prop: "securityMeasuresDisclosure", prop: "securityMeasuresDisclosure",
type: "textarea", type: "textarea",
span: 8, span: 8,
row:true,
maxlength: 1000, maxlength: 1000,
}, },
{
label: "作业后风险管控情况评价",
prop: "riskControlEvaluation",
type: "textarea",
span: 8,
display: this.$route.query.frameMode == "add"? false : true,
maxlength: 1000,
},
{
label: "状态",
prop: "sts",
type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=operation_sts",
props: {
label: "dictValue",
value: "dictKey"
},
display: this.$route.query.frameMode == "add"? false : true,
span: 8,
maxlength: 20,
},
{
label: "是否合格",
display: this.$route.query.frameMode == "add"? false : true,
type: "select",
prop: "isQuakified",
dicUrl: "/api/daf-system/dict/dictionary?code=is_qualified",
span: 8,
offset: 16,
props: {
label: "dictValue",
value: "dictKey"
},
},
] ]
}, },
{ {
@ -359,6 +424,7 @@ export default {
label: "操作票编号", label: "操作票编号",
prop: "operationTicketNo", prop: "operationTicketNo",
span: 20, span: 20,
// disabled: true,
rules: [{ rules: [{
required: true, required: true,
message: "请输入操作票编号", message: "请输入操作票编号",
@ -441,8 +507,8 @@ export default {
this.frame_class = null; this.frame_class = null;
}else{ }else{
this.readonlyForm=false; this.readonlyForm=false;
this.shouldShowButton=false; this.shouldShowButton=true;
this.addUpdateShowButton=true; this.addUpdateShowButton=false;
this.frame_class = 'frame_class1'; this.frame_class = 'frame_class1';
this.SearchDetail(); this.SearchDetail();
} }
@ -469,7 +535,8 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.tab1_form.checkStatus="1" this.tab1_form.reviewStatus="1"
this.tab1_form.sts= "1"
add(this.tab1_form).then(()=>{ add(this.tab1_form).then(()=>{
this.$router.push({ this.$router.push({
path: "/smart/operationticket", path: "/smart/operationticket",
@ -533,15 +600,17 @@ export default {
}, },
handleChange (column) { handleChange (column) {
this.type = column this.type = column
if (column.prop == 'operationItem') { if(this.$route.query.frameMode != "add"){
this.item_onLoad(); if (column.prop == 'operationItem') {
this.item_onLoad();
}
} }
}, },
// //
item_rowSave (form, done, loading) { item_rowSave (form, done, loading) {
loading(); loading();
form.eqLedgerId = this.$route.query.id; form.id = this.$route.query.id;
item_add(form).then(() => { item_add(form).then(() => {
done(form); done(form);
this.item_onLoad(this.page); this.item_onLoad(this.page);
@ -554,7 +623,7 @@ export default {
loading(); loading();
}); });
}, },
// //
item_rowUpdate (form, index, done, loading) { item_rowUpdate (form, index, done, loading) {
console.log(form) console.log(form)
item_update(form).then(() => { item_update(form).then(() => {
@ -569,7 +638,7 @@ export default {
}); });
}, },
// //
item_rowDel (form, index,done) { item_rowDel (form, index,done) {
this.$confirm("确定将选择数据删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -592,10 +661,10 @@ export default {
console.log(res); console.log(res);
this.tab1_form = res.data.data; this.tab1_form = res.data.data;
}); });
getItemDetail(this.$route.query.id,this.tab1_form.operationTicketNo).then(res => { // getItemDetail(this.$route.query.id,this.tab1_form.operationTicketNo).then(res => {
console.log(res); // console.log(res);
this.item_data = res.data.data; // this.item_data = res.data.data;
}); // });
}, },
auditing() { auditing() {
this.$confirm("是否将数据审核?", "提示", { this.$confirm("是否将数据审核?", "提示", {
@ -603,7 +672,7 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.tab1_form.checkStatus="2" this.tab1_form.reviewStatus="2"
this.submitRejectOrauditing(); this.submitRejectOrauditing();
}); });
}, },
@ -613,7 +682,7 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.tab1_form.checkStatus="3" this.tab1_form.reviewStatus="3"
this.submitRejectOrauditing(); this.submitRejectOrauditing();
}); });
}, },
@ -635,7 +704,7 @@ export default {
}); });
}, },
del() { del() {
this.$confirm("是否将选择数据审核?", { this.$confirm("是否将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
@ -694,4 +763,8 @@ export default {
display: flex; display: flex;
justify-content: flex-end; /* 将子元素推到容器的末端 */ justify-content: flex-end; /* 将子元素推到容器的末端 */
} }
.check_status_class {
display: flex;
justify-content: flex-end; /* 将子元素推到容器的末端 */
}
</style> </style>

Loading…
Cancel
Save