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({
url: '/api/smart/operationitem/detail',
method: 'get',
params: {
id,
operationTicketNo,
}
})
}

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

@ -1,5 +1,22 @@
<template>
<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"
@change="handleChange"></avue-tabs>
<span v-if="type.prop==='information'">
@ -77,6 +94,20 @@ export default {
name: "operationticketDetail",
data () {
return {
checkStatusValue: this.$route.query.reviewStatus,
optionCheckStatus: [{
value: "1",
label: '审核中'
}, {
value: "2",
label: '已审核'
}, {
value: "3",
label: '未通过'
}, {
value: "4",
label: ' '
}],
frame_class: '',
type: {},
shouldShowButton:{},
@ -95,6 +126,7 @@ export default {
tab1_option: {
submitBtn: false,
emptyBtn: false,
isShowItem: false,
group:[
{
column: [
@ -269,9 +301,42 @@ export default {
prop: "securityMeasuresDisclosure",
type: "textarea",
span: 8,
row:true,
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: "操作票编号",
prop: "operationTicketNo",
span: 20,
// disabled: true,
rules: [{
required: true,
message: "请输入操作票编号",
@ -441,8 +507,8 @@ export default {
this.frame_class = null;
}else{
this.readonlyForm=false;
this.shouldShowButton=false;
this.addUpdateShowButton=true;
this.shouldShowButton=true;
this.addUpdateShowButton=false;
this.frame_class = 'frame_class1';
this.SearchDetail();
}
@ -469,7 +535,8 @@ export default {
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.tab1_form.checkStatus="1"
this.tab1_form.reviewStatus="1"
this.tab1_form.sts= "1"
add(this.tab1_form).then(()=>{
this.$router.push({
path: "/smart/operationticket",
@ -533,15 +600,17 @@ export default {
},
handleChange (column) {
this.type = column
if (column.prop == 'operationItem') {
this.item_onLoad();
if(this.$route.query.frameMode != "add"){
if (column.prop == 'operationItem') {
this.item_onLoad();
}
}
},
//
item_rowSave (form, done, loading) {
loading();
form.eqLedgerId = this.$route.query.id;
form.id = this.$route.query.id;
item_add(form).then(() => {
done(form);
this.item_onLoad(this.page);
@ -554,7 +623,7 @@ export default {
loading();
});
},
//
//
item_rowUpdate (form, index, done, loading) {
console.log(form)
item_update(form).then(() => {
@ -569,7 +638,7 @@ export default {
});
},
//
//
item_rowDel (form, index,done) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
@ -592,10 +661,10 @@ export default {
console.log(res);
this.tab1_form = res.data.data;
});
getItemDetail(this.$route.query.id,this.tab1_form.operationTicketNo).then(res => {
console.log(res);
this.item_data = res.data.data;
});
// getItemDetail(this.$route.query.id,this.tab1_form.operationTicketNo).then(res => {
// console.log(res);
// this.item_data = res.data.data;
// });
},
auditing() {
this.$confirm("是否将数据审核?", "提示", {
@ -603,7 +672,7 @@ export default {
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.tab1_form.checkStatus="2"
this.tab1_form.reviewStatus="2"
this.submitRejectOrauditing();
});
},
@ -613,7 +682,7 @@ export default {
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.tab1_form.checkStatus="3"
this.tab1_form.reviewStatus="3"
this.submitRejectOrauditing();
});
},
@ -635,7 +704,7 @@ export default {
});
},
del() {
this.$confirm("是否将选择数据审核?", {
this.$confirm("是否将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
@ -694,4 +763,8 @@ export default {
display: flex;
justify-content: flex-end; /* 将子元素推到容器的末端 */
}
.check_status_class {
display: flex;
justify-content: flex-end; /* 将子元素推到容器的末端 */
}
</style>

Loading…
Cancel
Save