前端页面优化
This commit is contained in:
parent
50f025455a
commit
f40bee35be
|
|
@ -16,8 +16,8 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="关键词搜索" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-input v-model="query.search" placeholder="关键词搜索" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
this.selection = selection;
|
||||
},
|
||||
//搜索
|
||||
upsearch(){
|
||||
handleQuery(){
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,56 @@
|
|||
<template>
|
||||
<!--基本信息!-->
|
||||
<el-form
|
||||
<el-main v-loading="mainLoading">
|
||||
|
||||
<el-card shadow="hover">
|
||||
<el-descriptions title="许可证信息" column=2>
|
||||
<el-descriptions-item label="编号:">
|
||||
{{ form.number }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="作业级别:">
|
||||
{{ form.level }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预计开始:">
|
||||
{{ form.start_time }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预计结束:">
|
||||
{{ form.end_time }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态:">
|
||||
<span v-if="form.ticket_&&form.ticket_.state_" style="margin-right: 5px;">{{form.ticket_.state_.name }}</span>
|
||||
<el-tag
|
||||
v-if="form.ticket_&&form.ticket_.act_state"
|
||||
:type="form.ticket_.act_state===0?'':form.ticket_.act_state===1?'':form.ticket_.act_state===2?'danger':form.ticket_.act_state===3?'danger':form.ticket_.act_state===5?'danger':form.ticket_.act_state===4?'success':''"
|
||||
>{{act_states[form.ticket_.act_state]}}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="作业部门:">
|
||||
<span v-if="form.dept_do_">{{
|
||||
form.dept_do_.name
|
||||
}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="作业负责人:">
|
||||
<span v-if="form.charger_">{{
|
||||
form.charger_.name
|
||||
}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="作业监护人:">
|
||||
<span v-if="form.monitor_">{{
|
||||
form.monitor_.name
|
||||
}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="风险分析:" span=2>
|
||||
<span v-for="item in form.risks_checked_" :key="item.id">{{
|
||||
item.name
|
||||
}}<el-divider direction="vertical"></el-divider></span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="控制措施:" span=2>
|
||||
<span v-for="item in form.measures_checked_" :key="item.id">{{
|
||||
item.name
|
||||
}}<el-divider direction="vertical"></el-divider></span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<!-- <el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
|
|
@ -133,10 +183,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-card>
|
||||
<div>作业人员</div>
|
||||
<!--作业人员!-->
|
||||
</el-form> -->
|
||||
<el-card header="作业人员" style="margin-top:8px" shadow="hover">
|
||||
<scTable
|
||||
ref="workerTable"
|
||||
:data="apiworkerObj"
|
||||
|
|
@ -173,17 +221,15 @@
|
|||
prop="create_time"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-button text type="primary" size="small" @click="bltHandle(scope.row,'1')">绑卡</el-button>
|
||||
<!--<el-button text type="primary" size="small" @click="bltHandle(scope.row,'0')">解绑</el-button>-->
|
||||
<el-button text type="primary" size="small" @click="bltHandle(scope.row,'0')">解绑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</scTable>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div>气体检测记录</div>
|
||||
<!--气体检测记录!-->
|
||||
<el-card header="气体检测记录" style="margin-top: 8px" shadow="hover">
|
||||
<scTable
|
||||
ref="gasTable"
|
||||
:data="apigasObj"
|
||||
|
|
@ -194,7 +240,6 @@
|
|||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
|
|
@ -240,6 +285,7 @@
|
|||
></el-table-column>
|
||||
</scTable>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
@ -251,6 +297,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
mainLoading: false,
|
||||
active: 0,
|
||||
stepSuc: [0],
|
||||
stepTitle: ["基本信息", "作业人员", "气体检测记录"],
|
||||
|
|
@ -298,17 +345,23 @@
|
|||
true: "正常",
|
||||
false: "不正常",
|
||||
},
|
||||
act_states: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
3: "被撤回",
|
||||
4: "已完成",
|
||||
5: "已关闭",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
that.oplId = that.id; //许可证ID
|
||||
this.$nextTick(()=>{
|
||||
debugger;
|
||||
console.log("this.getData");
|
||||
that.getOplData();
|
||||
that.getDept();
|
||||
that.getUser();
|
||||
// that.getDept();
|
||||
// that.getUser();
|
||||
that.getworkerList();
|
||||
that.getgasList();
|
||||
})
|
||||
|
|
@ -316,48 +369,49 @@
|
|||
methods: {
|
||||
//根据oplId,查许可证
|
||||
getOplData() {
|
||||
debugger;
|
||||
this.mainLoading = true
|
||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||
this.mainLoading = false
|
||||
this.form = res;
|
||||
this.oplcateId = res.cate;
|
||||
this.operationId = res.operation;
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
});
|
||||
// this.oplcateId = res.cate;
|
||||
// this.operationId = res.operation;
|
||||
// this.getOperation();
|
||||
// this.getOplcates();
|
||||
}).catch(e=>{this.mainLoading=false});
|
||||
},
|
||||
|
||||
//根据作业许可证类别ID获取,风险、措施===>作业许可证类别详情
|
||||
getOplcates() {
|
||||
debugger;
|
||||
this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
|
||||
console.log(res); //
|
||||
this.pagtitle = res.name;
|
||||
this.oplcateCode = res.code;
|
||||
this.risklist = res.risk_options_; //风险缝隙
|
||||
this.measurelist = res.measure_options_; //控制措施
|
||||
});
|
||||
},
|
||||
// //根据作业许可证类别ID获取,风险、措施===>作业许可证类别详情
|
||||
// getOplcates() {
|
||||
// debugger;
|
||||
// this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
|
||||
// console.log(res); //
|
||||
// this.pagtitle = res.name;
|
||||
// this.oplcateCode = res.code;
|
||||
// this.risklist = res.risk_options_; //风险缝隙
|
||||
// this.measurelist = res.measure_options_; //控制措施
|
||||
// });
|
||||
// },
|
||||
|
||||
//根据operationId,查作业信息
|
||||
getOperation() {
|
||||
this.$API.opm.operation.read.req(this.operationId).then((res) => {
|
||||
this.form.start_time = res.start_time; //作业开始时间
|
||||
this.form.end_time = res.end_time; //作业结束时间
|
||||
this.form.name = res.name; //作业结束时间
|
||||
});
|
||||
},
|
||||
//作业部门
|
||||
getDept() {
|
||||
this.$API.system.dept.list.req({page: 0}).then((res) => {
|
||||
this.deptoptions = genTree(res);
|
||||
});
|
||||
},
|
||||
//作业负责人、作业监护人
|
||||
getUser() {
|
||||
this.$API.system.user.list.req({page: 0}).then((res) => {
|
||||
this.useroptions = res;
|
||||
});
|
||||
},
|
||||
// //根据operationId,查作业信息
|
||||
// getOperation() {
|
||||
// this.$API.opm.operation.read.req(this.operationId).then((res) => {
|
||||
// this.form.start_time = res.start_time; //作业开始时间
|
||||
// this.form.end_time = res.end_time; //作业结束时间
|
||||
// this.form.name = res.name; //作业结束时间
|
||||
// });
|
||||
// },
|
||||
// //作业部门
|
||||
// getDept() {
|
||||
// this.$API.system.dept.list.req({page: 0}).then((res) => {
|
||||
// this.deptoptions = genTree(res);
|
||||
// });
|
||||
// },
|
||||
// //作业负责人、作业监护人
|
||||
// getUser() {
|
||||
// this.$API.system.user.list.req({page: 0}).then((res) => {
|
||||
// this.useroptions = res;
|
||||
// });
|
||||
// },
|
||||
//作业人员列表
|
||||
getworkerList(id) {
|
||||
this.$API.opm.worker.list.req({opl: id, page: 0}).then((res) => {
|
||||
|
|
@ -370,14 +424,6 @@
|
|||
this.apigasObj = res;
|
||||
});
|
||||
},
|
||||
bltHandle(item,index){
|
||||
if(index==='1'){
|
||||
//绑卡
|
||||
}else{
|
||||
//解绑
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -59,15 +59,15 @@
|
|||
<el-header style="border-bottom: none">
|
||||
<div class="left-panel">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
v-model="query.search"
|
||||
placeholder="姓名"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
|
|
@ -140,9 +140,6 @@
|
|||
apiObj: [],
|
||||
query: {},
|
||||
selection: [],
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
filterText: "",
|
||||
filterTexts: "",
|
||||
deptdata: [],
|
||||
|
|
@ -209,9 +206,9 @@
|
|||
this.apiObj = res;
|
||||
});
|
||||
},
|
||||
upsearch() {
|
||||
handleQuery() {
|
||||
this.$API.system.user.list
|
||||
.req({name: this.search.keyword, page: 0})
|
||||
.req(this.query)
|
||||
.then((res) => {
|
||||
this.apiObj = res;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ const routes = [
|
|||
"name": "eventhandlefrom",
|
||||
"path": "/ecm/event_handlefrom",
|
||||
"meta": {
|
||||
"title": "处理作业",
|
||||
"title": "处理事件",
|
||||
"icon": "el-icon-menu",
|
||||
"hidden": true,
|
||||
},
|
||||
|
|
@ -602,14 +602,14 @@ const routes = [
|
|||
}
|
||||
,
|
||||
{
|
||||
"name": "certificates",
|
||||
"path": "/hrm/certificates",
|
||||
"name": "certificate",
|
||||
"path": "/hrm/certificate",
|
||||
"meta": {
|
||||
"title": "证书列表",
|
||||
"icon": "el-icon-tickets",
|
||||
"perms": ["certificates"]
|
||||
"perms": ["certificate"]
|
||||
},
|
||||
"component": "hrm/certificates"
|
||||
"component": "hrm/certificate"
|
||||
}
|
||||
,
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div class="user-bar">
|
||||
<div class="panel-item hidden-sm-and-down" @click="search">
|
||||
<!-- <div class="panel-item hidden-sm-and-down" @click="search">
|
||||
<el-icon><el-icon-search /></el-icon>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="screen panel-item hidden-sm-and-down" @click="screen">
|
||||
<el-icon><el-icon-full-screen /></el-icon>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -69,12 +69,12 @@
|
|||
v-model="search.keyword"
|
||||
placeholder="姓名"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
|
|
@ -227,7 +227,7 @@ export default {
|
|||
this.apiObj = res;
|
||||
});
|
||||
},
|
||||
upsearch() {
|
||||
handleQuery() {
|
||||
this.$API.system.user.list
|
||||
.req({ name: this.search.keyword, page: 0 })
|
||||
.then((res) => {
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@
|
|||
border-left: 1px solid var(--el-border-color-light);
|
||||
}
|
||||
|
||||
.el-divider--horizontal {
|
||||
margin: 12px 0;
|
||||
}
|
||||
.el-header {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid var(--el-border-color-light);
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@
|
|||
v-model="search.keyword"
|
||||
placeholder="姓名/手机号"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -170,12 +170,12 @@
|
|||
v-model="search.keyword"
|
||||
placeholder="姓名/手机号"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -432,7 +432,7 @@ export default {
|
|||
},
|
||||
|
||||
//搜索
|
||||
upsearch() {},
|
||||
handleQuery() {},
|
||||
|
||||
//根据ID获取树结构
|
||||
filterTree(id) {
|
||||
|
|
|
|||
|
|
@ -12,15 +12,15 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
v-model="query.search"
|
||||
placeholder="编号"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
|
|
@ -157,7 +157,9 @@ export default {
|
|||
},
|
||||
|
||||
//搜索
|
||||
upsearch() {},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="姓名/手机号" clearable @click="upsearch"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-input v-model="query.search" placeholder="姓名/手机号" clearable @click="handleQuery"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header> -->
|
||||
|
|
@ -160,7 +160,9 @@ export default {
|
|||
|
||||
},
|
||||
//搜索
|
||||
upsearch() {},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
//本地更新数据
|
||||
|
||||
resetQuery() {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<!--<sc-title title="详细信息"></sc-title>-->
|
||||
<el-main>
|
||||
<el-card>
|
||||
<el-descriptions title="事件基本信息" :border="true">
|
||||
<el-descriptions title="事件信息" :border="true">
|
||||
<el-descriptions-item label="事件种类"><el-tag
|
||||
v-for="item in form.cates_"
|
||||
:key="item.id"
|
||||
|
|
@ -74,6 +74,7 @@
|
|||
fit
|
||||
stripe
|
||||
hidePagination
|
||||
hideRefresh
|
||||
>
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="事件种类" width="200">
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="姓名/手机号" clearable @click="upsearch"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-input v-model="search.keyword" placeholder="姓名/手机号" clearable @click="handleQuery"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header> -->
|
||||
|
|
@ -136,7 +136,7 @@ export default {
|
|||
|
||||
},
|
||||
//搜索
|
||||
upsearch() {},
|
||||
handleQuery() {},
|
||||
//本地更新数据
|
||||
|
||||
resetQuery() {
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="姓名/手机号"
|
||||
v-model="query.search"
|
||||
placeholder="证书名称/编号"
|
||||
clearable
|
||||
|
||||
></el-input>
|
||||
|
|
@ -39,13 +39,24 @@
|
|||
>
|
||||
|
||||
<el-table-column label="#" fixed="left" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="证书名称" fixed="left" prop="name" width="150"></el-table-column>
|
||||
<el-table-column label="人员" prop="employee_name"></el-table-column>
|
||||
<el-table-column label="证书名称" fixed="left" prop="name" width="150">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
v-if="scope.row.file"
|
||||
:href="scope.row.file"
|
||||
type="primary"
|
||||
target="_blank"
|
||||
>{{ scope.row.name }}</el-link
|
||||
>
|
||||
<span v-else>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="证书编号" prop="number" width="200"> </el-table-column>
|
||||
<el-table-column label="证书类型" prop="type" width="200"><template #default="scope">{{type_[scope.row.type]}} </template></el-table-column>
|
||||
<el-table-column label="发证日期" prop="issue_date" width="180"></el-table-column>
|
||||
<el-table-column label="有效期" prop="expiration_date" width="200"> </el-table-column>
|
||||
<el-table-column label="下一次复审日期" prop="review_date" width="180"></el-table-column>
|
||||
<el-table-column label="证书文件" prop="file" width="180"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
|
|
@ -65,7 +76,7 @@
|
|||
</el-main>
|
||||
</el-container>
|
||||
|
||||
<sc-dialog v-model="dialogcart" draggable title="创建人员证书">
|
||||
<sc-dialog v-model="dialogcart" draggable title="人员证书">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
|
|
@ -74,6 +85,14 @@
|
|||
label-width="120px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="24">
|
||||
<el-form-item label="所属人员" prop="employee">
|
||||
<el-input
|
||||
v-model="form.employee_name"
|
||||
disabled
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="证书名称" prop="name">
|
||||
<el-input
|
||||
|
|
@ -136,15 +155,14 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="上传证书文件">
|
||||
<el-form-item label="上传证书">
|
||||
<sc-upload-file
|
||||
v-model="form.file"
|
||||
:limit="5"
|
||||
:data="{ otherData: 'demo' }"
|
||||
tip="最多上传3个文件,单个文件不要超过10M,请上传xlsx/docx格式文件"
|
||||
:multiple="false"
|
||||
accept="image/png, image/jpeg, image/jpeg, pdf"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-upload"
|
||||
>上传附件</el-button
|
||||
>上传</el-button
|
||||
>
|
||||
</sc-upload-file>
|
||||
</el-form-item>
|
||||
|
|
@ -207,6 +225,9 @@ export default {
|
|||
|
||||
}
|
||||
},
|
||||
handleQuery(){
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
//证书列表
|
||||
getcertificatelist() {
|
||||
this.$API.hrm.certificate.list
|
||||
|
|
|
|||
|
|
@ -2,7 +2,12 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
v-auth="'certificate.create'"
|
||||
@click="handleForm('add')"
|
||||
></el-button>
|
||||
<!--
|
||||
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
||||
|
|
@ -10,8 +15,8 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="姓名/手机号"
|
||||
v-model="query.search"
|
||||
placeholder="证书名称/编号"
|
||||
clearable
|
||||
|
||||
></el-input>
|
||||
|
|
@ -189,6 +194,9 @@ export default {
|
|||
|
||||
}
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
//证书列表
|
||||
getcertificatelist() {
|
||||
this.$API.hrm.certificate.list
|
||||
|
|
|
|||
|
|
@ -15,15 +15,15 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
v-model="query.search"
|
||||
placeholder="姓名/手机号"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -37,10 +37,13 @@
|
|||
stripe
|
||||
@resetQuery="resetQuery"
|
||||
>
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<!-- <el-table-column type="selection" width="50"></el-table-column> -->
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" width="150"></el-table-column>
|
||||
<el-table-column label="证件照" prop="photo" width="200">
|
||||
<el-table-column label="姓名" prop="name"></el-table-column>
|
||||
<el-table-column label="证件照" prop="photo">
|
||||
<template #default="scope">
|
||||
<sc-upload v-if="scope.row.photo" v-model="scope.row.photo" :disabled="true" width="70" height="80"></sc-upload>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="手机号"
|
||||
|
|
@ -59,23 +62,23 @@
|
|||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
text
|
||||
<!-- <el-button
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="Addcertificate(scope.row)"
|
||||
v-auth="'employee.update'"
|
||||
>绑定证书
|
||||
</el-button>
|
||||
>证书
|
||||
</el-button> -->
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="success"
|
||||
size="small"
|
||||
@click="handleForm('show', scope.row)"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="warning"
|
||||
size="small"
|
||||
v-auth="'employee.update'"
|
||||
|
|
@ -84,19 +87,19 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.blt_"
|
||||
text
|
||||
type="primary"
|
||||
link
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="handleBindBlt(20, scope.row)"
|
||||
>解绑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
text
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleBindBlt(10, scope.row)"
|
||||
>绑定
|
||||
>绑卡
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -178,14 +181,14 @@
|
|||
},
|
||||
methods: {
|
||||
//人员证书添加
|
||||
Addcertificate(row) {
|
||||
this.$router.push({
|
||||
name: "certificate",
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
});
|
||||
},
|
||||
// Addcertificate(row) {
|
||||
// this.$router.push({
|
||||
// name: "certificate",
|
||||
// query: {
|
||||
// id: row.id,
|
||||
// },
|
||||
// });
|
||||
// },
|
||||
//添加
|
||||
handleForm(type, row) {
|
||||
this.dialog.save = true;
|
||||
|
|
@ -270,7 +273,8 @@
|
|||
}, 500);
|
||||
},
|
||||
//搜索
|
||||
upsearch() {
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
//根据ID获取树结构
|
||||
filterTree(id) {
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="签名照">
|
||||
<sc-upload v-model="form.signature" title="签名照"></sc-upload>
|
||||
<el-form-item label="签名">
|
||||
<sc-upload v-model="form.signature" title="签名"></sc-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
|
|||
|
|
@ -9,15 +9,15 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
v-model="query.search"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -33,7 +33,6 @@
|
|||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
|
|
@ -41,67 +40,54 @@
|
|||
label="作业简介"
|
||||
prop="name"
|
||||
width="200"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column label="作业状态" prop="state" width="180" fixed="left">
|
||||
<el-table-column label="作业状态" prop="state">
|
||||
<template #default="scope">{{stateoptions[scope.row.state]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="生产状态"
|
||||
prop="state_work"
|
||||
width="180"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="具体地点"
|
||||
prop="place"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业开始时间"
|
||||
prop="start_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业结束时间"
|
||||
prop="end_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业区域"
|
||||
prop="area"
|
||||
width="180"
|
||||
><template #default="scope">
|
||||
{{scope.row.area_.name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="预计开始"
|
||||
prop="start_time"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="预计结束"
|
||||
prop="end_time"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="属地部门"
|
||||
prop="dept_ter"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
><template #default="scope">
|
||||
{{scope.row.dept_ter_.name}}
|
||||
</template></el-table-column>
|
||||
<el-table-column
|
||||
label="业务部门"
|
||||
prop="dept_bus"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="业务部门协调员"
|
||||
prop="coordinator"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
><template #default="scope">
|
||||
{{scope.row.dept_bus_.name}}
|
||||
</template></el-table-column>
|
||||
<el-table-column
|
||||
label="创建人"
|
||||
prop="create_by"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
><template #default="scope">
|
||||
{{scope.row.create_by_.name}}
|
||||
</template></el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="170">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
v-auth="'operation.update'"
|
||||
|
|
@ -109,7 +95,7 @@
|
|||
>许可证
|
||||
</el-button>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
|
|
@ -117,7 +103,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.state === 10"
|
||||
text
|
||||
link
|
||||
type="warning"
|
||||
size="small"
|
||||
v-auth="'operation.update'"
|
||||
|
|
@ -125,7 +111,7 @@
|
|||
>编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="danger"
|
||||
size="small"
|
||||
v-if="scope.row.state === 10"
|
||||
|
|
@ -133,7 +119,6 @@
|
|||
@click="table_del(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
@ -247,7 +232,7 @@
|
|||
}, 500);
|
||||
},
|
||||
//搜索
|
||||
upsearch() {
|
||||
handleQuery() {
|
||||
},
|
||||
//根据ID获取树结构
|
||||
filterTree(id) {
|
||||
|
|
|
|||
|
|
@ -1,468 +1,469 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
style="margin: 3px 0px 0px 10px"
|
||||
v-for="(item, index) in oplcateList"
|
||||
:key="index"
|
||||
:title="item.name"
|
||||
type="primary"
|
||||
v-auth="'opl.create'"
|
||||
@click="addFire(item.id, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card>
|
||||
<el-descriptions title="作业详情" :column="3">
|
||||
<el-descriptions-item label="作业名称:">
|
||||
{{operationObj.name}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="具体地点:">
|
||||
{{operationObj.place }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="生产状态:">
|
||||
{{operationObj.state_work }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态:">
|
||||
{{state_[operationObj.state] }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开始时间:">
|
||||
{{operationObj.start_time }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="结束时间:">
|
||||
{{operationObj.end_time }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="apiObj"
|
||||
row-key="id"
|
||||
@selection-change="selectionChange"
|
||||
stripe
|
||||
@resetQuery="resetQuery"
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
type="index"
|
||||
width="50"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业许可编号"
|
||||
prop="number"
|
||||
width="120"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业级别"
|
||||
prop="level"
|
||||
width="120"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="许可证种类"
|
||||
prop="cate_name"
|
||||
width="120"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业开始时间"
|
||||
prop="start_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业结束时间"
|
||||
prop="end_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业部门"
|
||||
prop="dept_do"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业负责人"
|
||||
prop="charger"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业监护人"
|
||||
prop="monitor"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-main v-loading="mainLoading">
|
||||
<el-card>
|
||||
<el-descriptions title="作业详情" :column="3">
|
||||
<el-descriptions-item label="作业名称:">
|
||||
{{ operationObj.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="作业区域:">
|
||||
<span v-if="operationObj.area_">{{ operationObj.area_.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="生产状态:">
|
||||
{{ operationObj.state_work }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态:">
|
||||
{{ state_[operationObj.state] }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预计开始:">
|
||||
{{ operationObj.start_time }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预计结束:">
|
||||
{{ operationObj.end_time }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="属地部门:">
|
||||
<span v-if="operationObj.dept_ter_">{{
|
||||
operationObj.dept_ter_.name
|
||||
}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="业务部门:">
|
||||
<span v-if="operationObj.dept_bus_">{{
|
||||
operationObj.dept_bus_.name
|
||||
}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="协调员:">
|
||||
<span v-if="operationObj.coordinator_">{{
|
||||
operationObj.coordinator_.name
|
||||
}}</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
|
||||
<el-table-column label="操作" fixed="right" align="right" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="operationObj.state===10"
|
||||
text
|
||||
type="warning"
|
||||
size="small"
|
||||
v-auth="'opl.update'"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
>编辑
|
||||
</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-drawer :size="'50%'" v-model="showLimited" :title="oplName+'作业许可证详情'">
|
||||
<sc-fire :id="oplId"></sc-fire>
|
||||
</el-drawer>
|
||||
</el-container>
|
||||
<el-card header="许可证" style="margin-top: 8px">
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
style="margin: 3px 0px 0px 10px"
|
||||
v-for="(item, index) in oplcateList"
|
||||
:key="index"
|
||||
:title="item.name"
|
||||
type="primary"
|
||||
v-auth="'opl.create'"
|
||||
@click="addFire(item.id, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-button>
|
||||
</div>
|
||||
<el-divider />
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="apiObj"
|
||||
row-key="id"
|
||||
@selection-change="selectionChange"
|
||||
stripe
|
||||
hidePagination
|
||||
hideRefresh
|
||||
@resetQuery="resetQuery"
|
||||
>
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column
|
||||
label="作业许可编号"
|
||||
prop="number"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column label="作业级别" prop="level"></el-table-column>
|
||||
<el-table-column label="许可证种类" prop="cate_name"></el-table-column>
|
||||
<el-table-column label="流程状态" width="160">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.ticket">{{ scope.row.ticket_.state_.name }}
|
||||
-{{act_states[scope.row.ticket_.act_state]}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预计开始" prop="start_time" width="150"></el-table-column>
|
||||
<el-table-column label="作业部门" prop="dept_do"
|
||||
><template #default="scope">
|
||||
{{ scope.row.dept_do_.name }}
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column label="作业负责人" prop="charger"
|
||||
><template #default="scope">
|
||||
{{ scope.row.charger_.name }}
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column label="作业监护人" prop="monitor"
|
||||
><template #default="scope">
|
||||
{{ scope.row.monitor_.name }}
|
||||
</template></el-table-column
|
||||
>
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="80">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="operationObj.state === 10"
|
||||
text
|
||||
type="warning"
|
||||
size="small"
|
||||
v-auth="'opl.update'"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
>编辑
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-card>
|
||||
<el-drawer
|
||||
:size="'50%'"
|
||||
v-model="showLimited"
|
||||
:title="oplName + '作业许可证详情'"
|
||||
>
|
||||
<sc-fire :id="oplId"></sc-fire>
|
||||
</el-drawer>
|
||||
</el-main>
|
||||
</template>
|
||||
<script>
|
||||
import ScFire from "../../components/scOpl/scFire";
|
||||
import ScFire from "../../components/scOpl/scFire";
|
||||
|
||||
export default {
|
||||
name: "opl",
|
||||
components: {ScFire},
|
||||
data() {
|
||||
return {
|
||||
dialog: {
|
||||
save: false,
|
||||
permission: false,
|
||||
export default {
|
||||
name: "opl",
|
||||
components: { ScFire },
|
||||
data() {
|
||||
return {
|
||||
dialog: {
|
||||
save: false,
|
||||
permission: false,
|
||||
},
|
||||
mainLoading: false,
|
||||
apiObj: [],
|
||||
query: {},
|
||||
selection: [],
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
oplcateList: {},
|
||||
operationObj: {},
|
||||
showLimited: false,
|
||||
oplId: "",
|
||||
state_: {
|
||||
10: "创建中",
|
||||
20: "审批中",
|
||||
30: "待入厂",
|
||||
40: "进行中",
|
||||
50: "已完成",
|
||||
},
|
||||
act_states: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
3: "被撤回",
|
||||
4: "已完成",
|
||||
5: "已关闭",
|
||||
},
|
||||
apiObj: [],
|
||||
query: {},
|
||||
selection: [],
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
oplcateList: {},
|
||||
operationObj: {},
|
||||
showLimited: false,
|
||||
oplId: '',
|
||||
state_: {
|
||||
10: "创建中",
|
||||
20: "审批中",
|
||||
30: "待入厂",
|
||||
40: "进行中",
|
||||
50: "已完成",
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getoplcate();
|
||||
this.getopllist();
|
||||
this.getOperation();
|
||||
},
|
||||
methods: {
|
||||
getOperation(){
|
||||
this.$API.opm.operation.read.req(this.$route.query.id).then((res) => {
|
||||
debugger;
|
||||
this.operationObj = res;
|
||||
});
|
||||
},
|
||||
//作业许可证列表
|
||||
getopllist() {
|
||||
this.$API.opm.opl.list.req({operation: this.$route.query.id, page: 0}).then((res) => {
|
||||
this.apiObj = res;
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.getoplcate();
|
||||
this.getopllist();
|
||||
this.getOperation();
|
||||
},
|
||||
methods: {
|
||||
getOperation() {
|
||||
this.mainLoading = true;
|
||||
this.$API.opm.operation.read
|
||||
.req(this.$route.query.id)
|
||||
.then((res) => {
|
||||
this.mainLoading = false;
|
||||
this.operationObj = res;
|
||||
})
|
||||
.catch((e) => {
|
||||
this.mainLoading = false;
|
||||
});
|
||||
},
|
||||
//作业许可证列表
|
||||
getopllist() {
|
||||
this.$API.opm.opl.list
|
||||
.req({ operation: this.$route.query.id, page: 0 })
|
||||
.then((res) => {
|
||||
this.apiObj = res;
|
||||
});
|
||||
},
|
||||
|
||||
//作业许可证类型列表
|
||||
getoplcate() {
|
||||
this.$API.opm.oplcate.list.req({page: 0}).then((res) => {
|
||||
this.oplcateList = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业许可证类型列表
|
||||
getoplcate() {
|
||||
this.$API.opm.oplcate.list.req({ page: 0 }).then((res) => {
|
||||
this.oplcateList = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
|
||||
//点击作业类型,创建作业许可证添加
|
||||
addFire(id, name) {
|
||||
switch (name) {
|
||||
case "动火":
|
||||
this.$router.push({
|
||||
name: "fire",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "有限空间":
|
||||
this.$router.push({
|
||||
name: "space",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "清库":
|
||||
this.$router.push({
|
||||
name: "clear",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "高处":
|
||||
this.$router.push({
|
||||
name: "high",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "吊装":
|
||||
this.$router.push({
|
||||
name: "hoisting",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "预热器清堵":
|
||||
this.$router.push({
|
||||
name: "preheat",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "篦冷机清大块":
|
||||
this.$router.push({
|
||||
name: "cooler",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "动土":
|
||||
this.$router.push({
|
||||
name: "soil",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "临时用电":
|
||||
this.$router.push({
|
||||
name: "usecl",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
switch (row.cate_name) {
|
||||
case "动火":
|
||||
this.$router.push({
|
||||
name: "fire",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "有限空间":
|
||||
this.$router.push({
|
||||
name: "space",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "清库":
|
||||
this.$router.push({
|
||||
name: "clear",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "高处":
|
||||
this.$router.push({
|
||||
name: "high",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "吊装":
|
||||
this.$router.push({
|
||||
name: "hoisting",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "预热器清堵":
|
||||
this.$router.push({
|
||||
name: "preheat",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "篦冷机清大块":
|
||||
this.$router.push({
|
||||
name: "cooler",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "动土":
|
||||
this.$router.push({
|
||||
name: "soil",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "临时用电":
|
||||
this.$router.push({
|
||||
name: "usecl",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.showLimited = true;
|
||||
this.oplId = row.id;
|
||||
this.oplName = row.cate_name;
|
||||
this.workId = row.workers[0];
|
||||
},
|
||||
//权限设置
|
||||
permission() {
|
||||
this.dialog.permission = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.permissionDialog.open();
|
||||
});
|
||||
},
|
||||
//删除
|
||||
async table_del(row) {
|
||||
var reqData = {id: row.id};
|
||||
var res = await this.$API.demo.post.post(reqData);
|
||||
if (res.code == 200) {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
} else {
|
||||
this.$alert(res.message, "提示", {type: "error"});
|
||||
}
|
||||
},
|
||||
//批量删除
|
||||
async batch_del() {
|
||||
this.$confirm(
|
||||
`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`,
|
||||
"提示",
|
||||
{
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
const loading = this.$loading();
|
||||
this.$refs.table.refresh();
|
||||
loading.close();
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection) {
|
||||
this.selection = selection;
|
||||
},
|
||||
//表格内开关
|
||||
changeSwitch(val, row) {
|
||||
row.status = row.status == "1" ? "0" : "1";
|
||||
row.$switch_status = true;
|
||||
setTimeout(() => {
|
||||
delete row.$switch_status;
|
||||
row.status = val;
|
||||
this.$message.success("操作成功");
|
||||
}, 500);
|
||||
},
|
||||
//搜索
|
||||
upsearch() {
|
||||
},
|
||||
//根据ID获取树结构
|
||||
filterTree(id) {
|
||||
var target = null;
|
||||
//点击作业类型,创建作业许可证添加
|
||||
addFire(id, name) {
|
||||
switch (name) {
|
||||
case "动火":
|
||||
this.$router.push({
|
||||
name: "fire",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "有限空间":
|
||||
this.$router.push({
|
||||
name: "space",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "清库":
|
||||
this.$router.push({
|
||||
name: "clear",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "高处":
|
||||
this.$router.push({
|
||||
name: "high",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "吊装":
|
||||
this.$router.push({
|
||||
name: "hoisting",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "预热器清堵":
|
||||
this.$router.push({
|
||||
name: "preheat",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "篦冷机清大块":
|
||||
this.$router.push({
|
||||
name: "cooler",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "动土":
|
||||
this.$router.push({
|
||||
name: "soil",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "临时用电":
|
||||
this.$router.push({
|
||||
name: "usecl",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业ID
|
||||
oplcateId: id, //许可证类型ID
|
||||
oplId: "", //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
switch (row.cate_name) {
|
||||
case "动火":
|
||||
this.$router.push({
|
||||
name: "fire",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "有限空间":
|
||||
this.$router.push({
|
||||
name: "space",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "清库":
|
||||
this.$router.push({
|
||||
name: "clear",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "高处":
|
||||
this.$router.push({
|
||||
name: "high",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "吊装":
|
||||
this.$router.push({
|
||||
name: "hoisting",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "预热器清堵":
|
||||
this.$router.push({
|
||||
name: "preheat",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "篦冷机清大块":
|
||||
this.$router.push({
|
||||
name: "cooler",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "动土":
|
||||
this.$router.push({
|
||||
name: "soil",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "临时用电":
|
||||
this.$router.push({
|
||||
name: "usecl",
|
||||
query: {
|
||||
oplId: row.id, //许可证ID
|
||||
},
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.showLimited = true;
|
||||
this.oplId = row.id;
|
||||
this.oplName = row.cate_name;
|
||||
this.workId = row.workers[0];
|
||||
},
|
||||
//权限设置
|
||||
permission() {
|
||||
this.dialog.permission = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.permissionDialog.open();
|
||||
});
|
||||
},
|
||||
//删除
|
||||
async table_del(row) {
|
||||
var reqData = { id: row.id };
|
||||
var res = await this.$API.demo.post.post(reqData);
|
||||
if (res.code == 200) {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
} else {
|
||||
this.$alert(res.message, "提示", { type: "error" });
|
||||
}
|
||||
},
|
||||
//批量删除
|
||||
async batch_del() {
|
||||
this.$confirm(
|
||||
`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`,
|
||||
"提示",
|
||||
{
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
const loading = this.$loading();
|
||||
this.$refs.table.refresh();
|
||||
loading.close();
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection) {
|
||||
this.selection = selection;
|
||||
},
|
||||
//表格内开关
|
||||
changeSwitch(val, row) {
|
||||
row.status = row.status == "1" ? "0" : "1";
|
||||
row.$switch_status = true;
|
||||
setTimeout(() => {
|
||||
delete row.$switch_status;
|
||||
row.status = val;
|
||||
this.$message.success("操作成功");
|
||||
}, 500);
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {},
|
||||
//根据ID获取树结构
|
||||
filterTree(id) {
|
||||
var target = null;
|
||||
|
||||
function filter(tree) {
|
||||
tree.forEach((item) => {
|
||||
if (item.id == id) {
|
||||
target = item;
|
||||
}
|
||||
if (item.children) {
|
||||
filter(item.children);
|
||||
}
|
||||
});
|
||||
}
|
||||
function filter(tree) {
|
||||
tree.forEach((item) => {
|
||||
if (item.id == id) {
|
||||
target = item;
|
||||
}
|
||||
if (item.children) {
|
||||
filter(item.children);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
filter(this.$refs.table.tableData);
|
||||
return target;
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
this.$refs.table.refresh();
|
||||
} else if (mode == "edit") {
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
filter(this.$refs.table.tableData);
|
||||
return target;
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
this.$refs.table.refresh();
|
||||
} else if (mode == "edit") {
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="名称" clearable @click="upsearch"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-input v-model="query.search" placeholder="名称" clearable @click="handleQuery"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
|
|
@ -115,8 +115,8 @@
|
|||
}, 500)
|
||||
},
|
||||
//搜索
|
||||
upsearch(){
|
||||
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
//根据ID获取树结构
|
||||
filterTree(id){
|
||||
|
|
|
|||
|
|
@ -282,10 +282,9 @@ export default {
|
|||
this.selection = selection;
|
||||
},
|
||||
//搜索
|
||||
upsearch() {
|
||||
let params = { search: this.search.keyword };
|
||||
this.$refs.table.queryData(params);
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
|
|
|
|||
|
|
@ -15,15 +15,15 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="姓名/手机号"
|
||||
v-model="query.search"
|
||||
placeholder="编号/名称"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -37,37 +37,63 @@
|
|||
stripe
|
||||
@resetQuery="resetQuery"
|
||||
>
|
||||
|
||||
<el-table-column label="#" fixed="left" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="证书名称" fixed="left" prop="name" width="150"></el-table-column>
|
||||
<el-table-column label="证书编号" prop="number" width="200"> </el-table-column>
|
||||
<el-table-column label="相关人员" prop="remployee_name" width="200"> </el-table-column>
|
||||
<el-table-column label="证书类型" prop="type" width="200"><template #default="scope">{{type_[scope.row.type]}} </template></el-table-column>
|
||||
<el-table-column label="发证日期" prop="issue_date" width="180"></el-table-column>
|
||||
<el-table-column label="有效期" prop="expiration_date" width="200"> </el-table-column>
|
||||
<el-table-column label="下一次复审日期" prop="review_date" width="180"></el-table-column>
|
||||
<el-table-column label="证书文件" prop="file" width="180"></el-table-column>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="证书名称" fixed="left" width="150">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
v-if="scope.row.file"
|
||||
:href="scope.row.file"
|
||||
type="primary"
|
||||
target="_blank"
|
||||
>{{ scope.row.name }}</el-link
|
||||
>
|
||||
<span v-else>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="证书编号" prop="number"> </el-table-column>
|
||||
<el-table-column label="人员" prop="remployee_name"> </el-table-column>
|
||||
<el-table-column label="证书类型" prop="type"
|
||||
><template #default="scope"
|
||||
>{{ type_[scope.row.type] }}
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column label="发证日期" prop="issue_date"></el-table-column>
|
||||
<el-table-column label="有效期" prop="expiration_date">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="下一次复审日期"
|
||||
prop="review_date"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="handleForm('edit', scope.row)"
|
||||
v-auth="'rcertificate.update'"
|
||||
v-auth="'rcertificate.update'"
|
||||
>编辑</el-button
|
||||
>
|
||||
|
||||
<el-popconfirm
|
||||
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small" v-auth="'rcertificate.delete'">删除</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
size="small"
|
||||
v-auth="'rcertificate.delete'"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
@ -146,30 +172,24 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="选择相关方人员">
|
||||
<el-select
|
||||
v-model="form.remployee"
|
||||
placeholder="选择相关方人员"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in remployeeoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select v-model="form.remployee" placeholder="选择相关方人员">
|
||||
<el-option
|
||||
v-for="item in remployeeoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="上传证书文件">
|
||||
<el-form-item label="上传证书">
|
||||
<sc-upload-file
|
||||
v-model="form.file"
|
||||
:limit="5"
|
||||
:data="{ otherData: 'demo' }"
|
||||
tip="最多上传3个文件,单个文件不要超过10M,请上传xlsx/docx格式文件"
|
||||
:multiple="false"
|
||||
accept="image/png, image/jpeg, image/jpeg, pdf"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-upload"
|
||||
>上传附件</el-button
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-upload">上传</el-button>
|
||||
</sc-upload-file>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -182,18 +202,13 @@
|
|||
</sc-dialog>
|
||||
</template>
|
||||
<script>
|
||||
const defaultform=
|
||||
{ id: "",
|
||||
name: "",
|
||||
number: "",
|
||||
employee: ""
|
||||
};
|
||||
const defaultform = { id: "", name: "", number: "", employee: "" };
|
||||
export default {
|
||||
name: "certificate",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
form:defaultform,
|
||||
form: defaultform,
|
||||
typeoptions: [
|
||||
{ id: 10, name: "特种作业证书" },
|
||||
{ id: 20, name: "特种设备操作证书" },
|
||||
|
|
@ -208,32 +223,29 @@ export default {
|
|||
apiObj: this.$API.rpm.rcertificate.list,
|
||||
query: {},
|
||||
selection: [],
|
||||
remployeeoptions:"",
|
||||
remployeeoptions: "",
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getUser()
|
||||
mounted() {
|
||||
this.getUser();
|
||||
},
|
||||
methods: {
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
handleForm(type, row) {
|
||||
if (type === "add") {
|
||||
this.dialogcart = true;
|
||||
this.form = Object.assign({}, defaultform);
|
||||
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
this.form = Object.assign({}, defaultform);
|
||||
} else {
|
||||
this.dialogcart = true;
|
||||
this.form = row;
|
||||
|
||||
}
|
||||
},
|
||||
async table_del(row) {
|
||||
|
||||
async table_del(row) {
|
||||
this.$API.rpm.rcertificate.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
|
|
@ -245,44 +257,42 @@ export default {
|
|||
return err;
|
||||
});
|
||||
},
|
||||
//相关方人员选择
|
||||
getUser() {
|
||||
//相关方人员选择
|
||||
getUser() {
|
||||
this.$API.rpm.remployee.list.req({ page: 0 }).then((res) => {
|
||||
|
||||
this.remployeeoptions = res;
|
||||
});
|
||||
},
|
||||
//人员证书创建
|
||||
submitcert() {
|
||||
this.form.employee = this.$route.query.id;
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (this.form.id == "") {
|
||||
this.$API.rpm.rcertificate.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.$message.success("创建成功");
|
||||
this.dialogcart = false;
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
} else {
|
||||
this.$API.rpm.rcertificate.update
|
||||
.req(this.form.id, this.form)
|
||||
.then((res) => {
|
||||
this.$message.success("修改成功");
|
||||
this.dialogcart = false;
|
||||
return res;
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}
|
||||
});
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (this.form.id == "") {
|
||||
this.$API.rpm.rcertificate.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.$message.success("创建成功");
|
||||
this.dialogcart = false;
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
} else {
|
||||
this.$API.rpm.rcertificate.update
|
||||
.req(this.form.id, this.form)
|
||||
.then((res) => {
|
||||
this.$message.success("修改成功");
|
||||
this.dialogcart = false;
|
||||
return res;
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -9,15 +9,15 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="名称"
|
||||
v-model="query.search"
|
||||
placeholder="姓名"
|
||||
clearable
|
||||
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -32,22 +32,25 @@
|
|||
|
||||
>
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" width="180"></el-table-column>
|
||||
<el-table-column label="手机号" prop="phone" width="180"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="id_number" width="180"></el-table-column>
|
||||
<el-table-column label="证件照" prop="photo" width="180" ></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" ></el-table-column>
|
||||
<el-table-column label="手机号" prop="phone" ></el-table-column>
|
||||
<el-table-column label="身份证号" prop="id_number" ></el-table-column>
|
||||
<el-table-column label="证件照" prop="photo" >
|
||||
<template #default="scope">
|
||||
<sc-upload v-model="scope.row.photo" :disabled="true" width="70" height="80"></sc-upload>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
text
|
||||
link
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
|
|
@ -58,10 +61,9 @@
|
|||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
<el-button link type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
@ -154,6 +156,9 @@ export default {
|
|||
this.$refs.table.refresh();
|
||||
}
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
v-model="query.search"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
|
||||
|
|
@ -38,44 +38,40 @@
|
|||
<el-table-column
|
||||
label="联系人"
|
||||
prop="contacter"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="联系电话"
|
||||
prop="phone"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="企业地址"
|
||||
prop="address"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
></el-table-column> -->
|
||||
<el-table-column
|
||||
label="账号"
|
||||
prop="admin_username"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<el-table-column label="操作" fixed="right" align="left" width="200">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
v-if="scope.row.admin==null"
|
||||
text
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_admin(scope.row)"
|
||||
v-auth="'rparty:assgin'"
|
||||
>分配账号</el-button>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
|
|
@ -87,10 +83,9 @@
|
|||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small" v-auth="'rparty.delete'">删除</el-button>
|
||||
<el-button link type="danger" size="small" v-auth="'rparty.delete'">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
@ -221,6 +216,9 @@ export default {
|
|||
this.$refs.table.refresh();
|
||||
}
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
v-model="query.search"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
|
||||
|
|
@ -55,16 +55,14 @@
|
|||
prop="leave_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column label="状态" prop="state" width="180">
|
||||
<el-table-column label="状态" prop="state" width="100">
|
||||
<template #default="scope">{{ state_[scope.row.state] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批状态" width="180">
|
||||
<el-table-column label="审批状态" width="200">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.ticket_&&scope.row.ticket_.state_" style="margin-right: 5px;">{{scope.row.ticket_.state_.name }}</span>
|
||||
<el-tag
|
||||
v-if="scope.row.ticket_&&scope.row.ticket_.act_state"
|
||||
class="mx-1"
|
||||
size="small"
|
||||
:type="scope.row.ticket_.act_state===0?'':scope.row.ticket_.act_state===1?'':scope.row.ticket_.act_state===2?'danger':scope.row.ticket_.act_state===3?'danger':scope.row.ticket_.act_state===5?'danger':scope.row.ticket_.act_state===4?'success':''"
|
||||
>{{act_states[scope.row.ticket_.act_state]}}
|
||||
</el-tag>
|
||||
|
|
@ -90,12 +88,11 @@
|
|||
prop="create_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="170">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
v-if="scope.row.state===10"
|
||||
text
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="next_add(scope.row, scope.$index)"
|
||||
|
|
@ -104,7 +101,7 @@
|
|||
</el-button>
|
||||
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
|
|
@ -122,10 +119,9 @@
|
|||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small" v-auth="'rpj.delete'">删除</el-button>
|
||||
<el-button link type="danger" size="small" v-auth="'rpj.delete'">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
@ -183,6 +179,14 @@
|
|||
40: "进行中",
|
||||
50: "已完成",
|
||||
},
|
||||
act_states: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
3: "被撤回",
|
||||
4: "已完成",
|
||||
5: "已关闭",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -249,6 +253,9 @@
|
|||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="部门名称" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-input v-model="query.search" placeholder="部门名称" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
|
|
@ -118,8 +118,8 @@
|
|||
this.selection = selection;
|
||||
},
|
||||
//搜索
|
||||
upsearch(){
|
||||
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
//根据ID获取树结构
|
||||
filterTree(id){
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
upsearch(){
|
||||
handleQuery(){
|
||||
|
||||
},
|
||||
rowClick(row){
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="角色名称" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-input v-model="query.search" placeholder="角色名称" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
|
|
@ -142,8 +142,8 @@
|
|||
}, 500)
|
||||
},
|
||||
//搜索
|
||||
upsearch(){
|
||||
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
//根据ID获取树结构
|
||||
filterTree(id){
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.name" placeholder="登录账号 / 姓名" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-input v-model="query.search" placeholder="登录账号 / 姓名" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
|
|
@ -75,6 +75,7 @@
|
|||
save: false
|
||||
},
|
||||
showGrouploading: false,
|
||||
query:{},
|
||||
groupFilterText: '',
|
||||
group: [],
|
||||
apiObj: this.$API.system.user.list,
|
||||
|
|
@ -171,8 +172,8 @@
|
|||
this.$refs.table.reload(params)
|
||||
},
|
||||
//搜索
|
||||
upsearch(){
|
||||
this.$refs.table.upData(this.search)
|
||||
handleQuery(){
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
//本地更新数据
|
||||
handleSuccess(data, mode){
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="部门名称"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-input v-model="query.search" placeholder="部门名称"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
|
|
@ -79,6 +79,7 @@
|
|||
},
|
||||
apiObj: this.$API.system.dept.list,
|
||||
selection: [],
|
||||
query:{},
|
||||
search: {
|
||||
keyword: null
|
||||
},
|
||||
|
|
@ -190,7 +191,7 @@
|
|||
this.selection = selection;
|
||||
},
|
||||
//搜索
|
||||
upsearch(){
|
||||
handleQuery(){
|
||||
this.$refs.table.queryData(this.search)
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -32,12 +32,12 @@
|
|||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addDic" v-auth="'dicttype.create'"></el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del" v-auth="'dicttype.delete'"></el-button>
|
||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del" v-auth="'dicttype.delete'"></el-button> -->
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="listApi" row-key="id" :params="listApiParams" @selection-change="selectionChange" stripe :paginationLayout="'prev, pager, next'">
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<!-- <el-table-column type="selection" width="50"></el-table-column> -->
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="名称" prop="name" min-width="150"></el-table-column>
|
||||
<el-table-column label="键值" prop="value" min-width="100"></el-table-column>
|
||||
|
|
@ -49,11 +49,11 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" @click="editDic(scope.row)" v-auth="'dicttype.update'">编辑</el-button>
|
||||
<el-button link size="small" @click="editDic(scope.row)" v-auth="'dicttype.update'" type="primary">编辑</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="delDic(scope.row,scope.$index)">
|
||||
<template #reference>
|
||||
<el-button link size="small" v-auth="'dicttype.delete'">删除</el-button>
|
||||
<el-button link size="small" v-auth="'dicttype.delete'" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
|
|
@ -292,7 +292,7 @@
|
|||
},
|
||||
//点击字典类型
|
||||
dicClickType(data){
|
||||
this.$refs.table.reload({
|
||||
this.$refs.table.queryData({
|
||||
type: data.id
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -71,13 +71,13 @@
|
|||
@click="addPostRole"
|
||||
v-auth="'post.update'"
|
||||
></el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
@click="delPostRole"
|
||||
v-auth="'post.delete'"
|
||||
></el-button>
|
||||
></el-button> -->
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
|
|
@ -144,7 +144,9 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
apiObj: this.$API.system.post.list,
|
||||
apiObj2: this.$API.system.postrole.list,
|
||||
apiObj2: null,
|
||||
query: {},
|
||||
query2: {},
|
||||
dialog: {
|
||||
save: false,
|
||||
roleSave: false,
|
||||
|
|
@ -163,12 +165,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
rowClick(row) {
|
||||
let params = {
|
||||
post: row.id,
|
||||
};
|
||||
this.apiObj2 = this.$API.system.postrole.list;
|
||||
this.postId = row.id;
|
||||
this.$refs.table2.reload(params);
|
||||
this.$refs.table2.queryData({post: row.id });
|
||||
},
|
||||
//窗口新增
|
||||
add() {
|
||||
|
|
|
|||
|
|
@ -3,30 +3,30 @@
|
|||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="roleAdd" v-auth="'role.create'"></el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length!==1" @click="batch_del" v-auth="'role.delete'"></el-button>
|
||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length!==1" @click="batch_del" v-auth="'role.delete'"></el-button> -->
|
||||
<!--<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button>-->
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="角色名称" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-input v-model="query.search" placeholder="角色名称" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" hidePagination>
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<!-- <el-table-column type="selection" width="50"></el-table-column> -->
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="角色名称" prop="name" width="250"></el-table-column>
|
||||
<el-table-column label="角色标识" prop="code" width="150"></el-table-column>
|
||||
<el-table-column label="角色描述" prop="description" width="150"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" @click="roleEdit(scope.row, scope.$index)" v-auth="'role.update'">编辑</el-button>
|
||||
<el-button link size="small" @click="roleEdit(scope.row, scope.$index)" v-auth="'role.update'" type="primary">编辑</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="roleDel(scope.row, scope.$index)">
|
||||
<template #reference>
|
||||
<el-button link size="small" v-auth="'role.delete'">删除</el-button>
|
||||
<el-button link size="small" v-auth="'role.delete'" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
|
|
@ -85,6 +85,7 @@
|
|||
search: {
|
||||
keyword: null
|
||||
},
|
||||
query: {},
|
||||
isSaving: false,
|
||||
limitedVisible : false,
|
||||
type: "add",
|
||||
|
|
@ -197,8 +198,8 @@
|
|||
this.selection = selection;
|
||||
},
|
||||
//搜索
|
||||
upsearch(){
|
||||
this.$refs.table.queryData(this.search)
|
||||
handleQuery(){
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
//根据ID获取树结构
|
||||
filterTree(id){
|
||||
|
|
|
|||
|
|
@ -51,14 +51,14 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
v-model="query.search"
|
||||
placeholder="登录账号 / 姓名"
|
||||
clearable
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -72,10 +72,10 @@
|
|||
remoteFilter
|
||||
@selection-change="selectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
type="selection"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
></el-table-column> -->
|
||||
<el-table-column
|
||||
label="ID"
|
||||
prop="id"
|
||||
|
|
@ -88,6 +88,15 @@
|
|||
label="登录账号"
|
||||
prop="username"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="是否启用"
|
||||
prop="is_active"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tag type="success" v-if="scope.row.is_active">启用</el-tag>
|
||||
<el-tag v-else type="danger">禁用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--sortable="custom"-->
|
||||
<el-table-column
|
||||
label="加入时间"
|
||||
|
|
@ -103,7 +112,7 @@
|
|||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="success"
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="formSetting(scope.row)"
|
||||
|
|
@ -208,6 +217,7 @@
|
|||
save: false,
|
||||
// certSave:false,
|
||||
},
|
||||
query: {},
|
||||
baseUrl : baseUrl.API_URL,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
|
|
@ -344,8 +354,8 @@
|
|||
this.$refs.table.reload(params);
|
||||
},
|
||||
//搜索
|
||||
upsearch() {
|
||||
this.$refs.table.queryData(this.search)
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
//表单提交方法
|
||||
submit(){
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="关键词" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-input v-model="query.search" placeholder="关键词" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
|
|
@ -141,13 +141,14 @@
|
|||
},
|
||||
search: {
|
||||
keyword: ""
|
||||
}
|
||||
},
|
||||
query: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//搜索
|
||||
upsearch(){
|
||||
this.$refs.table.upData(this.search)
|
||||
handleQuery(){
|
||||
this.$refs.table.upData(this.query)
|
||||
},
|
||||
//标签切换
|
||||
tabChange(name){
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="关键词" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
this.$refs.table.reload(params)
|
||||
},
|
||||
//搜索
|
||||
upsearch(){
|
||||
handleQuery(){
|
||||
this.$refs.table.upData(this.search)
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
v-model="query.search"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
></el-input>
|
||||
|
|
@ -122,9 +122,8 @@
|
|||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
v-if="scope.row.state==10"
|
||||
type="primary"
|
||||
size="small"
|
||||
|
|
@ -133,21 +132,20 @@
|
|||
>继续编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_del(scope.row)"
|
||||
v-auth="'visit.delete'"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
@ -277,6 +275,9 @@
|
|||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -7,87 +7,89 @@
|
|||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-descriptions direction="vertical" :column="3" border>
|
||||
|
||||
|
||||
<el-descriptions-item label="来访概述:">{{
|
||||
form.name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访单位:">{{
|
||||
form.company
|
||||
}}</el-descriptions-item>
|
||||
<el-main>
|
||||
<el-card header="基本信息" shadow="hover">
|
||||
<el-descriptions :column="2">
|
||||
<el-descriptions-item label="来访概述:">{{
|
||||
form.name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访单位:">{{
|
||||
form.company
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访人数:">
|
||||
<el-tag size="small">{{ form.count_people }}人</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="来访人员:" >
|
||||
<el-tag size="small" v-for="item in form.visitors_" :key='item.id'>{{ item.visitor_.name }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态:">{{
|
||||
state_[form.state]
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访时间:">{{
|
||||
form.visit_time
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="离开时间:">{{
|
||||
form.leave_time
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访事由:">{{
|
||||
purpose_[form.purpose]
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访详述:">{{
|
||||
form.description
|
||||
}}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="接待人:" v-if="form.receptionist_">
|
||||
{{ form.receptionist_.name }}
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
<el-card style="margin-top:20px">
|
||||
<scTable
|
||||
|
||||
ref="table"
|
||||
:data="peoplelist"
|
||||
row-key="id"
|
||||
height='auto'
|
||||
stripe
|
||||
hideDo
|
||||
hidePagination
|
||||
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-tag size="small">{{ form.count_people }}人</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="来访人员:">
|
||||
<el-tag
|
||||
size="small"
|
||||
v-for="item in form.visitors_"
|
||||
:key="item.id"
|
||||
>{{ item.visitor_.name }}</el-tag
|
||||
>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态:">{{
|
||||
state_[form.state]
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访时间:">{{
|
||||
form.visit_time
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="离开时间:">{{
|
||||
form.leave_time
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访事由:">{{
|
||||
purpose_[form.purpose]
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访详述:">{{
|
||||
form.description
|
||||
}}</el-descriptions-item>
|
||||
|
||||
<el-table-column
|
||||
label="访客姓名"
|
||||
prop="visitor_.name"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="访客手机号"
|
||||
prop="visitor_.phone"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="访客身份证号"
|
||||
prop="visitor_.id_number"
|
||||
></el-table-column>
|
||||
<el-table-column label="是否重要访客" prop="is_main">
|
||||
<template #default="scope"
|
||||
><el-space v-if="scope.row.is_main == true">是</el-space>
|
||||
<el-space v-else>否</el-space>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||
|
||||
</scTable>
|
||||
<el-descriptions-item label="接待人:" v-if="form.receptionist_">
|
||||
{{ form.receptionist_.name }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 8px" shadow="hover" header="访客信息">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="peoplelist"
|
||||
row-key="id"
|
||||
height="auto"
|
||||
stripe
|
||||
hideDo
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="访客姓名"
|
||||
prop="visitor_.name"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="访客手机号"
|
||||
prop="visitor_.phone"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="访客身份证号"
|
||||
prop="visitor_.id_number"
|
||||
></el-table-column>
|
||||
<el-table-column label="是否重要访客" prop="is_main">
|
||||
<template #default="scope"
|
||||
><el-space v-if="scope.row.is_main == true">是</el-space>
|
||||
<el-space v-else>否</el-space>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
></el-table-column>
|
||||
</scTable>
|
||||
</el-card>
|
||||
</el-main>
|
||||
|
||||
</el-container>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
|
@ -142,21 +144,20 @@ export default {
|
|||
50: "已完成",
|
||||
},
|
||||
receptionistoptions: [],
|
||||
peoplelist: [],
|
||||
peoplelist: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getUser();
|
||||
|
||||
// this.getUser();
|
||||
},
|
||||
methods: {
|
||||
//访客接待人
|
||||
getUser() {
|
||||
this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
||||
this.receptionistoptions = res;
|
||||
});
|
||||
},
|
||||
|
||||
// getUser() {
|
||||
// this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
||||
// this.receptionistoptions = res;
|
||||
// });
|
||||
// },
|
||||
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
|
|
@ -164,19 +165,17 @@ export default {
|
|||
return this;
|
||||
},
|
||||
|
||||
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
|
||||
this.loading = true
|
||||
this.$API.vm.visit.read.req(data.id).then((res) => {
|
||||
this.loading = false
|
||||
this.form = res;
|
||||
}).catch(e=>{this.loading = false});
|
||||
|
||||
this.$API.vm.people.list.req({ visit: data.id, page: 0 }).then((res) => {
|
||||
this.peoplelist = res;
|
||||
});
|
||||
|
||||
this.$API.vm.people.list
|
||||
.req({ visit:data.id, page: 0 })
|
||||
.then((res) => {
|
||||
this.peoplelist = res;
|
||||
});
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
v-model="query.search"
|
||||
placeholder="姓名/手机号"
|
||||
clearable
|
||||
></el-input>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :data="apiObj" row-key="id" stripe>
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
|
|
@ -38,12 +38,15 @@
|
|||
></el-table-column>
|
||||
<el-table-column label="手机号" prop="phone"> </el-table-column>
|
||||
<el-table-column label="身份证号" prop="id_number"></el-table-column>
|
||||
<el-table-column label="证件照" prop="photo"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<el-table-column label="证件照" prop="photo">
|
||||
<template #default="scope">
|
||||
<sc-upload v-model="scope.row.photo" :disabled="true" width="70" height="80"></sc-upload>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
link
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="handleForm('edit', scope.row)"
|
||||
|
|
@ -55,13 +58,12 @@
|
|||
@confirm="delVisitor(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small"
|
||||
<el-button link type="danger" size="small"
|
||||
v-auth="'visit.delete'">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
|
@ -131,7 +133,7 @@ export default {
|
|||
|
||||
},
|
||||
dialogcart: false,
|
||||
apiObj: [],
|
||||
apiObj: this.$API.vm.visitor.list,
|
||||
query: {},
|
||||
selection: [],
|
||||
search: {
|
||||
|
|
@ -140,7 +142,7 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getvisitorlist();
|
||||
// this.getvisitorlist();
|
||||
},
|
||||
methods: {
|
||||
handleForm(type, row) {
|
||||
|
|
@ -153,11 +155,11 @@ export default {
|
|||
}
|
||||
},
|
||||
//访客列表
|
||||
getvisitorlist() {
|
||||
this.$API.vm.visitor.list.req({ page: 0 }).then((res) => {
|
||||
this.apiObj = res;
|
||||
});
|
||||
},
|
||||
// getvisitorlist() {
|
||||
// this.$API.vm.visitor.list.req({ page: 0 }).then((res) => {
|
||||
// this.apiObj = res;
|
||||
// });
|
||||
// },
|
||||
//访客创建
|
||||
submitcert() {
|
||||
this.form.employee = this.$route.query.id;
|
||||
|
|
@ -200,6 +202,9 @@ export default {
|
|||
return err;
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -3,28 +3,31 @@
|
|||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="list"
|
||||
:apiObj = "apiObj"
|
||||
:params = "params"
|
||||
row-key="id"
|
||||
stripe
|
||||
highlightCurrentRow
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column label="ID" prop="id"></el-table-column>
|
||||
<el-table-column label="工单标题" prop="title"></el-table-column>
|
||||
<el-table-column label="流水号" prop="sn"></el-table-column>
|
||||
<el-table-column label="当前状态">
|
||||
<el-table-column label="ID" prop="id" width="180"></el-table-column>
|
||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
||||
<el-table-column label="工单标题" prop="title" width="180"></el-table-column>
|
||||
|
||||
<el-table-column label="工作流" prop="title">
|
||||
<template #default="scope">
|
||||
{{ scope.row.workflow_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所在节点">
|
||||
<template #default="scope">
|
||||
{{ scope.row.state_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="进行状态" prop="sort">
|
||||
<template #default="scope">
|
||||
{{ actstate_[scope.row.act_state] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关联工作流" prop="title">
|
||||
<template #default="scope">
|
||||
{{ scope.row.workflow_.name }}
|
||||
<el-tag
|
||||
:type="scope.row.act_state===0?'':scope.row.act_state===1?'':scope.row.act_state===2?'danger':scope.row.act_state===3?'danger':scope.row.act_state===5?'danger':scope.row.act_state===4?'success':''"
|
||||
>{{act_states[scope.row.act_state]}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理人类型">
|
||||
|
|
@ -32,10 +35,10 @@
|
|||
{{ participant_[scope.row.participant_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="120">
|
||||
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="text" size="small" @click="handleShow(scope.row)">查看详情</el-button>
|
||||
<el-button type="text" size="small" @click="handleShow(scope.row)">查看</el-button>
|
||||
<!--多人且主动接单-->
|
||||
|
||||
</template>
|
||||
|
|
@ -51,7 +54,9 @@
|
|||
data() {
|
||||
return {
|
||||
list: [],
|
||||
actstate_: {
|
||||
apiObj: this.$API.wf.ticket.list,
|
||||
params: {"category": "all"},
|
||||
act_states: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
|
|
@ -61,23 +66,14 @@
|
|||
},
|
||||
participant_: {
|
||||
0: "无处理人",
|
||||
1: "个人",
|
||||
1: "单人",
|
||||
2: "多人",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
let res = await this.$API.wf.ticket.list.req({
|
||||
category: "all",
|
||||
page: 0,
|
||||
});
|
||||
console.log(res);
|
||||
this.list = res;
|
||||
},
|
||||
handleShow(row) {
|
||||
let cateType = row.workflow_.key;
|
||||
let projectId = '', operation = null;
|
||||
|
|
|
|||
|
|
@ -72,6 +72,9 @@
|
|||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="addForm.name" placeholder="名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标识" prop="key">
|
||||
<el-input v-model="addForm.key" placeholder="标识" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否隐藏" prop="is_hidden" label-width="120px">
|
||||
<el-switch v-model="addForm.is_hidden"></el-switch>
|
||||
</el-form-item>
|
||||
|
|
|
|||
|
|
@ -1,69 +1,62 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<el-card style="margin-bottom: 10px">
|
||||
<el-steps
|
||||
:active="actives"
|
||||
spac="400px"
|
||||
align-center=""
|
||||
style="padding-top: 20px"
|
||||
>
|
||||
<el-step
|
||||
:title="item.name"
|
||||
v-for="item in flowSteps"
|
||||
:key="item.id"
|
||||
></el-step>
|
||||
</el-steps>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-steps
|
||||
:active="actives"
|
||||
spac="400px"
|
||||
align-center=""
|
||||
style="padding-top: 20px"
|
||||
>
|
||||
<el-step
|
||||
:title="item.name"
|
||||
v-for="item in flowSteps"
|
||||
:key="item.id"
|
||||
></el-step>
|
||||
</el-steps>
|
||||
</template>
|
||||
<!--工单进度组件-->
|
||||
<script>
|
||||
export default {
|
||||
name: "workstep",
|
||||
data() {
|
||||
return {
|
||||
sort: 0,
|
||||
actives: 4,
|
||||
flowSteps: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.workId = this.$route.query.id;
|
||||
this.getFlowSteps();
|
||||
},
|
||||
methods: {
|
||||
getFlowSteps() {
|
||||
this.$API.wf.ticket.ticketFlowSteps.req(this.workId).then((res) => {
|
||||
this.flowSteps = res;
|
||||
this.$API.wf.ticket.ticketItem.req(this.workId).then((resp) => {
|
||||
let state = resp.state;
|
||||
let dat = this.flowSteps.filter((item) => {
|
||||
return item.id == state;
|
||||
});
|
||||
debugger;
|
||||
this.sort = dat[0].sort;
|
||||
this.actives = this.flowSteps.indexOf(dat[0]);
|
||||
if (this.flowSteps.length - this.actives > 1) {
|
||||
|
||||
} else {
|
||||
this.actives = this.flowSteps.length;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
export default {
|
||||
name: "workstep",
|
||||
data() {
|
||||
return {
|
||||
sort: 0,
|
||||
actives: 4,
|
||||
flowSteps: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.workId = this.$route.query.id;
|
||||
this.getFlowSteps();
|
||||
},
|
||||
methods: {
|
||||
getFlowSteps() {
|
||||
this.$API.wf.ticket.ticketFlowSteps.req(this.workId).then((res) => {
|
||||
this.flowSteps = res;
|
||||
this.$API.wf.ticket.ticketItem.req(this.workId).then((resp) => {
|
||||
let state = resp.state;
|
||||
let dat = this.flowSteps.filter((item) => {
|
||||
return item.id == state;
|
||||
});
|
||||
debugger;
|
||||
this.sort = dat[0].sort;
|
||||
this.actives = this.flowSteps.indexOf(dat[0]);
|
||||
if (this.flowSteps.length - this.actives > 1) {
|
||||
} else {
|
||||
this.actives = this.flowSteps.length;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-step__head.is-process .el-step__icon{
|
||||
border: 2px solid #409eff;
|
||||
background: #409eff;
|
||||
color: #ffffff;
|
||||
}
|
||||
.el-step__title.is-process{
|
||||
color: #409eff;
|
||||
}
|
||||
.el-step__head.is-process .el-step__icon {
|
||||
border: 2px solid #409eff;
|
||||
background: #409eff;
|
||||
color: #ffffff;
|
||||
}
|
||||
.el-step__title.is-process {
|
||||
color: #409eff;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="工单名称" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
|
|
@ -308,7 +308,7 @@
|
|||
}
|
||||
},
|
||||
//搜索
|
||||
upsearch(){
|
||||
handleQuery(){
|
||||
|
||||
},
|
||||
currentPage(){},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<el-card style="margin-bottom: 10px;position: relative">
|
||||
<el-main v-loading="mainLoading">
|
||||
<el-card header="流程">
|
||||
<work-step ref="workStep"></work-step>
|
||||
<el-button
|
||||
class="ticketRetry"
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
重新执行
|
||||
</el-button>
|
||||
</el-card>
|
||||
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='visit'">
|
||||
<el-card style="margin-top: 8px" v-if="cateType==='visit'">
|
||||
<el-descriptions title="来访信息" :column="3">
|
||||
<el-descriptions-item label="工单流水号:">
|
||||
{{ticketDetail.sn }}
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='rparty'">
|
||||
<el-card style="margin-top: 8px" v-if="cateType==='rparty'">
|
||||
<el-descriptions title="入厂项目" :column="3">
|
||||
<el-descriptions-item label="工单流水号:">
|
||||
{{ticketDetail.sn }}
|
||||
|
|
@ -86,12 +86,12 @@
|
|||
</div>
|
||||
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
|
||||
</el-card>
|
||||
<el-card style="margin-left: 10px; margin-bottom: 10px" v-else>
|
||||
<el-card style="margin-top: 8px" v-else>
|
||||
<el-descriptions title="作业许可证" :column="3">
|
||||
<el-descriptions-item label="工单流水号:">
|
||||
{{ticketDetail.sn }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="作业名称:">
|
||||
<el-descriptions-item label="所属作业:">
|
||||
{{oplDetail.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="作业地点:">
|
||||
|
|
@ -116,10 +116,10 @@
|
|||
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="type!=='show'">
|
||||
<el-card style="margin-top: 8px" v-if="type!=='show'">
|
||||
<scTitle title="处理"></scTitle>
|
||||
<el-form :model="form" ref="addForm" label-width="100px" label-position="left">
|
||||
<el-form-item label="作业情况:" v-if="ticketDetail.state_&&ticketDetail.state_.name==='作业负责人关闭'">
|
||||
<el-form-item label="作业情况:" v-if="ticketDetail.state_&&ticketDetail.state_.key==='opl_close'">
|
||||
<el-select v-model="form.close_note" placeholder="选择关闭原因">
|
||||
<el-option
|
||||
v-for="item in noteOption"
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关闭处理:" v-if="ticketDetail.state_&&ticketDetail.state_.name==='作业负责人关闭'">
|
||||
<el-form-item label="关闭处理:" v-if="ticketDetail.state_&&ticketDetail.state_.key==='opl_close'">
|
||||
<el-checkbox-group v-model="form.close_dos">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in dosOption"
|
||||
|
|
@ -163,7 +163,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-left: 10px;">
|
||||
<el-card style="margin-top: 8px" header="处理日志">
|
||||
<work-details ref="workDetails" :ticket="ticketId"></work-details>
|
||||
</el-card>
|
||||
</el-main>
|
||||
|
|
@ -222,6 +222,7 @@
|
|||
return {
|
||||
ticketId: "",//工单id
|
||||
projectId: "",//对应项目的id
|
||||
mainLoading: false,
|
||||
userName: "",
|
||||
rpjDetail: {},
|
||||
oplDetail: {},
|
||||
|
|
@ -290,12 +291,7 @@
|
|||
} else if (this.cateType === 'rparty') {
|
||||
this.getRpj();
|
||||
} else {
|
||||
if (this.operation !== null) {
|
||||
this.getOperation();
|
||||
} else {
|
||||
this.getOpl();
|
||||
}
|
||||
this.getCloseDos();
|
||||
this.getOpl();
|
||||
}
|
||||
this.getticketItem();
|
||||
this.getBtns();
|
||||
|
|
@ -320,9 +316,15 @@
|
|||
},
|
||||
//工单详情
|
||||
getticketItem() {
|
||||
this.mainLoading = true
|
||||
this.$API.wf.ticket.ticketItem.req(this.ticketId).then((res) => {
|
||||
this.mainLoading = false
|
||||
this.ticketDetail = res;
|
||||
});
|
||||
if(this.ticketDetail.state_.key == 'opl_close'){
|
||||
// 如果是作业关闭,展示需要提交的表单
|
||||
this.getCloseDos()
|
||||
}
|
||||
}).catch(e=>{this.mainLoading = false});
|
||||
},
|
||||
//获取应有的流转
|
||||
getBtns() {
|
||||
|
|
@ -352,14 +354,6 @@
|
|||
this.oplDetail = res;
|
||||
});
|
||||
},
|
||||
//作业详情
|
||||
getOperation() {
|
||||
debugger;
|
||||
this.$API.opm.operation.read.req(this.operation).then((res) => {
|
||||
debugger;
|
||||
this.oplDetail = res;
|
||||
});
|
||||
},
|
||||
showMoreInfo() {
|
||||
this.showLimited = true;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,440 +1,529 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-auth="'workflow.create'"></el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length!==1"
|
||||
@click="batch_del" v-auth="'workflow.delete'"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="工作流名称" clearable></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="#" type="index"></el-table-column>
|
||||
<el-table-column label="ID" prop="id" min-width="120"></el-table-column>
|
||||
<el-table-column label="工作流名称" prop="name" min-width="200"></el-table-column>
|
||||
<el-table-column label="标识" prop="key" min-width="100"></el-table-column>
|
||||
<el-table-column label="工单查看权限校验" prop="view_permission_check" min-width="120">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.view_permission_check">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作流描述" prop="description" min-width="150"></el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time" min-width="150"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" type="primary" @click="workflowShow(scope.row)"
|
||||
v-auth="'workflow.update'">配置
|
||||
</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-button link size="small" type="primary" @click="workflowEdit(scope.row)"
|
||||
v-auth="'workflow.update'">编辑
|
||||
</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="handleWatch(scope)"
|
||||
>
|
||||
查看流程图
|
||||
</el-link>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="workflowDel(scope.row)">
|
||||
<template #reference>
|
||||
<el-button link size="small" type="danger" v-auth="'workflow.delete'">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<div class="svgMark" v-if="limitedWatch" @click="closeMark">
|
||||
<div class="svgWrapper">
|
||||
<div class="svgItem">工作流流程图<i class="el-dialog__close el-icon el-icon-close" @click="closeMark"></i></div>
|
||||
<div style="width: 90%;margin: auto;">
|
||||
<svg :height='mySvgHeight' id="mySvg" style="width:100%!important;">
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog :title="titleMap[type]" v-model="limitedVisible">
|
||||
<el-form :model="addForm" :rules="rules" ref="addForm" label-width="100px" label-position="left">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="addForm.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标识" prop="key">
|
||||
<el-input v-model="addForm.key" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="流水前缀">
|
||||
<el-input v-model="addForm.sn_prefix" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
<el-input
|
||||
v-model="addForm.description"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="描述"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="查看权限校验">
|
||||
<el-switch v-model="addForm.view_permission_check"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="展现表单字段">
|
||||
<el-transfer
|
||||
v-model="addForm.display_form_str"
|
||||
:data="choiceOption"
|
||||
:titles="['未展示字段', '展示字段']"
|
||||
:props="{ key: 'id', label: 'field_name' }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="标题模板">
|
||||
<el-input v-model="addForm.title_template" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容模板">
|
||||
<el-input v-model="addForm.content_template" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="limitedVisible=false">取 消</el-button>
|
||||
<el-button v-if="type!=='show'" type="primary" :loading="isSaving" @click="submitHandle()">保 存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
v-auth="'workflow.create'"
|
||||
></el-button>
|
||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length!==1"
|
||||
@click="batch_del" v-auth="'workflow.delete'"></el-button> -->
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
placeholder="工作流名称"
|
||||
clearable
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="#" type="index"></el-table-column>
|
||||
<el-table-column label="ID" prop="id" min-width="150"></el-table-column>
|
||||
<el-table-column
|
||||
label="工作流名称"
|
||||
prop="name"
|
||||
min-width="200"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="标识"
|
||||
prop="key"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="工单查看权限校验"
|
||||
prop="view_permission_check"
|
||||
min-width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.view_permission_check">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="工作流描述"
|
||||
prop="description"
|
||||
min-width="150"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
min-width="150"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="workflowShow(scope.row)"
|
||||
v-auth="'workflow.update'"
|
||||
>配置
|
||||
</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="workflowEdit(scope.row)"
|
||||
v-auth="'workflow.update'"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="handleWatch(scope)"
|
||||
>
|
||||
流程图
|
||||
</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="workflowDel(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="danger"
|
||||
v-auth="'workflow.delete'"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<div class="svgMark" v-if="limitedWatch" @click="closeMark">
|
||||
<div class="svgWrapper">
|
||||
<div class="svgItem">
|
||||
工作流流程图<i
|
||||
class="el-dialog__close el-icon el-icon-close"
|
||||
@click="closeMark"
|
||||
></i>
|
||||
</div>
|
||||
<div style="width: 90%; margin: auto">
|
||||
<svg
|
||||
:height="mySvgHeight"
|
||||
id="mySvg"
|
||||
style="width: 100% !important"
|
||||
></svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog :title="titleMap[type]" v-model="limitedVisible">
|
||||
<el-form
|
||||
:model="addForm"
|
||||
:rules="rules"
|
||||
ref="addForm"
|
||||
label-width="100px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="addForm.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标识" prop="key">
|
||||
<el-input v-model="addForm.key" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="流水前缀">
|
||||
<el-input v-model="addForm.sn_prefix" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
<el-input
|
||||
v-model="addForm.description"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="描述"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="查看权限校验">
|
||||
<el-switch v-model="addForm.view_permission_check"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="展现表单字段">
|
||||
<el-transfer
|
||||
v-model="addForm.display_form_str"
|
||||
:data="choiceOption"
|
||||
:titles="['未展示字段', '展示字段']"
|
||||
:props="{ key: 'id', label: 'field_name' }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="标题模板">
|
||||
<el-input v-model="addForm.title_template" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容模板">
|
||||
<el-input v-model="addForm.content_template" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="limitedVisible = false">取 消</el-button>
|
||||
<el-button
|
||||
v-if="type !== 'show'"
|
||||
type="primary"
|
||||
:loading="isSaving"
|
||||
@click="submitHandle()"
|
||||
>保 存</el-button
|
||||
>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dagreD3 from 'dagre-d3'
|
||||
import * as d3 from 'd3'
|
||||
import dagreD3 from "dagre-d3";
|
||||
import * as d3 from "d3";
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.wf.workflow.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
choiceOption: [],
|
||||
search: {
|
||||
keyword: null
|
||||
},
|
||||
mySvgHeight: null,
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
limitedWatch: false,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: '新增',
|
||||
edit: '编辑',
|
||||
show: '查看'
|
||||
},
|
||||
//表单数据
|
||||
addForm: {
|
||||
name: "",
|
||||
sn_prefix: "",
|
||||
description: "",
|
||||
view_permission_check: true,
|
||||
display_form_str: [],
|
||||
title_template: "",
|
||||
content_template: "",
|
||||
},
|
||||
//验证规则
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: '请输入工作流名称'}
|
||||
]
|
||||
},
|
||||
menu: {
|
||||
list: [],
|
||||
checked: ['1513426415243104256'],
|
||||
props: {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.getGroup();
|
||||
},
|
||||
methods: {
|
||||
//添加工作流
|
||||
handleAdd() {
|
||||
this.type = 'add';
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
export default {
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.wf.workflow.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
choiceOption: [],
|
||||
query: {},
|
||||
mySvgHeight: null,
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
limitedWatch: false,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
show: "查看",
|
||||
},
|
||||
//表单数据
|
||||
addForm: {
|
||||
name: "",
|
||||
sn_prefix: "",
|
||||
description: "",
|
||||
view_permission_check: true,
|
||||
display_form_str: [],
|
||||
title_template: "",
|
||||
content_template: "",
|
||||
},
|
||||
//验证规则
|
||||
rules: {
|
||||
name: [{ required: true, message: "请输入工作流名称" }],
|
||||
},
|
||||
menu: {
|
||||
list: [],
|
||||
checked: ["1513426415243104256"],
|
||||
props: {
|
||||
children: "children",
|
||||
label: "name",
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.getGroup();
|
||||
},
|
||||
methods: {
|
||||
//添加工作流
|
||||
handleAdd() {
|
||||
this.type = "add";
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
|
||||
submitHandle() {
|
||||
let that = this;
|
||||
this.$refs.addForm.validate((valid) => {
|
||||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
that.submit();
|
||||
}
|
||||
})
|
||||
},
|
||||
submitHandle() {
|
||||
let that = this;
|
||||
this.$refs.addForm.validate((valid) => {
|
||||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
that.submit();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
async submit() {
|
||||
let that = this;
|
||||
let res = null;
|
||||
try {
|
||||
if (that.type === 'add') {
|
||||
res = await that.$API.wf.workflow.create.req(that.addForm)
|
||||
} else {
|
||||
res = await that.$API.wf.workflow.update.req(that.editId, that.addForm);
|
||||
}
|
||||
that.isSaveing = false;
|
||||
that.limitedVisible = false;
|
||||
that.$refs.table.refresh();
|
||||
} catch (e) {
|
||||
that.isSaveing = false;
|
||||
}
|
||||
},
|
||||
async submit() {
|
||||
let that = this;
|
||||
let res = null;
|
||||
try {
|
||||
if (that.type === "add") {
|
||||
res = await that.$API.wf.workflow.create.req(that.addForm);
|
||||
} else {
|
||||
res = await that.$API.wf.workflow.update.req(
|
||||
that.editId,
|
||||
that.addForm
|
||||
);
|
||||
}
|
||||
that.isSaveing = false;
|
||||
that.limitedVisible = false;
|
||||
that.$refs.table.refresh();
|
||||
} catch (e) {
|
||||
that.isSaveing = false;
|
||||
}
|
||||
},
|
||||
|
||||
//编辑工作流
|
||||
workflowEdit(row) {
|
||||
this.type = 'edit';
|
||||
this.editId = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.addForm = Object.assign({}, row);
|
||||
},
|
||||
//编辑工作流
|
||||
workflowEdit(row) {
|
||||
this.type = "edit";
|
||||
this.editId = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.addForm = Object.assign({}, row);
|
||||
},
|
||||
|
||||
//工作流配置
|
||||
workflowShow(row) {
|
||||
let workflow = sessionStorage.getItem('jinYuWorkflowId');
|
||||
if (workflow) {
|
||||
sessionStorage.removeItem('jinYuWorkflowId');
|
||||
sessionStorage.setItem('jinYuWorkflowId', row.id);
|
||||
} else {
|
||||
sessionStorage.setItem('jinYuWorkflowId', row.id);
|
||||
}
|
||||
this.$router.push({path: '/wf/configuration'});
|
||||
},
|
||||
//工作流配置
|
||||
workflowShow(row) {
|
||||
let workflow = sessionStorage.getItem("jinYuWorkflowId");
|
||||
if (workflow) {
|
||||
sessionStorage.removeItem("jinYuWorkflowId");
|
||||
sessionStorage.setItem("jinYuWorkflowId", row.id);
|
||||
} else {
|
||||
sessionStorage.setItem("jinYuWorkflowId", row.id);
|
||||
}
|
||||
this.$router.push({ path: "/wf/configuration" });
|
||||
},
|
||||
|
||||
//删除工作流
|
||||
async workflowDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.wf.workflow.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg)
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功")
|
||||
// this.$alert(res.message, "提示", {type: 'error'})
|
||||
}
|
||||
},
|
||||
//删除工作流
|
||||
async workflowDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.wf.workflow.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
// this.$alert(res.message, "提示", {type: 'error'})
|
||||
}
|
||||
},
|
||||
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection) {
|
||||
this.selection = selection;
|
||||
},
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection) {
|
||||
this.selection = selection;
|
||||
},
|
||||
|
||||
//搜索
|
||||
upsearch() {
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
|
||||
},
|
||||
//根据ID获取树结构
|
||||
filterTree(id) {
|
||||
var target = null;
|
||||
|
||||
//根据ID获取树结构
|
||||
filterTree(id) {
|
||||
var target = null;
|
||||
function filter(tree) {
|
||||
tree.forEach((item) => {
|
||||
if (item.id == id) {
|
||||
target = item;
|
||||
}
|
||||
if (item.children) {
|
||||
filter(item.children);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function filter(tree) {
|
||||
tree.forEach(item => {
|
||||
if (item.id == id) {
|
||||
target = item
|
||||
}
|
||||
if (item.children) {
|
||||
filter(item.children)
|
||||
}
|
||||
})
|
||||
}
|
||||
filter(this.$refs.table.tableData);
|
||||
return target;
|
||||
},
|
||||
|
||||
filter(this.$refs.table.tableData);
|
||||
return target
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, type) {
|
||||
if (type == "add") {
|
||||
this.$refs.table.refresh();
|
||||
} else if (type == "edit") {
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
},
|
||||
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, type) {
|
||||
if (type == 'add') {
|
||||
this.$refs.table.refresh()
|
||||
} else if (type == 'edit') {
|
||||
this.$refs.table.refresh()
|
||||
}
|
||||
},
|
||||
handleWatch(scope) {
|
||||
debugger;
|
||||
let that = this;
|
||||
let workFlow = scope.row.id;
|
||||
that.limitedWatch = true;
|
||||
that.$nextTick(() => {
|
||||
var g = new dagreD3.graphlib.Graph().setGraph({
|
||||
rankdir: "DL",
|
||||
nodesep: 100,
|
||||
edgesep: 50, //两条线之间的距离
|
||||
ranksep: 50, //节点之间的距离
|
||||
marginx: 160,
|
||||
marginy: 20,
|
||||
});
|
||||
//获取state得到节点
|
||||
that.$API.wf.workflow.states.req(workFlow).then((response) => {
|
||||
if (!response.err_msg) {
|
||||
let nodes = response;
|
||||
// 添加节点
|
||||
nodes.forEach((item) => {
|
||||
g.setNode(item.id, {
|
||||
// 节点标签
|
||||
label: item.name,
|
||||
// 节点形状
|
||||
shape: "rect",
|
||||
toolText: item.name,
|
||||
//节点样式
|
||||
style: "fill:#fff;stroke:#000",
|
||||
labelStyle: "fill:#000;",
|
||||
rx: 5, //矩形节点圆角度
|
||||
ry: 5,
|
||||
});
|
||||
});
|
||||
//获取流转得到线 链接关系
|
||||
that.$API.wf.workflow.transitions.req(workFlow).then((res) => {
|
||||
if (!res.err_msg) {
|
||||
let transitionList = res;
|
||||
transitionList.forEach((transition0) => {
|
||||
if (transition0.condition_expression.length > 0) {
|
||||
g.setNode(transition0.source_state_.id + 100000, {
|
||||
label: "条件表达式",
|
||||
style: "stroke: #000;fill: #afa",
|
||||
shape: "diamond",
|
||||
});
|
||||
g.setEdge(
|
||||
transition0.source_state_.id,
|
||||
transition0.source_state_.id + 100000,
|
||||
{
|
||||
// 边标签
|
||||
label: transition0.name,
|
||||
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px",
|
||||
}
|
||||
);
|
||||
let condition_expression = transition0.condition_expression;
|
||||
condition_expression.forEach((condition_expression0) => {
|
||||
g.setEdge(
|
||||
transition0.source_state_.id + 100000,
|
||||
condition_expression0.target_state,
|
||||
{
|
||||
label: condition_expression0.label,
|
||||
style:
|
||||
"fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px",
|
||||
}
|
||||
);
|
||||
});
|
||||
} else {
|
||||
g.setEdge(
|
||||
transition0.source_state_.id,
|
||||
transition0.destination_state_.id,
|
||||
{
|
||||
// 边标签
|
||||
label: transition0.name,
|
||||
// 边样式
|
||||
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 根据后台数据来改变连线的颜色
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
g.nodes().length - 1;
|
||||
// 创建渲染器
|
||||
let render = new dagreD3.render();
|
||||
// 选择 svg 并添加一个g元素作为绘图容器.
|
||||
let svg = d3.select("#mySvg");
|
||||
let svgGroup = svg.append("g");
|
||||
// 在绘图容器上运行渲染器生成流程图.
|
||||
render(d3.select("svg g"), g);
|
||||
that.mySvgHeight =
|
||||
document
|
||||
.getElementsByClassName("nodes")[0]
|
||||
.getBoundingClientRect().height + 50;
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
handleWatch(scope) {
|
||||
debugger;
|
||||
let that = this;
|
||||
let workFlow = scope.row.id;
|
||||
that.limitedWatch = true;
|
||||
that.$nextTick(() => {
|
||||
var g = new dagreD3.graphlib.Graph().setGraph({
|
||||
rankdir: 'DL',
|
||||
nodesep: 100,
|
||||
edgesep: 50,//两条线之间的距离
|
||||
ranksep: 50,//节点之间的距离
|
||||
marginx: 160,
|
||||
marginy: 20,
|
||||
});
|
||||
//获取state得到节点
|
||||
that.$API.wf.workflow.states.req(workFlow).then((response) => {
|
||||
if (!response.err_msg) {
|
||||
let nodes = response;
|
||||
// 添加节点
|
||||
nodes.forEach((item) => {
|
||||
g.setNode(item.id, {
|
||||
// 节点标签
|
||||
label: item.name,
|
||||
// 节点形状
|
||||
shape: 'rect',
|
||||
toolText: item.name,
|
||||
//节点样式
|
||||
style: "fill:#fff;stroke:#000",
|
||||
labelStyle: "fill:#000;",
|
||||
rx: 5,//矩形节点圆角度
|
||||
ry: 5
|
||||
});
|
||||
});
|
||||
//获取流转得到线 链接关系
|
||||
that.$API.wf.workflow.transitions.req(workFlow).then((res) => {
|
||||
if (!res.err_msg) {
|
||||
let transitionList = res;
|
||||
transitionList.forEach((transition0) => {
|
||||
if (transition0.condition_expression.length > 0) {
|
||||
g.setNode(transition0.source_state_.id + 100000, {
|
||||
label: "条件表达式",
|
||||
style: "stroke: #000;fill: #afa",
|
||||
shape: "diamond"
|
||||
});
|
||||
g.setEdge(transition0.source_state_.id, transition0.source_state_.id + 100000, {
|
||||
// 边标签
|
||||
label: transition0.name,
|
||||
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px"
|
||||
});
|
||||
let condition_expression = transition0.condition_expression;
|
||||
condition_expression.forEach(condition_expression0 => {
|
||||
g.setEdge(transition0.source_state_.id + 100000, condition_expression0.target_state, {
|
||||
label: condition_expression0.label,
|
||||
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px"
|
||||
})
|
||||
})
|
||||
} else {
|
||||
g.setEdge(transition0.source_state_.id, transition0.destination_state_.id, {
|
||||
// 边标签
|
||||
label: transition0.name,
|
||||
// 边样式
|
||||
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px" // 根据后台数据来改变连线的颜色
|
||||
});
|
||||
}
|
||||
});
|
||||
g.nodes().length - 1;
|
||||
// 创建渲染器
|
||||
let render = new dagreD3.render();
|
||||
// 选择 svg 并添加一个g元素作为绘图容器.
|
||||
let svg = d3.select('#mySvg');
|
||||
let svgGroup = svg.append('g');
|
||||
// 在绘图容器上运行渲染器生成流程图.
|
||||
render(d3.select("svg g"), g);
|
||||
that.mySvgHeight = document.getElementsByClassName('nodes')[0].getBoundingClientRect().height + 50;
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
closeMark() {
|
||||
this.limitedWatch = false;
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
closeMark() {
|
||||
this.limitedWatch = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.treeMain {
|
||||
height: 280px;
|
||||
overflow: auto;
|
||||
border: 1px solid #dcdfe6;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.treeMain {
|
||||
height: 280px;
|
||||
overflow: auto;
|
||||
border: 1px solid #dcdfe6;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .2);
|
||||
background-color: #fefefe;
|
||||
border-radius: 5px;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
|
||||
background-color: #fefefe;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5);
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.svgMark {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
z-index: 2000;
|
||||
background: rgba(0, 0, 0, .3);
|
||||
}
|
||||
.svgMark {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
z-index: 2000;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.svgWrapper {
|
||||
background: #fff;
|
||||
width: 800px;
|
||||
margin: 5vh auto;
|
||||
height: 90vh;
|
||||
text-align: center;
|
||||
border-radius: 2px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.svgWrapper {
|
||||
background: #fff;
|
||||
width: 800px;
|
||||
margin: 5vh auto;
|
||||
height: 90vh;
|
||||
text-align: center;
|
||||
border-radius: 2px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.svgItem {
|
||||
padding: 20px 40px 0;
|
||||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.svgItem {
|
||||
padding: 20px 40px 0;
|
||||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
|
||||
Microsoft YaHei, Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
svg {
|
||||
font-size: 14px;
|
||||
}
|
||||
svg {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.node rect {
|
||||
stroke: #606266;
|
||||
fill: #fff;
|
||||
}
|
||||
.node rect {
|
||||
stroke: #606266;
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.edgePath path {
|
||||
stroke: #606266;
|
||||
fill: #333;
|
||||
stroke-width: 1.5px;
|
||||
}
|
||||
.edgePath path {
|
||||
stroke: #606266;
|
||||
fill: #333;
|
||||
stroke-width: 1.5px;
|
||||
}
|
||||
|
||||
g.conditions > rect {
|
||||
fill: #00ffd0;
|
||||
stroke: #000;
|
||||
}
|
||||
g.conditions > rect {
|
||||
fill: #00ffd0;
|
||||
stroke: #000;
|
||||
}
|
||||
|
||||
.el-icon-close {
|
||||
cursor: pointer;
|
||||
}
|
||||
.el-icon-close {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue