自定义防抖指令
This commit is contained in:
parent
0d2250d417
commit
1bf3a44513
|
@ -6,7 +6,7 @@ const DEFAULT_CONFIG = {
|
|||
DASHBOARD_URL: "/dashboard",
|
||||
|
||||
//版本号
|
||||
APP_VER: "1.0",
|
||||
APP_VER: "2.0.1",
|
||||
|
||||
//内核版本号
|
||||
CORE_VER: "1.6.3",
|
||||
|
|
|
@ -9,6 +9,7 @@ import store from './store'
|
|||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||
import preventReClick from './utils/preventReClick'
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
|
@ -18,7 +19,7 @@ app.use(ElementPlus);
|
|||
app.use(i18n);
|
||||
app.use(scui);
|
||||
app.use(ehsui);
|
||||
|
||||
app.use(preventReClick)
|
||||
//挂载app
|
||||
app.mount('#app');
|
||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
export default (app) => {
|
||||
app.directive('preventReClick', {
|
||||
mounted(el, binding) {
|
||||
el.addEventListener('click', () => {
|
||||
if (!el.disabled) {
|
||||
el.disabled = true
|
||||
setTimeout(() => {
|
||||
el.disabled = false
|
||||
}, binding.value || 2000)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
|
@ -167,9 +167,11 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-bottom: 20px; text-align:center">
|
||||
<el-button type="primary" plain @click="handleNextStep"
|
||||
>下一步
|
||||
</el-button>
|
||||
<el-button type="primary"
|
||||
:disabled="isSaving"
|
||||
:loading="isSaving"
|
||||
plain @click="handleNextStep"
|
||||
>下一步</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
|
@ -472,6 +474,7 @@
|
|||
v-for=" item in initForm.transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
:disabled="tLoading"
|
||||
@click="submitTicketCreate(item.id)"
|
||||
style="margin-right:4px"
|
||||
>{{item.name}}
|
||||
|
@ -528,7 +531,7 @@
|
|||
stepTitle: ["基本信息", "作业人员", "气体检测记录"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
isSaving: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
|
@ -698,41 +701,39 @@
|
|||
if (this.active == 0) {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
//如果是创建许可证书
|
||||
this.isSaving = true; //如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
// debugger;
|
||||
this.form.cate = this.oplcateId;
|
||||
this.form.operation = this.operationId;
|
||||
console.log(this.form);
|
||||
this.$API.opm.opl.create
|
||||
.req(this.form)
|
||||
this.$API.opm.opl.create.req(this.form)
|
||||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.isSaving = false;
|
||||
this.oplId = res.id;
|
||||
this.getworkerList();
|
||||
this.getgasList();
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isSaving = false;
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.isSaving = false;
|
||||
this.getgasList();
|
||||
this.getworkerList();
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
this.isSaving = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -866,9 +867,8 @@
|
|||
ticket.ticket_data = {opl: this.oplId};
|
||||
ticket.transition = id;
|
||||
ticket.title = this.form.name + '-申请';
|
||||
this.tLoading = true
|
||||
this.tLoading = true;
|
||||
this.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
this.tLoading = false
|
||||
this.$message.success("提交成功");
|
||||
this.submitOut()
|
||||
}).catch(e=>{this.tLoading=false});
|
||||
|
@ -876,6 +876,7 @@
|
|||
|
||||
//退出界面
|
||||
submitOut() {
|
||||
this.tLoading = false;
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
|
|
|
@ -166,9 +166,12 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-bottom: 20px; text-align:center">
|
||||
<el-button type="primary" plain @click="handleNextStep"
|
||||
>下一步
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="issaving"
|
||||
:loading="issaving"
|
||||
type="primary" plain
|
||||
@click="handleNextStep"
|
||||
>下一步</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
|
@ -527,7 +530,7 @@
|
|||
stepTitle: ["基本信息", "作业人员", "气体检测记录"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
issaving: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
|
@ -692,11 +695,10 @@
|
|||
},
|
||||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
|
||||
if (this.active == 0) {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
//如果是创建许可证书
|
||||
this.issaving = true; //如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
|
@ -708,29 +710,26 @@
|
|||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.issaving = false;
|
||||
this.oplId = res.id;
|
||||
this.getworkerList();
|
||||
this.getgasList();
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.issaving = false;
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.issaving = false;
|
||||
this.getgasList();
|
||||
this.getworkerList();
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -742,9 +741,7 @@
|
|||
}
|
||||
}
|
||||
this.active = 2;
|
||||
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
|
||||
//选择人员后,调出该人员的所有证书
|
||||
|
@ -864,9 +861,8 @@
|
|||
ticket.ticket_data = {opl: this.oplId};
|
||||
ticket.transition = id;
|
||||
ticket.title = this.form.name + '-申请';
|
||||
this.tLoading = true
|
||||
this.tLoading = true;
|
||||
this.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
this.tLoading = false
|
||||
this.$message.success("提交成功");
|
||||
this.submitOut()
|
||||
}).catch(e=>{this.tLoading=false});
|
||||
|
@ -874,6 +870,7 @@
|
|||
|
||||
//退出界面
|
||||
submitOut() {
|
||||
this.tLoading = false;
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
|
|
|
@ -179,9 +179,11 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-bottom: 20px; text-align:center">
|
||||
<el-button type="primary" plain @click="handleNextStep"
|
||||
>下一步
|
||||
</el-button>
|
||||
<el-button type="primary" plain
|
||||
@click="handleNextStep"
|
||||
:disabled="issaving"
|
||||
:loading="issaving"
|
||||
>下一步</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
|
@ -481,6 +483,7 @@
|
|||
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
|
||||
<el-button
|
||||
:loading="tLoading"
|
||||
:disabled="tLoading"
|
||||
v-for=" item in initForm.transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
|
@ -540,7 +543,7 @@
|
|||
stepTitle: ["基本信息", "作业人员", "气体检测记录"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
issaving: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
|
@ -709,10 +712,9 @@
|
|||
if (this.active == 0) {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
//如果是创建许可证书
|
||||
this.issaving = true; //如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
this.form.cate = this.oplcateId;
|
||||
this.form.operation = this.operationId;
|
||||
console.log(this.form);
|
||||
|
@ -721,29 +723,26 @@
|
|||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.issaving = false;
|
||||
this.oplId = res.id;
|
||||
this.getworkerList();
|
||||
this.getgasList();
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.issaving = false;
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.issaving = false;
|
||||
this.getgasList();
|
||||
this.getworkerList();
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -755,9 +754,7 @@
|
|||
}
|
||||
}
|
||||
this.active = 2;
|
||||
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
|
||||
//选择人员后,调出该人员的所有证书
|
||||
|
@ -877,9 +874,8 @@
|
|||
ticket.ticket_data = {opl: this.oplId};
|
||||
ticket.transition = id;
|
||||
ticket.title = this.form.name + '-申请';
|
||||
this.tLoading = true
|
||||
this.tLoading = true;
|
||||
this.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
this.tLoading = false
|
||||
this.$message.success("提交成功");
|
||||
this.submitOut()
|
||||
}).catch(e=>{this.tLoading=false});
|
||||
|
@ -887,11 +883,11 @@
|
|||
|
||||
//退出界面
|
||||
submitOut() {
|
||||
this.tLoading = false;
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
id: this.operationId,//作业ID
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -175,9 +175,12 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-bottom: 20px; text-align:center">
|
||||
<el-button type="primary" plain @click="handleNextStep"
|
||||
>下一步
|
||||
</el-button>
|
||||
<el-button
|
||||
:loading="issave"
|
||||
:disabled="issave"
|
||||
type="primary" plain
|
||||
@click="handleNextStep"
|
||||
>下一步</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
|
@ -306,6 +309,7 @@
|
|||
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
|
||||
<el-button
|
||||
:loading="tLoading"
|
||||
:disabled="tLoading"
|
||||
v-for=" item in initForm.transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
|
@ -503,10 +507,8 @@
|
|||
this.deptoptions = genTree(res);
|
||||
});
|
||||
},
|
||||
|
||||
//作业负责人、作业监护人
|
||||
//作业
|
||||
|
||||
//根据作业许可证类别ID获取,风险、措施===>作业许可证类别详情
|
||||
getOplcates() {
|
||||
this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
|
||||
|
@ -531,11 +533,10 @@
|
|||
},
|
||||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
|
||||
if (this.active == 0) {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
//如果是创建许可证书
|
||||
this.issave = true; //如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
|
@ -547,29 +548,26 @@
|
|||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.issave = false;
|
||||
this.oplId = res.id;
|
||||
this.getworkerList();
|
||||
this.getgasList();
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.issave = false;
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.issave = false;
|
||||
this.getgasList();
|
||||
this.getworkerList();
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -698,9 +696,8 @@
|
|||
ticket.ticket_data = {opl: this.oplId};
|
||||
ticket.transition = id;
|
||||
ticket.title = this.form.name + '-申请';
|
||||
this.tLoading = true
|
||||
this.tLoading = true;
|
||||
this.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
this.tLoading = false
|
||||
this.$message.success("提交成功");
|
||||
this.submitOut()
|
||||
}).catch(e=>{this.tLoading=false});
|
||||
|
@ -708,6 +705,7 @@
|
|||
|
||||
//退出界面
|
||||
submitOut() {
|
||||
this.tLoading = false;
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
|
|
|
@ -175,9 +175,12 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-bottom: 20px; text-align:center">
|
||||
<el-button type="primary" plain @click="handleNextStep"
|
||||
>下一步
|
||||
</el-button>
|
||||
<el-button
|
||||
:loading="issave"
|
||||
:disabled="issave"
|
||||
type="primary" plain
|
||||
@click="handleNextStep"
|
||||
>下一步</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
|
@ -306,6 +309,7 @@
|
|||
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
|
||||
<el-button
|
||||
:loading="tLoading"
|
||||
:disabled="tLoading"
|
||||
v-for=" item in initForm.transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
|
@ -534,7 +538,7 @@
|
|||
if (this.active == 0) {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
//如果是创建许可证书
|
||||
this.issave = true; //如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
|
@ -546,9 +550,8 @@
|
|||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.issave = false;
|
||||
this.oplId = res.id;
|
||||
this.getworkerList();
|
||||
this.getgasList();
|
||||
|
@ -561,11 +564,10 @@
|
|||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.issave = false;
|
||||
this.getgasList();
|
||||
this.getworkerList();
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
|
@ -573,7 +575,6 @@
|
|||
}
|
||||
})
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
|
||||
//选择人员后,调出该人员的所有证书
|
||||
|
@ -697,9 +698,8 @@
|
|||
ticket.ticket_data = {opl: this.oplId};
|
||||
ticket.transition = id;
|
||||
ticket.title = this.form.name + '-申请';
|
||||
this.tLoading = true
|
||||
this.tLoading = true;
|
||||
this.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
this.tLoading = false
|
||||
this.$message.success("提交成功");
|
||||
this.submitOut()
|
||||
}).catch(e=>{this.tLoading=false});
|
||||
|
@ -707,6 +707,7 @@
|
|||
|
||||
//退出界面
|
||||
submitOut() {
|
||||
this.tLoading = false;
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
|
|
|
@ -148,9 +148,12 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-bottom: 20px; text-align:center">
|
||||
<el-button type="primary" plain @click="handleNextStep"
|
||||
>下一步
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="issave"
|
||||
:loading="issave"
|
||||
type="primary" plain
|
||||
@click="handleNextStep"
|
||||
>下一步</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
|
@ -279,6 +282,7 @@
|
|||
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
|
||||
<el-button
|
||||
:loading="tLoading"
|
||||
:disabled="tLoading"
|
||||
v-for=" item in initForm.transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
|
@ -503,7 +507,7 @@
|
|||
if (this.active == 0) {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
//如果是创建许可证书
|
||||
this.issave = false; //如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
|
@ -515,9 +519,8 @@
|
|||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.issave = false;
|
||||
this.oplId = res.id;
|
||||
this.getworkerList();
|
||||
this.getgasList();
|
||||
|
@ -527,17 +530,17 @@
|
|||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.issave = false;
|
||||
this.getgasList();
|
||||
this.getworkerList();
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
this.issave = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -666,9 +669,8 @@
|
|||
ticket.ticket_data = {opl: this.oplId};
|
||||
ticket.transition = id;
|
||||
ticket.title = this.form.name + '-申请';
|
||||
this.tLoading = true
|
||||
this.tLoading = true;
|
||||
this.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
this.tLoading = false
|
||||
this.$message.success("提交成功");
|
||||
this.submitOut()
|
||||
}).catch(e=>{this.tLoading=false});
|
||||
|
@ -676,6 +678,7 @@
|
|||
|
||||
//退出界面
|
||||
submitOut() {
|
||||
this.tLoading = false;
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit" v-if="mode!=='show'">保存</el-button>
|
||||
<el-button type="primary" :disabled="isSaveing" :loading="isSaveing" @click="submit" v-if="mode!=='show'">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
|
@ -257,9 +257,9 @@ export default {
|
|||
form
|
||||
);
|
||||
}
|
||||
this.visible = false;
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
console.log(res)
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
|
|
|
@ -76,7 +76,6 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24" >
|
||||
<el-form-item label="作业部门" prop="dept_do">
|
||||
<el-cascader
|
||||
|
@ -177,12 +176,14 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-bottom: 20px; text-align:center">
|
||||
<el-button type="primary" plain @click="handleNextStep"
|
||||
>下一步
|
||||
</el-button>
|
||||
<el-button
|
||||
v-preventReClick
|
||||
:loading="issave"
|
||||
type="primary" plain
|
||||
@click="handleNextStep"
|
||||
>下一步</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
<!--作业人员!-->
|
||||
<el-main class="nopadding" v-show="active === 1">
|
||||
<div class="left-panel" style="margin: 10px">
|
||||
|
@ -308,6 +309,7 @@
|
|||
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
|
||||
<el-button
|
||||
:loading="tLoading"
|
||||
v-preventReClick
|
||||
v-for=" item in initForm.transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
|
@ -537,10 +539,9 @@
|
|||
if (this.active == 0) {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
//如果是创建许可证书
|
||||
this.issave = true; //如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
this.form.cate = this.oplcateId;
|
||||
this.form.operation = this.operationId;
|
||||
console.log(this.form);
|
||||
|
@ -549,29 +550,29 @@
|
|||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.issave = false;
|
||||
this.oplId = res.id;
|
||||
this.getworkerList();
|
||||
this.getgasList();
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.issave = false;
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.issave = false;
|
||||
this.getgasList();
|
||||
this.getworkerList();
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
this.issave = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -702,7 +703,6 @@
|
|||
ticket.title = this.form.name + '-申请';
|
||||
this.tLoading = true
|
||||
this.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
this.tLoading = false
|
||||
this.$message.success("提交成功");
|
||||
this.submitOut()
|
||||
}).catch(e=>{this.tLoading=false});
|
||||
|
@ -710,6 +710,7 @@
|
|||
|
||||
//退出界面
|
||||
submitOut() {
|
||||
this.tLoading = false;
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
|
|
|
@ -177,9 +177,12 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-bottom: 20px; text-align:center">
|
||||
<el-button type="primary" plain @click="handleNextStep"
|
||||
>下一步
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="issave"
|
||||
:loading="issave"
|
||||
type="primary" plain
|
||||
@click="handleNextStep"
|
||||
>下一步</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
|
@ -308,6 +311,7 @@
|
|||
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
|
||||
<el-button
|
||||
:loading="tLoading"
|
||||
:disabled="tLoading"
|
||||
v-for=" item in initForm.transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
|
@ -535,7 +539,7 @@
|
|||
if (this.active == 0) {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
//如果是创建许可证书
|
||||
this.issave = true; //如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
|
@ -547,28 +551,28 @@
|
|||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.issave = false;
|
||||
this.oplId = res.id;
|
||||
this.getworkerList();
|
||||
this.getgasList();
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.issave = false
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.issave = false;
|
||||
this.getgasList();
|
||||
this.getworkerList();
|
||||
|
||||
});
|
||||
} else {
|
||||
this.issave = false;
|
||||
this.active = 1;
|
||||
}
|
||||
}
|
||||
|
@ -698,9 +702,8 @@
|
|||
ticket.ticket_data = {opl: this.oplId};
|
||||
ticket.transition = id;
|
||||
ticket.title = this.form.name + '-申请';
|
||||
this.tLoading = true
|
||||
this.tLoading = true;
|
||||
this.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
this.tLoading = false
|
||||
this.$message.success("提交成功");
|
||||
this.submitOut()
|
||||
}).catch(e=>{this.tLoading=false});
|
||||
|
@ -708,6 +711,7 @@
|
|||
|
||||
//退出界面
|
||||
submitOut() {
|
||||
this.tLoading = false;
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
|
|
|
@ -182,9 +182,12 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-bottom: 20px; text-align:center">
|
||||
<el-button type="primary" plain @click="handleNextStep"
|
||||
>下一步
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="issave"
|
||||
:loading="issave"
|
||||
type="primary" plain
|
||||
@click="handleNextStep"
|
||||
>下一步</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
|
@ -484,6 +487,7 @@
|
|||
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
|
||||
<el-button
|
||||
:loading="tLoading"
|
||||
:disabled="tLoading"
|
||||
v-for=" item in initForm.transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
|
@ -708,11 +712,10 @@
|
|||
},
|
||||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
|
||||
if (this.active == 0) {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
//如果是创建许可证书
|
||||
this.issave = true; //如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
|
@ -724,28 +727,27 @@
|
|||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.issave = false;
|
||||
this.oplId = res.id;
|
||||
this.getworkerList();
|
||||
this.getgasList();
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.issave = false;
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.issave = false;
|
||||
this.getgasList();
|
||||
this.getworkerList();
|
||||
|
||||
});
|
||||
} else {
|
||||
this.issave = false;
|
||||
this.active = 1;
|
||||
}
|
||||
}
|
||||
|
@ -758,7 +760,6 @@
|
|||
}
|
||||
}
|
||||
this.active = 2;
|
||||
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
|
@ -880,9 +881,8 @@
|
|||
ticket.ticket_data = {opl: this.oplId};
|
||||
ticket.transition = id;
|
||||
ticket.title = this.form.name + '-申请';
|
||||
this.tLoading = true
|
||||
this.tLoading = true;
|
||||
this.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
this.tLoading = false
|
||||
this.$message.success("提交成功");
|
||||
this.submitOut()
|
||||
}).catch(e=>{this.tLoading=false});
|
||||
|
@ -890,6 +890,7 @@
|
|||
|
||||
//退出界面
|
||||
submitOut() {
|
||||
this.tLoading = false;
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
|
|
|
@ -64,8 +64,6 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业部门" prop="dept_do">
|
||||
<el-cascader
|
||||
|
@ -84,18 +82,24 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业负责人" prop="charger">
|
||||
<el-input
|
||||
v-model="form.charger_name"
|
||||
style="width:200px"
|
||||
disabled
|
||||
></el-input>
|
||||
<ehsUserSelect :multiple="false" @submit="getCharger"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业监护人" prop="monitor">
|
||||
<el-select v-model="form.monitor" placeholder="选择作业监护人">
|
||||
<el-option
|
||||
v-for="item in useroptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="form.monitor_name"
|
||||
style="width:200px"
|
||||
disabled
|
||||
></el-input>
|
||||
<ehsUserSelect :multiple="false" @submit="getMonitor"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
|
@ -115,12 +119,7 @@
|
|||
<el-input-number v-model="form.power_days" type="text" clearable></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--
|
||||
临时用电 !-->
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
|
||||
|
||||
<el-form-item label="工作类型">
|
||||
<el-select v-model="form.work_type" placeholder="选择工作类型">
|
||||
<el-option
|
||||
|
@ -130,7 +129,6 @@
|
|||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
|
@ -140,13 +138,10 @@
|
|||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="验收时间">
|
||||
|
||||
<el-date-picker
|
||||
v-model="form.accept_time"
|
||||
type="datetime"
|
||||
|
@ -164,7 +159,6 @@
|
|||
<el-input v-model="form.power_to" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电开始">
|
||||
<el-date-picker
|
||||
|
@ -172,7 +166,6 @@
|
|||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
|
@ -182,7 +175,6 @@
|
|||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
|
@ -190,7 +182,6 @@
|
|||
<el-input v-model="form.power_from" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="风险选择">
|
||||
<el-checkbox-group v-model="form.risks_checked">
|
||||
|
@ -212,14 +203,6 @@
|
|||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="逃生路径">
|
||||
<el-input v-model="escape_route" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col> !-->
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="措施选择">
|
||||
<el-checkbox-group v-model="form.measures_checked">
|
||||
|
@ -232,16 +215,13 @@
|
|||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-card class="box-card">
|
||||
<div class="clearfix">
|
||||
<span>应急处置:</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>发生人员触电事故,应迅速切断电源或采用绝缘工器具使触电者脱离电源,判断触电者无意识或心跳、呼吸已停止时,应立即报告,并由经过专业训练或具备相应能力的人员对触电者进行心肺复苏术,直至专业医务人员赶到现场为止。
|
||||
其他应急处置
|
||||
</p>
|
||||
<p>发生人员触电事故,应迅速切断电源或采用绝缘工器具使触电者脱离电源,判断触电者无意识或心跳、呼吸已停止时,应立即报告,并由经过专业训练或具备相应能力的人员对触电者进行心肺复苏术,直至专业医务人员赶到现场为止。其他应急处置</p>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-form-item label="其他应急处置">
|
||||
|
@ -252,23 +232,16 @@
|
|||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业审批照片">
|
||||
<el-input v-model="create_imgs" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
!-->
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-bottom: 20px; text-align:center">
|
||||
<el-button type="primary" plain @click="handleNextStep"
|
||||
>下一步
|
||||
</el-button>
|
||||
<el-button
|
||||
v-preventReClick
|
||||
type="primary" plain
|
||||
@click="handleNextStep"
|
||||
>下一步</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
<!--作业人员!-->
|
||||
<el-main class="nopadding" v-show="active === 1">
|
||||
<div class="left-panel" style="margin: 10px">
|
||||
|
@ -396,7 +369,7 @@
|
|||
<div style="margin-top:20px;text-align:center">
|
||||
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
|
||||
<el-button
|
||||
:loading="tLoading"
|
||||
v-preventReClick
|
||||
v-for=" item in initForm.transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
|
@ -405,12 +378,8 @@
|
|||
>{{item.name}}
|
||||
</el-button>
|
||||
<el-button @click="submitOut" type="warning">退出</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</el-main>
|
||||
|
||||
</el-container>
|
||||
</template>
|
||||
<style scoped>
|
||||
|
@ -539,8 +508,14 @@ export default {
|
|||
this.getDept();
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
getCharger(data) {
|
||||
this.form.charger=data.id;
|
||||
this.form.charger_name=data.name
|
||||
},
|
||||
getMonitor(data) {
|
||||
this.form.monitor=data.id;
|
||||
this.form.monitor_name=data.name;
|
||||
},
|
||||
getoplData() {
|
||||
if (this.oplId == "") {
|
||||
this.getOperation();
|
||||
|
@ -609,11 +584,9 @@ export default {
|
|||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
if (this.active == 0) {
|
||||
// console.log(this.oplId);
|
||||
//如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
this.form.cate = this.oplcateId;
|
||||
this.form.operation = this.operationId;
|
||||
console.log(this.form);
|
||||
|
@ -622,24 +595,18 @@ export default {
|
|||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.oplId = res.id;
|
||||
this.getworkerList(res.id);
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.getworkerList(this.oplId);
|
||||
|
||||
});
|
||||
|
@ -719,9 +686,7 @@ export default {
|
|||
ticket.ticket_data = {opl: this.oplId};
|
||||
ticket.transition = id;
|
||||
ticket.title = this.form.name + '-申请';
|
||||
this.tLoading = true
|
||||
this.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
this.tLoading = false
|
||||
this.$message.success("提交成功");
|
||||
this.submitOut()
|
||||
}).catch(e=>{this.tLoading=false});
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
||||
<el-button type="primary" :loading="isSaveing" :disabled="isSaveing" @click="submit"
|
||||
>保存
|
||||
</el-button
|
||||
>
|
||||
|
@ -191,9 +191,9 @@
|
|||
} else if (this.mode == "edit") {
|
||||
res = await this.$API.rpm.rpj.update.req(this.form.id, this.form);
|
||||
}
|
||||
this.visible = false;
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
} catch (err) {
|
||||
|
|
|
@ -112,6 +112,7 @@
|
|||
<el-button
|
||||
style="margin-top: 20px"
|
||||
type="primary"
|
||||
:loading="isSaveing" :disabled="isSaveing"
|
||||
@click="handleNextStep"
|
||||
>下一步
|
||||
</el-button>
|
||||
|
@ -345,6 +346,8 @@
|
|||
v-for="item in initForm.transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
:loading="isSaveing"
|
||||
:disabled="isSaveing"
|
||||
@click="submitTicketCreate(item.id)"
|
||||
style="margin-right: 4px"
|
||||
>{{ item.name }}</el-button
|
||||
|
@ -393,7 +396,7 @@ export default {
|
|||
stepTitle: ["基本信息", "安全审核项目", "选择人员"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
isSaveing: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
|
@ -434,6 +437,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.rpjId = this.$route.query.rpjid; //作业ID
|
||||
this.isSaveing = false;
|
||||
this.rpartyShow();
|
||||
if (this.rpjId) {
|
||||
this.getRpj();
|
||||
|
@ -495,6 +499,7 @@ export default {
|
|||
if (this.active == 0) {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
if (this.rpjId) {
|
||||
this.$API.rpm.rpj.update
|
||||
.req(this.rpjId, this.rpjform)
|
||||
|
@ -504,6 +509,9 @@ export default {
|
|||
this.getmemberList();
|
||||
this.getremployee();
|
||||
this.active = 1;
|
||||
this.isSaveing = false;
|
||||
}).catch(res=>{
|
||||
this.isSaveing = false;
|
||||
});
|
||||
} else {
|
||||
this.$API.rpm.rpj.create.req(this.rpjform).then((res) => {
|
||||
|
@ -514,6 +522,9 @@ export default {
|
|||
this.getmemberList();
|
||||
this.getremployee();
|
||||
this.active = 1;
|
||||
this.isSaveing = false;
|
||||
}).catch(res=>{
|
||||
this.isSaveing = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -640,6 +651,7 @@ export default {
|
|||
//提交,创建工单
|
||||
submitTicketCreate(id) {
|
||||
let ticket = {};
|
||||
this.isSaveing = true;
|
||||
ticket.title = this.rpjform.name;
|
||||
ticket.workflow = this.initForm.workflow;
|
||||
ticket.ticket_data = { rpj: this.rpjId ,name:this.rpjform.name};
|
||||
|
@ -650,6 +662,8 @@ export default {
|
|||
name: "rpj",
|
||||
query: {},
|
||||
});
|
||||
}).catch(()=>{
|
||||
this.isSaveing = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
@ -111,8 +111,13 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-top:20px;text-align:center">
|
||||
<el-button style="margin-top: 20px" @click="handleNextStep"
|
||||
type="primary">下一步</el-button>
|
||||
<el-button style="margin-top: 20px"
|
||||
@click="handleNextStep"
|
||||
:loading="isSaving"
|
||||
:disabled="isSaving"
|
||||
type="primary">
|
||||
下一步
|
||||
</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
|
||||
|
@ -133,27 +138,11 @@
|
|||
<el-table-column label="#" type="expand">
|
||||
<template #default="scope">
|
||||
<el-descriptions :column="3" style="margin-left:70px">
|
||||
<!-- <el-descriptions-item label="返乡时间:">{{ scope.row.return_date }}</el-descriptions-item> -->
|
||||
<el-descriptions-item label="来源地:">{{ scope.row.come_place }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="行程轨迹:">{{ scope.row.trip_desc }}</el-descriptions-item>
|
||||
<el-descriptions-item label="管控措施:">{{ scope.row.measure }}</el-descriptions-item>
|
||||
<el-descriptions-item label="核酸检测日期:">{{ scope.row.test_date }}</el-descriptions-item> -->
|
||||
<el-descriptions-item label="是否重要访客:">
|
||||
<el-space v-if="scope.row.is_main == true">是</el-space>
|
||||
<el-space v-else>否</el-space>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="健康码:">
|
||||
<el-image style="width: 100px; height: 100px" :src="scope.row.health_code"
|
||||
:preview-src-list="[scope.row.health_code]" fit="cover" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="行程码:">
|
||||
<el-image style="width: 100px; height: 100px" :src="scope.row.travel_code"
|
||||
:preview-src-list="[scope.row.travel_code]" fit="cover" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="核酸报告:">
|
||||
<el-image style="width: 100px; height: 100px" :src="scope.row.test_report"
|
||||
:preview-src-list="[scope.row.test_report]" fit="cover" />
|
||||
</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -314,10 +303,12 @@
|
|||
style="margin-right:4px">上一步</el-button
|
||||
>
|
||||
<span v-for=" item in initform.transitions" :key="item.id">
|
||||
<el-button @click="submitticket(item.id)"
|
||||
style="margin-right:4px" type="primary">{{item.name}}</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
:loading="isSaving"
|
||||
:disabled="isSaving"
|
||||
@click="submitticket(item.id)"
|
||||
style="margin-right:4px" type="primary"
|
||||
>{{item.name}}</el-button>
|
||||
</span>
|
||||
<el-button @click="submitOut" type="warning">退出</el-button>
|
||||
</div>
|
||||
|
@ -438,6 +429,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.visitid = this.$route.query.visitid; //作业ID
|
||||
this.isSaving = false;
|
||||
if(this.visitid){
|
||||
this.getRpj();
|
||||
this.getpeoplelistlist();
|
||||
|
@ -486,6 +478,7 @@ export default {
|
|||
if (this.active == 0) {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaving = true;
|
||||
if(this.visitid){
|
||||
this.$API.vm.visit.update
|
||||
.req(this.visitid, this.form)
|
||||
|
@ -493,6 +486,9 @@ export default {
|
|||
this.$message.success("基本信息更新成功");
|
||||
this.getInit();
|
||||
this.active = 1;
|
||||
this.isSaving = false;
|
||||
}).catch(()=>{
|
||||
this.isSaving = false;
|
||||
})
|
||||
}else{
|
||||
this.$API.vm.visit.create.req(this.form).then(res=>{
|
||||
|
@ -500,9 +496,11 @@ export default {
|
|||
this.$message.success("项目创建成功");
|
||||
this.getInit();
|
||||
this.active = 1;
|
||||
this.isSaving = false;
|
||||
}).catch(()=>{
|
||||
this.isSaving = false;
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -586,6 +584,7 @@ export default {
|
|||
//提交工单
|
||||
submitticket(id){
|
||||
this.ticket={};
|
||||
this.isSaving = true;
|
||||
this.ticket.title = this.form.name;
|
||||
this.ticket.workflow=this.initform.workflow;
|
||||
this.ticket.ticket_data={visit:this.visitid,name:this.form.name};
|
||||
|
@ -596,8 +595,9 @@ export default {
|
|||
name: "visit",
|
||||
query: {},
|
||||
});
|
||||
}).catch(()=>{
|
||||
this.isSaving = false;
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue