前端页面优化

This commit is contained in:
曹前明 2022-07-23 19:19:58 +08:00
parent 50f025455a
commit f40bee35be
44 changed files with 1640 additions and 1458 deletions

View File

@ -16,8 +16,8 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="关键词搜索" clearable></el-input> <el-input v-model="query.search" 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>
</div> </div>
</el-header> </el-header>
@ -155,7 +155,7 @@
this.selection = selection; this.selection = selection;
}, },
// //
upsearch(){ handleQuery(){
} }
} }

View File

@ -1,6 +1,56 @@
<template> <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" ref="dialogForm"
:model="form" :model="form"
:rules="rules" :rules="rules"
@ -133,10 +183,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form> -->
<el-card> <el-card header="作业人员" style="margin-top:8px" shadow="hover">
<div>作业人员</div>
<!--作业人员!-->
<scTable <scTable
ref="workerTable" ref="workerTable"
:data="apiworkerObj" :data="apiworkerObj"
@ -173,17 +221,15 @@
prop="create_time" prop="create_time"
width="150" width="150"
></el-table-column> ></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"> <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,'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> </template>
</el-table-column> </el-table-column> -->
</scTable> </scTable>
</el-card> </el-card>
<el-card> <el-card header="气体检测记录" style="margin-top: 8px" shadow="hover">
<div>气体检测记录</div>
<!--气体检测记录!-->
<scTable <scTable
ref="gasTable" ref="gasTable"
:data="apigasObj" :data="apigasObj"
@ -194,7 +240,6 @@
> >
<el-table-column <el-table-column
label="#" label="#"
fixed="left"
type="index" type="index"
width="50" width="50"
></el-table-column> ></el-table-column>
@ -240,6 +285,7 @@
></el-table-column> ></el-table-column>
</scTable> </scTable>
</el-card> </el-card>
</el-main>
</template> </template>
<script> <script>
@ -251,6 +297,7 @@
}, },
data() { data() {
return { return {
mainLoading: false,
active: 0, active: 0,
stepSuc: [0], stepSuc: [0],
stepTitle: ["基本信息", "作业人员", "气体检测记录"], stepTitle: ["基本信息", "作业人员", "气体检测记录"],
@ -298,17 +345,23 @@
true: "正常", true: "正常",
false: "不正常", false: "不正常",
}, },
act_states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
}; };
}, },
mounted() { mounted() {
let that = this; let that = this;
that.oplId = that.id; //ID that.oplId = that.id; //ID
this.$nextTick(()=>{ this.$nextTick(()=>{
debugger;
console.log("this.getData");
that.getOplData(); that.getOplData();
that.getDept(); // that.getDept();
that.getUser(); // that.getUser();
that.getworkerList(); that.getworkerList();
that.getgasList(); that.getgasList();
}) })
@ -316,48 +369,49 @@
methods: { methods: {
//oplId //oplId
getOplData() { getOplData() {
debugger; this.mainLoading = true
this.$API.opm.opl.read.req(this.oplId).then((res) => { this.$API.opm.opl.read.req(this.oplId).then((res) => {
this.mainLoading = false
this.form = res; this.form = res;
this.oplcateId = res.cate; // this.oplcateId = res.cate;
this.operationId = res.operation; // this.operationId = res.operation;
this.getOperation(); // this.getOperation();
this.getOplcates(); // this.getOplcates();
}); }).catch(e=>{this.mainLoading=false});
}, },
//ID===> // //ID===>
getOplcates() { // getOplcates() {
debugger; // debugger;
this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => { // this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
console.log(res); // // console.log(res); //
this.pagtitle = res.name; // this.pagtitle = res.name;
this.oplcateCode = res.code; // this.oplcateCode = res.code;
this.risklist = res.risk_options_; // // this.risklist = res.risk_options_; //
this.measurelist = res.measure_options_; // // this.measurelist = res.measure_options_; //
}); // });
}, // },
//operationId // //operationId
getOperation() { // getOperation() {
this.$API.opm.operation.read.req(this.operationId).then((res) => { // this.$API.opm.operation.read.req(this.operationId).then((res) => {
this.form.start_time = res.start_time; // // this.form.start_time = res.start_time; //
this.form.end_time = res.end_time; // // this.form.end_time = res.end_time; //
this.form.name = res.name; // // this.form.name = res.name; //
}); // });
}, // },
// // //
getDept() { // getDept() {
this.$API.system.dept.list.req({page: 0}).then((res) => { // this.$API.system.dept.list.req({page: 0}).then((res) => {
this.deptoptions = genTree(res); // this.deptoptions = genTree(res);
}); // });
}, // },
// // //
getUser() { // getUser() {
this.$API.system.user.list.req({page: 0}).then((res) => { // this.$API.system.user.list.req({page: 0}).then((res) => {
this.useroptions = res; // this.useroptions = res;
}); // });
}, // },
// //
getworkerList(id) { getworkerList(id) {
this.$API.opm.worker.list.req({opl: id, page: 0}).then((res) => { this.$API.opm.worker.list.req({opl: id, page: 0}).then((res) => {
@ -370,14 +424,6 @@
this.apigasObj = res; this.apigasObj = res;
}); });
}, },
bltHandle(item,index){
if(index==='1'){
//
}else{
//
}
},
}, },
} }
</script> </script>

View File

@ -59,15 +59,15 @@
<el-header style="border-bottom: none"> <el-header style="border-bottom: none">
<div class="left-panel"> <div class="left-panel">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="姓名" placeholder="姓名"
clearable clearable
@click="upsearch" @click="handleQuery"
></el-input> ></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="upsearch" @click="handleQuery"
></el-button> ></el-button>
</div> </div>
</el-header> </el-header>
@ -140,9 +140,6 @@
apiObj: [], apiObj: [],
query: {}, query: {},
selection: [], selection: [],
search: {
keyword: null,
},
filterText: "", filterText: "",
filterTexts: "", filterTexts: "",
deptdata: [], deptdata: [],
@ -209,9 +206,9 @@
this.apiObj = res; this.apiObj = res;
}); });
}, },
upsearch() { handleQuery() {
this.$API.system.user.list this.$API.system.user.list
.req({name: this.search.keyword, page: 0}) .req(this.query)
.then((res) => { .then((res) => {
this.apiObj = res; this.apiObj = res;
}); });

View File

@ -107,7 +107,7 @@ const routes = [
"name": "eventhandlefrom", "name": "eventhandlefrom",
"path": "/ecm/event_handlefrom", "path": "/ecm/event_handlefrom",
"meta": { "meta": {
"title": "处理作业", "title": "处理事件",
"icon": "el-icon-menu", "icon": "el-icon-menu",
"hidden": true, "hidden": true,
}, },
@ -602,14 +602,14 @@ const routes = [
} }
, ,
{ {
"name": "certificates", "name": "certificate",
"path": "/hrm/certificates", "path": "/hrm/certificate",
"meta": { "meta": {
"title": "证书列表", "title": "证书列表",
"icon": "el-icon-tickets", "icon": "el-icon-tickets",
"perms": ["certificates"] "perms": ["certificate"]
}, },
"component": "hrm/certificates" "component": "hrm/certificate"
} }
, ,
{ {

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="user-bar"> <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> <el-icon><el-icon-search /></el-icon>
</div> </div> -->
<div class="screen panel-item hidden-sm-and-down" @click="screen"> <div class="screen panel-item hidden-sm-and-down" @click="screen">
<el-icon><el-icon-full-screen /></el-icon> <el-icon><el-icon-full-screen /></el-icon>
</div> </div>

View File

@ -69,12 +69,12 @@
v-model="search.keyword" v-model="search.keyword"
placeholder="姓名" placeholder="姓名"
clearable clearable
@click="upsearch" @click="handleQuery"
></el-input> ></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="upsearch" @click="handleQuery"
></el-button> ></el-button>
</div> </div>
<div class="right-panel"> <div class="right-panel">
@ -227,7 +227,7 @@ export default {
this.apiObj = res; this.apiObj = res;
}); });
}, },
upsearch() { handleQuery() {
this.$API.system.user.list this.$API.system.user.list
.req({ name: this.search.keyword, page: 0 }) .req({ name: this.search.keyword, page: 0 })
.then((res) => { .then((res) => {

View File

@ -57,6 +57,9 @@
border-left: 1px solid var(--el-border-color-light); border-left: 1px solid var(--el-border-color-light);
} }
.el-divider--horizontal {
margin: 12px 0;
}
.el-header { .el-header {
background: #fff; background: #fff;
border-bottom: 1px solid var(--el-border-color-light); border-bottom: 1px solid var(--el-border-color-light);

View File

@ -18,12 +18,12 @@
v-model="search.keyword" v-model="search.keyword"
placeholder="姓名/手机号" placeholder="姓名/手机号"
clearable clearable
@click="upsearch" @click="handleQuery"
></el-input> ></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="upsearch" @click="handleQuery"
></el-button> ></el-button>
</div> </div>
</div> </div>
@ -170,12 +170,12 @@
v-model="search.keyword" v-model="search.keyword"
placeholder="姓名/手机号" placeholder="姓名/手机号"
clearable clearable
@click="upsearch" @click="handleQuery"
></el-input> ></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="upsearch" @click="handleQuery"
></el-button> ></el-button>
</div> </div>
</div> </div>
@ -432,7 +432,7 @@ export default {
}, },
// //
upsearch() {}, handleQuery() {},
//ID //ID
filterTree(id) { filterTree(id) {

View File

@ -12,15 +12,15 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="编号" placeholder="编号"
clearable clearable
@click="upsearch" @click="handleQuery"
></el-input> ></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="upsearch" @click="handleQuery"
></el-button> ></el-button>
</div> </div>
</el-header> </el-header>
@ -157,7 +157,9 @@ export default {
}, },
// //
upsearch() {}, handleQuery() {
this.$refs.table.queryData(this.query)
},
resetQuery() { resetQuery() {
this.query = {}; this.query = {};

View File

@ -8,8 +8,8 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="姓名/手机号" clearable @click="upsearch"></el-input> <el-input v-model="query.search" placeholder="姓名/手机号" clearable @click="handleQuery"></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>
</div> </div>
</el-header> --> </el-header> -->
@ -160,7 +160,9 @@ export default {
}, },
// //
upsearch() {}, handleQuery() {
this.$refs.table.queryData(this.query)
},
// //
resetQuery() { resetQuery() {

View File

@ -3,7 +3,7 @@
<!--<sc-title title="详细信息"></sc-title>--> <!--<sc-title title="详细信息"></sc-title>-->
<el-main> <el-main>
<el-card> <el-card>
<el-descriptions title="事件基本信息" :border="true"> <el-descriptions title="事件信息" :border="true">
<el-descriptions-item label="事件种类"><el-tag <el-descriptions-item label="事件种类"><el-tag
v-for="item in form.cates_" v-for="item in form.cates_"
:key="item.id" :key="item.id"
@ -74,6 +74,7 @@
fit fit
stripe stripe
hidePagination hidePagination
hideRefresh
> >
<el-table-column label="#" type="index" width="50"></el-table-column> <el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column label="事件种类" width="200"> <el-table-column label="事件种类" width="200">

View File

@ -8,8 +8,8 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="姓名/手机号" clearable @click="upsearch"></el-input> <el-input v-model="search.keyword" placeholder="姓名/手机号" clearable @click="handleQuery"></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>
</div> </div>
</el-header> --> </el-header> -->
@ -136,7 +136,7 @@ export default {
}, },
// //
upsearch() {}, handleQuery() {},
// //
resetQuery() { resetQuery() {

View File

@ -15,8 +15,8 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="姓名/手机号" placeholder="证书名称/编号"
clearable clearable
></el-input> ></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" 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="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="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="issue_date" width="180"></el-table-column>
<el-table-column label="有效期" prop="expiration_date" width="200"> </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="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"> <el-table-column label="操作" fixed="right" align="left" width="170">
<template #default="scope"> <template #default="scope">
<el-button-group> <el-button-group>
@ -65,7 +76,7 @@
</el-main> </el-main>
</el-container> </el-container>
<sc-dialog v-model="dialogcart" draggable title="创建人员证书"> <sc-dialog v-model="dialogcart" draggable title="人员证书">
<el-form <el-form
ref="dialogForm" ref="dialogForm"
:model="form" :model="form"
@ -74,6 +85,14 @@
label-width="120px" label-width="120px"
> >
<el-row> <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-col :md="12" :sm="24">
<el-form-item label="证书名称" prop="name"> <el-form-item label="证书名称" prop="name">
<el-input <el-input
@ -136,15 +155,14 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="24" :sm="12" :xs="24"> <el-col :md="24" :sm="12" :xs="24">
<el-form-item label="上传证书文件"> <el-form-item label="上传证书">
<sc-upload-file <sc-upload-file
v-model="form.file" v-model="form.file"
:limit="5" :multiple="false"
:data="{ otherData: 'demo' }" accept="image/png, image/jpeg, image/jpeg, pdf"
tip="最多上传3个文件,单个文件不要超过10M,请上传xlsx/docx格式文件"
> >
<el-button type="primary" icon="el-icon-upload" <el-button type="primary" icon="el-icon-upload"
>上传附件</el-button >上传</el-button
> >
</sc-upload-file> </sc-upload-file>
</el-form-item> </el-form-item>
@ -207,6 +225,9 @@ export default {
} }
}, },
handleQuery(){
this.$refs.table.queryData(this.query)
},
// //
getcertificatelist() { getcertificatelist() {
this.$API.hrm.certificate.list this.$API.hrm.certificate.list

View File

@ -2,7 +2,12 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <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="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> --> <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">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="姓名/手机号" placeholder="证书名称/编号"
clearable clearable
></el-input> ></el-input>
@ -189,6 +194,9 @@ export default {
} }
}, },
handleQuery() {
this.$refs.table.queryData(this.query)
},
// //
getcertificatelist() { getcertificatelist() {
this.$API.hrm.certificate.list this.$API.hrm.certificate.list

View File

@ -15,15 +15,15 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="姓名/手机号" placeholder="姓名/手机号"
clearable clearable
@click="upsearch" @click="handleQuery"
></el-input> ></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="upsearch" @click="handleQuery"
></el-button> ></el-button>
</div> </div>
</div> </div>
@ -37,10 +37,13 @@
stripe stripe
@resetQuery="resetQuery" @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="#" type="index" width="50"></el-table-column>
<el-table-column label="姓名" prop="name" width="150"></el-table-column> <el-table-column label="姓名" prop="name"></el-table-column>
<el-table-column label="证件照" prop="photo" width="200"> <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>
<el-table-column <el-table-column
label="手机号" label="手机号"
@ -59,23 +62,23 @@
></el-table-column> ></el-table-column>
<el-table-column label="操作" fixed="right" align="left" width="170"> <el-table-column label="操作" fixed="right" align="left" width="170">
<template #default="scope"> <template #default="scope">
<el-button <!-- <el-button
text link
type="primary" type="primary"
size="small" size="small"
@click="Addcertificate(scope.row)" @click="Addcertificate(scope.row)"
v-auth="'employee.update'" v-auth="'employee.update'"
>绑定证书 >证书
</el-button> </el-button> -->
<el-button <el-button
text link
type="success" type="success"
size="small" size="small"
@click="handleForm('show', scope.row)" @click="handleForm('show', scope.row)"
>查看 >查看
</el-button> </el-button>
<el-button <el-button
text link
type="warning" type="warning"
size="small" size="small"
v-auth="'employee.update'" v-auth="'employee.update'"
@ -84,19 +87,19 @@
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.blt_" v-if="scope.row.blt_"
text link
type="primary" type="danger"
size="small" size="small"
@click="handleBindBlt(20, scope.row)" @click="handleBindBlt(20, scope.row)"
>解绑 >解绑
</el-button> </el-button>
<el-button <el-button
v-else v-else
text link
type="primary" type="primary"
size="small" size="small"
@click="handleBindBlt(10, scope.row)" @click="handleBindBlt(10, scope.row)"
> >
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -178,14 +181,14 @@
}, },
methods: { methods: {
// //
Addcertificate(row) { // Addcertificate(row) {
this.$router.push({ // this.$router.push({
name: "certificate", // name: "certificate",
query: { // query: {
id: row.id, // id: row.id,
}, // },
}); // });
}, // },
// //
handleForm(type, row) { handleForm(type, row) {
this.dialog.save = true; this.dialog.save = true;
@ -270,7 +273,8 @@
}, 500); }, 500);
}, },
// //
upsearch() { handleQuery() {
this.$refs.table.queryData(this.query)
}, },
//ID //ID
filterTree(id) { filterTree(id) {

View File

@ -104,8 +104,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="签名"> <el-form-item label="签名">
<sc-upload v-model="form.signature" title="签名"></sc-upload> <sc-upload v-model="form.signature" title="签名"></sc-upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>

View File

@ -9,15 +9,15 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="名称" placeholder="名称"
clearable clearable
@click="upsearch" @click="handleQuery"
></el-input> ></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="upsearch" @click="handleQuery"
></el-button> ></el-button>
</div> </div>
</div> </div>
@ -33,7 +33,6 @@
> >
<el-table-column <el-table-column
label="#" label="#"
fixed="left"
type="index" type="index"
width="50" width="50"
></el-table-column> ></el-table-column>
@ -41,67 +40,54 @@
label="作业简介" label="作业简介"
prop="name" prop="name"
width="200" width="200"
fixed="left"
></el-table-column> ></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> <template #default="scope">{{stateoptions[scope.row.state]}}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="生产状态" label="生产状态"
prop="state_work" 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>
<el-table-column <el-table-column
label="作业区域" label="作业区域"
prop="area" ><template #default="scope">
width="180" {{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>
<el-table-column <el-table-column
label="属地部门" label="属地部门"
prop="dept_ter" prop="dept_ter"
width="180" ><template #default="scope">
></el-table-column> {{scope.row.dept_ter_.name}}
</template></el-table-column>
<el-table-column <el-table-column
label="业务部门" label="业务部门"
prop="dept_bus" prop="dept_bus"
width="180" ><template #default="scope">
></el-table-column> {{scope.row.dept_bus_.name}}
<el-table-column </template></el-table-column>
label="业务部门协调员"
prop="coordinator"
width="180"
></el-table-column>
<el-table-column <el-table-column
label="创建人" label="创建人"
prop="create_by" prop="create_by"
width="180" ><template #default="scope">
></el-table-column> {{scope.row.create_by_.name}}
</template></el-table-column>
<el-table-column <el-table-column
label="创建时间" label="创建时间"
prop="create_time" prop="create_time"
width="180"
></el-table-column> ></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"> <template #default="scope">
<el-button-group>
<el-button <el-button
text link
type="primary" type="primary"
size="small" size="small"
v-auth="'operation.update'" v-auth="'operation.update'"
@ -109,7 +95,7 @@
>许可证 >许可证
</el-button> </el-button>
<el-button <el-button
text link
type="primary" type="primary"
size="small" size="small"
@click="table_show(scope.row, scope.$index)" @click="table_show(scope.row, scope.$index)"
@ -117,7 +103,7 @@
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.state === 10" v-if="scope.row.state === 10"
text link
type="warning" type="warning"
size="small" size="small"
v-auth="'operation.update'" v-auth="'operation.update'"
@ -125,7 +111,7 @@
>编辑 >编辑
</el-button> </el-button>
<el-button <el-button
text link
type="danger" type="danger"
size="small" size="small"
v-if="scope.row.state === 10" v-if="scope.row.state === 10"
@ -133,7 +119,6 @@
@click="table_del(scope.row)" @click="table_del(scope.row)"
>删除 >删除
</el-button> </el-button>
</el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
@ -247,7 +232,7 @@
}, 500); }, 500);
}, },
// //
upsearch() { handleQuery() {
}, },
//ID //ID
filterTree(id) { filterTree(id) {

View File

@ -1,6 +1,44 @@
<template> <template>
<el-container> <el-main v-loading="mainLoading">
<el-header> <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-card header="许可证" style="margin-top: 8px">
<div class="left-panel"> <div class="left-panel">
<el-button <el-button
icon="el-icon-plus" icon="el-icon-plus"
@ -15,104 +53,50 @@
{{ item.name }} {{ item.name }}
</el-button> </el-button>
</div> </div>
<div class="right-panel"> <el-divider />
<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 <scTable
ref="table" ref="table"
:data="apiObj" :data="apiObj"
row-key="id" row-key="id"
@selection-change="selectionChange" @selection-change="selectionChange"
stripe stripe
hidePagination
hideRefresh
@resetQuery="resetQuery" @resetQuery="resetQuery"
> >
<el-table-column <el-table-column label="#" type="index" width="50"></el-table-column>
label="#"
type="index"
width="50"
fixed="left"
></el-table-column>
<el-table-column <el-table-column
label="作业许可编号" label="作业许可编号"
prop="number" prop="number"
width="120" width="150"
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-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" align="right" width="170"> <el-table-column label="操作" fixed="right" width="80">
<template #default="scope"> <template #default="scope">
<el-button-group> <el-button-group>
<el-button <el-button
@ -121,8 +105,7 @@
size="small" size="small"
@click="table_show(scope.row, scope.$index)" @click="table_show(scope.row, scope.$index)"
>查看 >查看
</el-button </el-button>
>
<el-button <el-button
v-if="operationObj.state === 10" v-if="operationObj.state === 10"
text text
@ -131,17 +114,20 @@
v-auth="'opl.update'" v-auth="'opl.update'"
@click="table_edit(scope.row, scope.$index)" @click="table_edit(scope.row, scope.$index)"
>编辑 >编辑
</el-button </el-button>
>
</el-button-group> </el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-card>
<el-drawer :size="'50%'" v-model="showLimited" :title="oplName+'作业许可证详情'"> <el-drawer
:size="'50%'"
v-model="showLimited"
:title="oplName + '作业许可证详情'"
>
<sc-fire :id="oplId"></sc-fire> <sc-fire :id="oplId"></sc-fire>
</el-drawer> </el-drawer>
</el-container> </el-main>
</template> </template>
<script> <script>
import ScFire from "../../components/scOpl/scFire"; import ScFire from "../../components/scOpl/scFire";
@ -155,6 +141,7 @@
save: false, save: false,
permission: false, permission: false,
}, },
mainLoading: false,
apiObj: [], apiObj: [],
query: {}, query: {},
selection: [], selection: [],
@ -164,7 +151,7 @@
oplcateList: {}, oplcateList: {},
operationObj: {}, operationObj: {},
showLimited: false, showLimited: false,
oplId: '', oplId: "",
state_: { state_: {
10: "创建中", 10: "创建中",
20: "审批中", 20: "审批中",
@ -172,6 +159,14 @@
40: "进行中", 40: "进行中",
50: "已完成", 50: "已完成",
}, },
act_states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
}; };
}, },
@ -182,14 +177,22 @@
}, },
methods: { methods: {
getOperation() { getOperation() {
this.$API.opm.operation.read.req(this.$route.query.id).then((res) => { this.mainLoading = true;
debugger; this.$API.opm.operation.read
.req(this.$route.query.id)
.then((res) => {
this.mainLoading = false;
this.operationObj = res; this.operationObj = res;
})
.catch((e) => {
this.mainLoading = false;
}); });
}, },
// //
getopllist() { getopllist() {
this.$API.opm.opl.list.req({operation: this.$route.query.id, page: 0}).then((res) => { this.$API.opm.opl.list
.req({ operation: this.$route.query.id, page: 0 })
.then((res) => {
this.apiObj = res; this.apiObj = res;
}); });
}, },
@ -414,8 +417,7 @@
loading.close(); loading.close();
this.$message.success("操作成功"); this.$message.success("操作成功");
}) })
.catch(() => { .catch(() => {});
});
}, },
// //
selectionChange(selection) { selectionChange(selection) {
@ -432,8 +434,7 @@
}, 500); }, 500);
}, },
// //
upsearch() { handleQuery() {},
},
//ID //ID
filterTree(id) { filterTree(id) {
var target = null; var target = null;

View File

@ -8,8 +8,8 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="名称" clearable @click="upsearch"></el-input> <el-input v-model="query.search" placeholder="名称" clearable @click="handleQuery"></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>
</div> </div>
</el-header> </el-header>
@ -115,8 +115,8 @@
}, 500) }, 500)
}, },
// //
upsearch(){ handleQuery() {
this.$refs.table.queryData(this.query)
}, },
//ID //ID
filterTree(id){ filterTree(id){

View File

@ -282,9 +282,8 @@ export default {
this.selection = selection; this.selection = selection;
}, },
// //
upsearch() { handleQuery() {
let params = { search: this.search.keyword }; this.$refs.table.queryData(this.query)
this.$refs.table.queryData(params);
}, },
// //
handleSaveSuccess(data, mode) { handleSaveSuccess(data, mode) {

View File

@ -15,15 +15,15 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="姓名/手机号" placeholder="编号/名称"
clearable clearable
@click="upsearch" @click="handleQuery"
></el-input> ></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="upsearch" @click="handleQuery"
></el-button> ></el-button>
</div> </div>
</div> </div>
@ -37,21 +37,42 @@
stripe stripe
@resetQuery="resetQuery" @resetQuery="resetQuery"
> >
<el-table-column
<el-table-column label="#" fixed="left" type="index" width="50"></el-table-column> label="#"
<el-table-column label="证书名称" fixed="left" prop="name" width="150"></el-table-column> fixed="left"
<el-table-column label="证书编号" prop="number" width="200"> </el-table-column> type="index"
<el-table-column label="相关人员" prop="remployee_name" width="200"> </el-table-column> width="50"
<el-table-column label="证书类型" prop="type" width="200"><template #default="scope">{{type_[scope.row.type]}} </template></el-table-column> ></el-table-column>
<el-table-column label="发证日期" prop="issue_date" width="180"></el-table-column> <el-table-column label="证书名称" fixed="left" width="150">
<el-table-column label="有效期" prop="expiration_date" width="200"> </el-table-column> <template #default="scope">
<el-table-column label="下一次复审日期" prop="review_date" width="180"></el-table-column> <el-link
<el-table-column label="证书文件" prop="file" width="180"></el-table-column> 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"> <el-table-column label="操作" fixed="right" align="left" width="170">
<template #default="scope"> <template #default="scope">
<el-button-group>
<el-button <el-button
text link
type="warning" type="warning"
size="small" size="small"
@click="handleForm('edit', scope.row)" @click="handleForm('edit', scope.row)"
@ -64,10 +85,15 @@
@confirm="table_del(scope.row, scope.$index)" @confirm="table_del(scope.row, scope.$index)"
> >
<template #reference> <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> </template>
</el-popconfirm> </el-popconfirm>
</el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
@ -146,10 +172,7 @@
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="选择相关方人员"> <el-form-item label="选择相关方人员">
<el-select <el-select v-model="form.remployee" placeholder="选择相关方人员">
v-model="form.remployee"
placeholder="选择相关方人员"
>
<el-option <el-option
v-for="item in remployeeoptions" v-for="item in remployeeoptions"
:key="item.id" :key="item.id"
@ -160,16 +183,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="24" :sm="12" :xs="24"> <el-col :md="24" :sm="12" :xs="24">
<el-form-item label="上传证书文件"> <el-form-item label="上传证书">
<sc-upload-file <sc-upload-file
v-model="form.file" v-model="form.file"
:limit="5" :multiple="false"
:data="{ otherData: 'demo' }" accept="image/png, image/jpeg, image/jpeg, pdf"
tip="最多上传3个文件,单个文件不要超过10M,请上传xlsx/docx格式文件"
>
<el-button type="primary" icon="el-icon-upload"
>上传附件</el-button
> >
<el-button type="primary" icon="el-icon-upload">上传</el-button>
</sc-upload-file> </sc-upload-file>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -182,12 +202,7 @@
</sc-dialog> </sc-dialog>
</template> </template>
<script> <script>
const defaultform= const defaultform = { id: "", name: "", number: "", employee: "" };
{ id: "",
name: "",
number: "",
employee: ""
};
export default { export default {
name: "certificate", name: "certificate",
components: {}, components: {},
@ -215,25 +230,22 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getUser() this.getUser();
}, },
methods: { methods: {
handleQuery() {
this.$refs.table.queryData(this.query);
},
handleForm(type, row) { handleForm(type, row) {
if (type === "add") { if (type === "add") {
this.dialogcart = true; this.dialogcart = true;
this.form = Object.assign({}, defaultform); this.form = Object.assign({}, defaultform);
} else {
}
else {
this.dialogcart = true; this.dialogcart = true;
this.form = row; this.form = row;
} }
}, },
async table_del(row) { async table_del(row) {
this.$API.rpm.rcertificate.delete this.$API.rpm.rcertificate.delete
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
@ -248,7 +260,6 @@ export default {
// //
getUser() { getUser() {
this.$API.rpm.remployee.list.req({ page: 0 }).then((res) => { this.$API.rpm.remployee.list.req({ page: 0 }).then((res) => {
this.remployeeoptions = res; this.remployeeoptions = res;
}); });
}, },
@ -282,7 +293,6 @@ export default {
} }
}); });
}, },
}, },
}; };
</script> </script>

View File

@ -9,15 +9,15 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="" placeholder="名"
clearable clearable
></el-input> ></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="handleQuery"
></el-button> ></el-button>
</div> </div>
</div> </div>
@ -32,22 +32,25 @@
> >
<el-table-column label="#" type="index" width="50"></el-table-column> <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="name" ></el-table-column>
<el-table-column label="手机号" prop="phone" width="180"></el-table-column> <el-table-column label="手机号" prop="phone" ></el-table-column>
<el-table-column label="身份证号" prop="id_number" width="180"></el-table-column> <el-table-column label="身份证号" prop="id_number" ></el-table-column>
<el-table-column label="证件照" prop="photo" width="180" ></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"> <el-table-column label="操作" fixed="right" align="left" width="170">
<template #default="scope"> <template #default="scope">
<el-button-group>
<el-button <el-button
text link
type="primary" type="primary"
size="small" size="small"
@click="table_show(scope.row, scope.$index)" @click="table_show(scope.row, scope.$index)"
>查看</el-button >查看</el-button
> >
<!-- <el-button <!-- <el-button
text link
type="warning" type="warning"
size="small" size="small"
@click="table_edit(scope.row, scope.$index)" @click="table_edit(scope.row, scope.$index)"
@ -58,10 +61,9 @@
@confirm="table_del(scope.row, scope.$index)" @confirm="table_del(scope.row, scope.$index)"
> >
<template #reference> <template #reference>
<el-button text type="danger" size="small">删除</el-button> <el-button link type="danger" size="small">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
</el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
@ -154,6 +156,9 @@ export default {
this.$refs.table.refresh(); this.$refs.table.refresh();
} }
}, },
handleQuery() {
this.$refs.table.queryData(this.query)
},
resetQuery() { resetQuery() {
this.query = {}; this.query = {};
}, },

View File

@ -9,7 +9,7 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="名称" placeholder="名称"
clearable clearable
@ -38,44 +38,40 @@
<el-table-column <el-table-column
label="联系人" label="联系人"
prop="contacter" prop="contacter"
width="180"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="联系电话" label="联系电话"
prop="phone" prop="phone"
width="180"
></el-table-column> ></el-table-column>
<el-table-column <!-- <el-table-column
label="企业地址" label="企业地址"
prop="address" prop="address"
width="180" width="180"
></el-table-column> ></el-table-column> -->
<el-table-column <el-table-column
label="账号" label="账号"
prop="admin_username" prop="admin_username"
width="180"
></el-table-column> ></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"> <template #default="scope">
<el-button-group>
<el-button <el-button
v-if="scope.row.admin==null" v-if="scope.row.admin==null"
text link
type="primary" type="primary"
size="small" size="small"
@click="table_admin(scope.row)" @click="table_admin(scope.row)"
v-auth="'rparty:assgin'" v-auth="'rparty:assgin'"
>分配账号</el-button> >分配账号</el-button>
<el-button <el-button
text link
type="primary" type="primary"
size="small" size="small"
@click="table_show(scope.row, scope.$index)" @click="table_show(scope.row, scope.$index)"
>查看</el-button >查看</el-button
> >
<el-button <el-button
text link
type="warning" type="warning"
size="small" size="small"
@click="table_edit(scope.row, scope.$index)" @click="table_edit(scope.row, scope.$index)"
@ -87,10 +83,9 @@
@confirm="table_del(scope.row, scope.$index)" @confirm="table_del(scope.row, scope.$index)"
> >
<template #reference> <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> </template>
</el-popconfirm> </el-popconfirm>
</el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
@ -221,6 +216,9 @@ export default {
this.$refs.table.refresh(); this.$refs.table.refresh();
} }
}, },
handleQuery() {
this.$refs.table.queryData(this.query)
},
resetQuery() { resetQuery() {
this.query = {}; this.query = {};
}, },

View File

@ -9,7 +9,7 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="名称" placeholder="名称"
clearable clearable
@ -55,16 +55,14 @@
prop="leave_time" prop="leave_time"
width="180" width="180"
></el-table-column> ></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> <template #default="scope">{{ state_[scope.row.state] }}</template>
</el-table-column> </el-table-column>
<el-table-column label="审批状态" width="180"> <el-table-column label="审批状态" width="200">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.ticket_&&scope.row.ticket_.state_" style="margin-right: 5px;">{{scope.row.ticket_.state_.name }}</span> <span v-if="scope.row.ticket_&&scope.row.ticket_.state_" style="margin-right: 5px;">{{scope.row.ticket_.state_.name }}</span>
<el-tag <el-tag
v-if="scope.row.ticket_&&scope.row.ticket_.act_state" 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':''" :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]}} >{{act_states[scope.row.ticket_.act_state]}}
</el-tag> </el-tag>
@ -90,12 +88,11 @@
prop="create_time" prop="create_time"
width="180" width="180"
></el-table-column> ></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"> <template #default="scope">
<el-button-group>
<el-button <el-button
v-if="scope.row.state===10" v-if="scope.row.state===10"
text link
type="primary" type="primary"
size="small" size="small"
@click="next_add(scope.row, scope.$index)" @click="next_add(scope.row, scope.$index)"
@ -104,7 +101,7 @@
</el-button> </el-button>
<el-button <el-button
text link
type="primary" type="primary"
size="small" size="small"
@click="table_show(scope.row, scope.$index)" @click="table_show(scope.row, scope.$index)"
@ -122,10 +119,9 @@
@confirm="table_del(scope.row, scope.$index)" @confirm="table_del(scope.row, scope.$index)"
> >
<template #reference> <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> </template>
</el-popconfirm> </el-popconfirm>
</el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
@ -183,6 +179,14 @@
40: "进行中", 40: "进行中",
50: "已完成", 50: "已完成",
}, },
act_states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
}; };
}, },
methods: { methods: {
@ -249,6 +253,9 @@
resetQuery() { resetQuery() {
this.query = {}; this.query = {};
}, },
handleQuery() {
this.$refs.table.queryData(this.query)
},
}, },
}; };
</script> </script>

View File

@ -7,8 +7,8 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="部门名称" clearable></el-input> <el-input v-model="query.search" 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>
</div> </div>
</el-header> </el-header>
@ -118,8 +118,8 @@
this.selection = selection; this.selection = selection;
}, },
// //
upsearch(){ handleQuery() {
this.$refs.table.queryData(this.query)
}, },
//ID //ID
filterTree(id){ filterTree(id){

View File

@ -125,7 +125,7 @@
} }
}, },
methods: { methods: {
upsearch(){ handleQuery(){
}, },
rowClick(row){ rowClick(row){

View File

@ -8,8 +8,8 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="角色名称" clearable></el-input> <el-input v-model="query.search" 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>
</div> </div>
</el-header> </el-header>
@ -142,8 +142,8 @@
}, 500) }, 500)
}, },
// //
upsearch(){ handleQuery() {
this.$refs.table.queryData(this.query)
}, },
//ID //ID
filterTree(id){ filterTree(id){

View File

@ -20,8 +20,8 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.name" placeholder="登录账号 / 姓名" clearable></el-input> <el-input v-model="query.search" 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>
</div> </div>
</el-header> </el-header>
@ -75,6 +75,7 @@
save: false save: false
}, },
showGrouploading: false, showGrouploading: false,
query:{},
groupFilterText: '', groupFilterText: '',
group: [], group: [],
apiObj: this.$API.system.user.list, apiObj: this.$API.system.user.list,
@ -171,8 +172,8 @@
this.$refs.table.reload(params) this.$refs.table.reload(params)
}, },
// //
upsearch(){ handleQuery(){
this.$refs.table.upData(this.search) this.$refs.table.queryData(this.query)
}, },
// //
handleSuccess(data, mode){ handleSuccess(data, mode){

View File

@ -7,8 +7,8 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="部门名称"></el-input> <el-input v-model="query.search" placeholder="部门名称"></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>
</div> </div>
</el-header> </el-header>
@ -79,6 +79,7 @@
}, },
apiObj: this.$API.system.dept.list, apiObj: this.$API.system.dept.list,
selection: [], selection: [],
query:{},
search: { search: {
keyword: null keyword: null
}, },
@ -190,7 +191,7 @@
this.selection = selection; this.selection = selection;
}, },
// //
upsearch(){ handleQuery(){
this.$refs.table.queryData(this.search) this.$refs.table.queryData(this.search)
}, },

View File

@ -32,12 +32,12 @@
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="addDic" v-auth="'dicttype.create'"></el-button> <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> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="listApi" row-key="id" :params="listApiParams" @selection-change="selectionChange" stripe :paginationLayout="'prev, pager, next'"> <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="序号" type="index"></el-table-column>
<el-table-column label="名称" prop="name" min-width="150"></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> <el-table-column label="键值" prop="value" min-width="100"></el-table-column>
@ -49,11 +49,11 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="140"> <el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope"> <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-divider direction="vertical"></el-divider>
<el-popconfirm title="确定删除吗?" @confirm="delDic(scope.row,scope.$index)"> <el-popconfirm title="确定删除吗?" @confirm="delDic(scope.row,scope.$index)">
<template #reference> <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> </template>
</el-popconfirm> </el-popconfirm>
</template> </template>
@ -292,7 +292,7 @@
}, },
// //
dicClickType(data){ dicClickType(data){
this.$refs.table.reload({ this.$refs.table.queryData({
type: data.id type: data.id
}) })
}, },

View File

@ -71,13 +71,13 @@
@click="addPostRole" @click="addPostRole"
v-auth="'post.update'" v-auth="'post.update'"
></el-button> ></el-button>
<el-button <!-- <el-button
type="danger" type="danger"
plain plain
icon="el-icon-delete" icon="el-icon-delete"
@click="delPostRole" @click="delPostRole"
v-auth="'post.delete'" v-auth="'post.delete'"
></el-button> ></el-button> -->
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
@ -144,7 +144,9 @@ export default {
data() { data() {
return { return {
apiObj: this.$API.system.post.list, apiObj: this.$API.system.post.list,
apiObj2: this.$API.system.postrole.list, apiObj2: null,
query: {},
query2: {},
dialog: { dialog: {
save: false, save: false,
roleSave: false, roleSave: false,
@ -163,12 +165,9 @@ export default {
}, },
methods: { methods: {
rowClick(row) { rowClick(row) {
let params = {
post: row.id,
};
this.apiObj2 = this.$API.system.postrole.list; this.apiObj2 = this.$API.system.postrole.list;
this.postId = row.id; this.postId = row.id;
this.$refs.table2.reload(params); this.$refs.table2.queryData({post: row.id });
}, },
// //
add() { add() {

View File

@ -3,30 +3,30 @@
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="roleAdd" v-auth="'role.create'"></el-button> <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>--> <!--<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button>-->
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="角色名称" clearable></el-input> <el-input v-model="query.search" 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>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" hidePagination> <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="#" type="index" width="50"></el-table-column>
<el-table-column label="角色名称" prop="name" width="250"></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="code" width="150"></el-table-column>
<el-table-column label="角色描述" prop="description" 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"> <el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope"> <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-divider direction="vertical"></el-divider>
<el-popconfirm title="确定删除吗?" @confirm="roleDel(scope.row, scope.$index)"> <el-popconfirm title="确定删除吗?" @confirm="roleDel(scope.row, scope.$index)">
<template #reference> <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> </template>
</el-popconfirm> </el-popconfirm>
</template> </template>
@ -85,6 +85,7 @@
search: { search: {
keyword: null keyword: null
}, },
query: {},
isSaving: false, isSaving: false,
limitedVisible : false, limitedVisible : false,
type: "add", type: "add",
@ -197,8 +198,8 @@
this.selection = selection; this.selection = selection;
}, },
// //
upsearch(){ handleQuery(){
this.$refs.table.queryData(this.search) this.$refs.table.queryData(this.query)
}, },
//ID //ID
filterTree(id){ filterTree(id){

View File

@ -51,14 +51,14 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.name" v-model="query.search"
placeholder="登录账号 / 姓名" placeholder="登录账号 / 姓名"
clearable clearable
></el-input> ></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="upsearch" @click="handleQuery"
></el-button> ></el-button>
</div> </div>
</div> </div>
@ -72,10 +72,10 @@
remoteFilter remoteFilter
@selection-change="selectionChange" @selection-change="selectionChange"
> >
<el-table-column <!-- <el-table-column
type="selection" type="selection"
width="50" width="50"
></el-table-column> ></el-table-column> -->
<el-table-column <el-table-column
label="ID" label="ID"
prop="id" prop="id"
@ -88,6 +88,15 @@
label="登录账号" label="登录账号"
prop="username" prop="username"
></el-table-column> ></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"--> <!--sortable="custom"-->
<el-table-column <el-table-column
label="加入时间" label="加入时间"
@ -103,7 +112,7 @@
> >
<template #default="scope"> <template #default="scope">
<el-button <el-button
type="success" type="primary"
link link
size="small" size="small"
@click="formSetting(scope.row)" @click="formSetting(scope.row)"
@ -208,6 +217,7 @@
save: false, save: false,
// certSave:false, // certSave:false,
}, },
query: {},
baseUrl : baseUrl.API_URL, baseUrl : baseUrl.API_URL,
type: "add", type: "add",
titleMap: { titleMap: {
@ -344,8 +354,8 @@
this.$refs.table.reload(params); this.$refs.table.reload(params);
}, },
// //
upsearch() { handleQuery() {
this.$refs.table.queryData(this.search) this.$refs.table.queryData(this.query)
}, },
// //
submit(){ submit(){

View File

@ -19,8 +19,8 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="关键词" clearable></el-input> <el-input v-model="query.search" 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>
</div> </div>
</el-header> </el-header>
@ -141,13 +141,14 @@
}, },
search: { search: {
keyword: "" keyword: ""
} },
query: {}
} }
}, },
methods: { methods: {
// //
upsearch(){ handleQuery(){
this.$refs.table.upData(this.search) this.$refs.table.upData(this.query)
}, },
// //
tabChange(name){ tabChange(name){

View File

@ -19,7 +19,7 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="关键词" clearable></el-input> <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>
</div> </div>
</el-header> </el-header>
@ -117,7 +117,7 @@
this.$refs.table.reload(params) this.$refs.table.reload(params)
}, },
// //
upsearch(){ handleQuery(){
this.$refs.table.upData(this.search) this.$refs.table.upData(this.search)
}, },
} }

View File

@ -7,7 +7,7 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="名称" placeholder="名称"
clearable clearable
></el-input> ></el-input>
@ -122,9 +122,8 @@
></el-table-column> ></el-table-column>
<el-table-column label="操作" fixed="right" align="left" width="170"> <el-table-column label="操作" fixed="right" align="left" width="170">
<template #default="scope"> <template #default="scope">
<el-button-group>
<el-button <el-button
text link
v-if="scope.row.state==10" v-if="scope.row.state==10"
type="primary" type="primary"
size="small" size="small"
@ -133,21 +132,20 @@
>继续编辑 >继续编辑
</el-button> </el-button>
<el-button <el-button
text link
type="primary" type="primary"
size="small" size="small"
@click="table_show(scope.row, scope.$index)" @click="table_show(scope.row, scope.$index)"
>查看 >查看
</el-button> </el-button>
<el-button <el-button
text link
type="primary" type="primary"
size="small" size="small"
@click="table_del(scope.row)" @click="table_del(scope.row)"
v-auth="'visit.delete'" v-auth="'visit.delete'"
>删除 >删除
</el-button> </el-button>
</el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
@ -277,6 +275,9 @@
resetQuery() { resetQuery() {
this.query = {}; this.query = {};
}, },
handleQuery() {
this.$refs.table.queryData(this.query)
},
}, },
}; };
</script> </script>

View File

@ -7,10 +7,9 @@
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<el-container v-loading="loading"> <el-container v-loading="loading">
<el-main style="padding: 0 20px 20px 20px"> <el-main>
<el-descriptions direction="vertical" :column="3" border> <el-card header="基本信息" shadow="hover">
<el-descriptions :column="2">
<el-descriptions-item label="来访概述:">{{ <el-descriptions-item label="来访概述:">{{
form.name form.name
}}</el-descriptions-item> }}</el-descriptions-item>
@ -21,7 +20,12 @@
<el-tag size="small">{{ form.count_people }}</el-tag> <el-tag size="small">{{ form.count_people }}</el-tag>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="来访人员:"> <el-descriptions-item label="来访人员:">
<el-tag size="small" v-for="item in form.visitors_" :key='item.id'>{{ item.visitor_.name }}</el-tag> <el-tag
size="small"
v-for="item in form.visitors_"
:key="item.id"
>{{ item.visitor_.name }}</el-tag
>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="状态:">{{ <el-descriptions-item label="状态:">{{
state_[form.state] state_[form.state]
@ -39,23 +43,20 @@
form.description form.description
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="接待人:" v-if="form.receptionist_"> <el-descriptions-item label="接待人:" v-if="form.receptionist_">
{{ form.receptionist_.name }} {{ form.receptionist_.name }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-card style="margin-top:20px"> </el-card>
<el-card style="margin-top: 8px" shadow="hover" header="访客信息">
<scTable <scTable
ref="table" ref="table"
:data="peoplelist" :data="peoplelist"
row-key="id" row-key="id"
height='auto' height="auto"
stripe stripe
hideDo hideDo
hidePagination hidePagination
> >
<el-table-column <el-table-column
label="#" label="#"
@ -82,12 +83,13 @@
<el-space v-else></el-space> <el-space v-else></el-space>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time"></el-table-column> <el-table-column
label="创建时间"
prop="create_time"
></el-table-column>
</scTable> </scTable>
</el-card> </el-card>
</el-main> </el-main>
</el-container> </el-container>
</el-drawer> </el-drawer>
</template> </template>
@ -146,16 +148,15 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getUser(); // this.getUser();
}, },
methods: { methods: {
//访 //访
getUser() { // getUser() {
this.$API.system.user.list.req({ page: 0 }).then((res) => { // this.$API.system.user.list.req({ page: 0 }).then((res) => {
this.receptionistoptions = res; // this.receptionistoptions = res;
}); // });
}, // },
// //
open(mode = "add") { open(mode = "add") {
@ -164,17 +165,15 @@ export default {
return this; return this;
}, },
// //
setData(data) { setData(data) {
this.loading = true
this.$API.vm.visit.read.req(data.id).then((res) => { this.$API.vm.visit.read.req(data.id).then((res) => {
this.loading = false
this.form = res; this.form = res;
}); }).catch(e=>{this.loading = false});
this.$API.vm.people.list this.$API.vm.people.list.req({ visit: data.id, page: 0 }).then((res) => {
.req({ visit:data.id, page: 0 })
.then((res) => {
this.peoplelist = res; this.peoplelist = res;
}); });
}, },

View File

@ -15,7 +15,7 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="姓名/手机号" placeholder="姓名/手机号"
clearable clearable
></el-input> ></el-input>
@ -24,7 +24,7 @@
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <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 <el-table-column
label="#" label="#"
fixed="left" fixed="left"
@ -38,12 +38,15 @@
></el-table-column> ></el-table-column>
<el-table-column label="手机号" prop="phone"> </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="id_number"></el-table-column>
<el-table-column label="证件照" prop="photo"></el-table-column> <el-table-column label="证件照" prop="photo">
<el-table-column label="操作" fixed="right" align="left" width="170"> <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"> <template #default="scope">
<el-button-group>
<el-button <el-button
text link
type="warning" type="warning"
size="small" size="small"
@click="handleForm('edit', scope.row)" @click="handleForm('edit', scope.row)"
@ -55,13 +58,12 @@
@confirm="delVisitor(scope.row)" @confirm="delVisitor(scope.row)"
> >
<template #reference> <template #reference>
<el-button text type="danger" size="small" <el-button link type="danger" size="small"
v-auth="'visit.delete'">删除</el-button> v-auth="'visit.delete'">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
</el-button-group>
</template> </template>
</el-table-column> </el-table-column> -->
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>
@ -131,7 +133,7 @@ export default {
}, },
dialogcart: false, dialogcart: false,
apiObj: [], apiObj: this.$API.vm.visitor.list,
query: {}, query: {},
selection: [], selection: [],
search: { search: {
@ -140,7 +142,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getvisitorlist(); // this.getvisitorlist();
}, },
methods: { methods: {
handleForm(type, row) { handleForm(type, row) {
@ -153,11 +155,11 @@ export default {
} }
}, },
//访 //访
getvisitorlist() { // getvisitorlist() {
this.$API.vm.visitor.list.req({ page: 0 }).then((res) => { // this.$API.vm.visitor.list.req({ page: 0 }).then((res) => {
this.apiObj = res; // this.apiObj = res;
}); // });
}, // },
//访 //访
submitcert() { submitcert() {
this.form.employee = this.$route.query.id; this.form.employee = this.$route.query.id;
@ -200,6 +202,9 @@ export default {
return err; return err;
}); });
}, },
handleQuery() {
this.$refs.table.queryData(this.query)
},
}, },
}; };
</script> </script>

View File

@ -3,28 +3,31 @@
<el-main class="nopadding"> <el-main class="nopadding">
<scTable <scTable
ref="table" ref="table"
:data="list" :apiObj = "apiObj"
:params = "params"
row-key="id" row-key="id"
stripe stripe
highlightCurrentRow highlightCurrentRow
hidePagination
> >
<el-table-column label="ID" prop="id"></el-table-column> <el-table-column label="ID" prop="id" width="180"></el-table-column>
<el-table-column label="工单标题" prop="title"></el-table-column> <el-table-column label="流水号" prop="sn" width="180"></el-table-column>
<el-table-column label="流水号" prop="sn"></el-table-column> <el-table-column label="工单标题" prop="title" width="180"></el-table-column>
<el-table-column label="当前状态">
<el-table-column label="工作流" prop="title">
<template #default="scope">
{{ scope.row.workflow_.name }}
</template>
</el-table-column>
<el-table-column label="所在节点">
<template #default="scope"> <template #default="scope">
{{ scope.row.state_.name }} {{ scope.row.state_.name }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="进行状态" prop="sort"> <el-table-column label="进行状态" prop="sort">
<template #default="scope"> <template #default="scope">
{{ actstate_[scope.row.act_state] }} <el-tag
</template> :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':''"
</el-table-column> >{{act_states[scope.row.act_state]}}</el-tag>
<el-table-column label="关联工作流" prop="title">
<template #default="scope">
{{ scope.row.workflow_.name }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="处理人类型"> <el-table-column label="处理人类型">
@ -32,10 +35,10 @@
{{ participant_[scope.row.participant_type] }} {{ participant_[scope.row.participant_type] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time"></el-table-column> <el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="120"> <el-table-column label="操作" fixed="right" align="center">
<template #default="scope"> <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> </template>
@ -51,7 +54,9 @@
data() { data() {
return { return {
list: [], list: [],
actstate_: { apiObj: this.$API.wf.ticket.list,
params: {"category": "all"},
act_states: {
0: "草稿中", 0: "草稿中",
1: "进行中", 1: "进行中",
2: "被退回", 2: "被退回",
@ -61,23 +66,14 @@
}, },
participant_: { participant_: {
0: "无处理人", 0: "无处理人",
1: "人", 1: "人",
2: "多人", 2: "多人",
}, },
}; };
}, },
mounted() { mounted() {
this.getList();
}, },
methods: { methods: {
async getList() {
let res = await this.$API.wf.ticket.list.req({
category: "all",
page: 0,
});
console.log(res);
this.list = res;
},
handleShow(row) { handleShow(row) {
let cateType = row.workflow_.key; let cateType = row.workflow_.key;
let projectId = '', operation = null; let projectId = '', operation = null;

View File

@ -72,6 +72,9 @@
<el-form-item label="名称" prop="name"> <el-form-item label="名称" prop="name">
<el-input v-model="addForm.name" placeholder="名称" /> <el-input v-model="addForm.name" placeholder="名称" />
</el-form-item> </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-form-item label="是否隐藏" prop="is_hidden" label-width="120px">
<el-switch v-model="addForm.is_hidden"></el-switch> <el-switch v-model="addForm.is_hidden"></el-switch>
</el-form-item> </el-form-item>

View File

@ -1,7 +1,4 @@
<template> <template>
<el-container>
<el-main class="nopadding">
<el-card style="margin-bottom: 10px">
<el-steps <el-steps
:active="actives" :active="actives"
spac="400px" spac="400px"
@ -14,9 +11,6 @@
:key="item.id" :key="item.id"
></el-step> ></el-step>
</el-steps> </el-steps>
</el-card>
</el-main>
</el-container>
</template> </template>
<!--工单进度组件--> <!--工单进度组件-->
<script> <script>
@ -46,7 +40,6 @@
this.sort = dat[0].sort; this.sort = dat[0].sort;
this.actives = this.flowSteps.indexOf(dat[0]); this.actives = this.flowSteps.indexOf(dat[0]);
if (this.flowSteps.length - this.actives > 1) { if (this.flowSteps.length - this.actives > 1) {
} else { } else {
this.actives = this.flowSteps.length; this.actives = this.flowSteps.length;
} }

View File

@ -8,7 +8,7 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="工单名称" clearable></el-input> <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>
</div> </div>
</el-header> </el-header>
@ -308,7 +308,7 @@
} }
}, },
// //
upsearch(){ handleQuery(){
}, },
currentPage(){}, currentPage(){},

View File

@ -1,7 +1,7 @@
<template> <template>
<el-container> <el-container>
<el-main class="nopadding"> <el-main v-loading="mainLoading">
<el-card style="margin-bottom: 10px;position: relative"> <el-card header="流程">
<work-step ref="workStep"></work-step> <work-step ref="workStep"></work-step>
<el-button <el-button
class="ticketRetry" class="ticketRetry"
@ -12,7 +12,7 @@
重新执行 重新执行
</el-button> </el-button>
</el-card> </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 title="来访信息" :column="3">
<el-descriptions-item label="工单流水号:"> <el-descriptions-item label="工单流水号:">
{{ticketDetail.sn }} {{ticketDetail.sn }}
@ -51,7 +51,7 @@
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </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 title="入厂项目" :column="3">
<el-descriptions-item label="工单流水号:"> <el-descriptions-item label="工单流水号:">
{{ticketDetail.sn }} {{ticketDetail.sn }}
@ -86,12 +86,12 @@
</div> </div>
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog> <show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
</el-card> </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 title="作业许可证" :column="3">
<el-descriptions-item label="工单流水号:"> <el-descriptions-item label="工单流水号:">
{{ticketDetail.sn }} {{ticketDetail.sn }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="作业名称:"> <el-descriptions-item label="所属作业:">
{{oplDetail.name }} {{oplDetail.name }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="作业地点:"> <el-descriptions-item label="作业地点:">
@ -116,10 +116,10 @@
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog> <show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
</el-card> </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> <scTitle title="处理"></scTitle>
<el-form :model="form" ref="addForm" label-width="100px" label-position="left"> <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-select v-model="form.close_note" placeholder="选择关闭原因">
<el-option <el-option
v-for="item in noteOption" v-for="item in noteOption"
@ -129,7 +129,7 @@
/> />
</el-select> </el-select>
</el-form-item> </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-group v-model="form.close_dos">
<el-checkbox <el-checkbox
v-for="(item, index) in dosOption" v-for="(item, index) in dosOption"
@ -163,7 +163,7 @@
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card style="margin-left: 10px;"> <el-card style="margin-top: 8px" header="处理日志">
<work-details ref="workDetails" :ticket="ticketId"></work-details> <work-details ref="workDetails" :ticket="ticketId"></work-details>
</el-card> </el-card>
</el-main> </el-main>
@ -222,6 +222,7 @@
return { return {
ticketId: "",//id ticketId: "",//id
projectId: "",//id projectId: "",//id
mainLoading: false,
userName: "", userName: "",
rpjDetail: {}, rpjDetail: {},
oplDetail: {}, oplDetail: {},
@ -289,14 +290,9 @@
this.getVisit(); this.getVisit();
} else if (this.cateType === 'rparty') { } else if (this.cateType === 'rparty') {
this.getRpj(); this.getRpj();
} else {
if (this.operation !== null) {
this.getOperation();
} else { } else {
this.getOpl(); this.getOpl();
} }
this.getCloseDos();
}
this.getticketItem(); this.getticketItem();
this.getBtns(); this.getBtns();
}, },
@ -320,9 +316,15 @@
}, },
// //
getticketItem() { getticketItem() {
this.mainLoading = true
this.$API.wf.ticket.ticketItem.req(this.ticketId).then((res) => { this.$API.wf.ticket.ticketItem.req(this.ticketId).then((res) => {
this.mainLoading = false
this.ticketDetail = res; this.ticketDetail = res;
}); if(this.ticketDetail.state_.key == 'opl_close'){
// ,
this.getCloseDos()
}
}).catch(e=>{this.mainLoading = false});
}, },
// //
getBtns() { getBtns() {
@ -352,14 +354,6 @@
this.oplDetail = res; this.oplDetail = res;
}); });
}, },
//
getOperation() {
debugger;
this.$API.opm.operation.read.req(this.operation).then((res) => {
debugger;
this.oplDetail = res;
});
},
showMoreInfo() { showMoreInfo() {
this.showLimited = true; this.showLimited = true;
}, },

View File

@ -2,51 +2,105 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-auth="'workflow.create'"></el-button> <el-button
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length!==1" type="primary"
@click="batch_del" v-auth="'workflow.delete'"></el-button> 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>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="工作流名称" clearable></el-input> <el-input
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button> v-model="query.search"
placeholder="工作流名称"
clearable
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div> </div>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id"> <scTable ref="table" :apiObj="apiObj" row-key="id">
<el-table-column label="#" type="index"></el-table-column> <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="ID" prop="id" min-width="150"></el-table-column>
<el-table-column label="工作流名称" prop="name" min-width="200"></el-table-column> <el-table-column
<el-table-column label="标识" prop="key" min-width="100"></el-table-column> label="工作流名称"
<el-table-column label="工单查看权限校验" prop="view_permission_check" min-width="120"> 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"> <template #default="scope">
<span v-if="scope.row.view_permission_check"></span> <span v-if="scope.row.view_permission_check"></span>
<span v-else></span> <span v-else></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工作流描述" prop="description" min-width="150"></el-table-column> <el-table-column
<el-table-column label="创建时间" prop="create_time" min-width="150"></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"> <el-table-column label="操作" fixed="right" align="center" width="250">
<template #default="scope"> <template #default="scope">
<el-button link size="small" type="primary" @click="workflowShow(scope.row)" <el-button
v-auth="'workflow.update'">配置 link
size="small"
type="primary"
@click="workflowShow(scope.row)"
v-auth="'workflow.update'"
>配置
</el-button> </el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-button link size="small" type="primary" @click="workflowEdit(scope.row)" <el-button
v-auth="'workflow.update'">编辑 link
size="small"
type="primary"
@click="workflowEdit(scope.row)"
v-auth="'workflow.update'"
>编辑
</el-button> </el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-link <el-button
link
size="small"
type="primary" type="primary"
@click="handleWatch(scope)" @click="handleWatch(scope)"
> >
查看流程图 流程图
</el-link> </el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-popconfirm title="确定删除吗?" @confirm="workflowDel(scope.row)"> <el-popconfirm
title="确定删除吗?"
@confirm="workflowDel(scope.row)"
>
<template #reference> <template #reference>
<el-button link size="small" type="danger" v-auth="'workflow.delete'">删除</el-button> <el-button
link
size="small"
type="danger"
v-auth="'workflow.delete'"
>删除</el-button
>
</template> </template>
</el-popconfirm> </el-popconfirm>
</template> </template>
@ -56,15 +110,29 @@
</el-container> </el-container>
<div class="svgMark" v-if="limitedWatch" @click="closeMark"> <div class="svgMark" v-if="limitedWatch" @click="closeMark">
<div class="svgWrapper"> <div class="svgWrapper">
<div class="svgItem">工作流流程图<i class="el-dialog__close el-icon el-icon-close" @click="closeMark"></i></div> <div class="svgItem">
<div style="width: 90%;margin: auto;"> 工作流流程图<i
<svg :height='mySvgHeight' id="mySvg" style="width:100%!important;"> class="el-dialog__close el-icon el-icon-close"
</svg> @click="closeMark"
></i>
</div>
<div style="width: 90%; margin: auto">
<svg
:height="mySvgHeight"
id="mySvg"
style="width: 100% !important"
></svg>
</div> </div>
</div> </div>
</div> </div>
<el-dialog :title="titleMap[type]" v-model="limitedVisible"> <el-dialog :title="titleMap[type]" v-model="limitedVisible">
<el-form :model="addForm" :rules="rules" ref="addForm" label-width="100px" label-position="left"> <el-form
:model="addForm"
:rules="rules"
ref="addForm"
label-width="100px"
label-position="left"
>
<el-form-item label="名称" prop="name"> <el-form-item label="名称" prop="name">
<el-input v-model="addForm.name" clearable></el-input> <el-input v-model="addForm.name" clearable></el-input>
</el-form-item> </el-form-item>
@ -103,26 +171,30 @@
</el-form> </el-form>
<template #footer> <template #footer>
<el-button @click="limitedVisible = false"> </el-button> <el-button @click="limitedVisible = false"> </el-button>
<el-button v-if="type!=='show'" type="primary" :loading="isSaving" @click="submitHandle()"> </el-button> <el-button
v-if="type !== 'show'"
type="primary"
:loading="isSaving"
@click="submitHandle()"
> </el-button
>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import dagreD3 from 'dagre-d3' import dagreD3 from "dagre-d3";
import * as d3 from 'd3' import * as d3 from "d3";
export default { export default {
name: 'index', name: "index",
data() { data() {
return { return {
apiObj: this.$API.wf.workflow.list, apiObj: this.$API.wf.workflow.list,
selection: [], selection: [],
checkList: [], checkList: [],
choiceOption: [], choiceOption: [],
search: { query: {},
keyword: null
},
mySvgHeight: null, mySvgHeight: null,
editId: null, editId: null,
isSaving: false, isSaving: false,
@ -130,9 +202,9 @@
limitedWatch: false, limitedWatch: false,
type: "add", type: "add",
titleMap: { titleMap: {
add: '新增', add: "新增",
edit: '编辑', edit: "编辑",
show: '查看' show: "查看",
}, },
// //
addForm: { addForm: {
@ -146,19 +218,17 @@
}, },
// //
rules: { rules: {
name: [ name: [{ required: true, message: "请输入工作流名称" }],
{required: true, message: '请输入工作流名称'}
]
}, },
menu: { menu: {
list: [], list: [],
checked: ['1513426415243104256'], checked: ["1513426415243104256"],
props: { props: {
children: 'children', children: "children",
label: 'name', label: "name",
}
}, },
} },
};
}, },
mounted() { mounted() {
// this.getGroup(); // this.getGroup();
@ -166,7 +236,7 @@
methods: { methods: {
// //
handleAdd() { handleAdd() {
this.type = 'add'; this.type = "add";
this.limitedVisible = true; this.limitedVisible = true;
}, },
@ -177,17 +247,20 @@
that.isSaveing = true; that.isSaveing = true;
that.submit(); that.submit();
} }
}) });
}, },
async submit() { async submit() {
let that = this; let that = this;
let res = null; let res = null;
try { try {
if (that.type === 'add') { if (that.type === "add") {
res = await that.$API.wf.workflow.create.req(that.addForm) res = await that.$API.wf.workflow.create.req(that.addForm);
} else { } else {
res = await that.$API.wf.workflow.update.req(that.editId, that.addForm); res = await that.$API.wf.workflow.update.req(
that.editId,
that.addForm
);
} }
that.isSaveing = false; that.isSaveing = false;
that.limitedVisible = false; that.limitedVisible = false;
@ -199,7 +272,7 @@
// //
workflowEdit(row) { workflowEdit(row) {
this.type = 'edit'; this.type = "edit";
this.editId = row.id; this.editId = row.id;
this.limitedVisible = true; this.limitedVisible = true;
this.addForm = Object.assign({}, row); this.addForm = Object.assign({}, row);
@ -207,14 +280,14 @@
// //
workflowShow(row) { workflowShow(row) {
let workflow = sessionStorage.getItem('jinYuWorkflowId'); let workflow = sessionStorage.getItem("jinYuWorkflowId");
if (workflow) { if (workflow) {
sessionStorage.removeItem('jinYuWorkflowId'); sessionStorage.removeItem("jinYuWorkflowId");
sessionStorage.setItem('jinYuWorkflowId', row.id); sessionStorage.setItem("jinYuWorkflowId", row.id);
} else { } else {
sessionStorage.setItem('jinYuWorkflowId', row.id); sessionStorage.setItem("jinYuWorkflowId", row.id);
} }
this.$router.push({path: '/wf/configuration'}); this.$router.push({ path: "/wf/configuration" });
}, },
// //
@ -222,10 +295,10 @@
var id = row.id; var id = row.id;
var res = await this.$API.wf.workflow.delete.req(id); var res = await this.$API.wf.workflow.delete.req(id);
if (res.err_msg) { if (res.err_msg) {
this.$message.error(res.err_msg) this.$message.error(res.err_msg);
} else { } else {
this.$refs.table.refresh(); this.$refs.table.refresh();
this.$message.success("删除成功") this.$message.success("删除成功");
// this.$alert(res.message, "", {type: 'error'}) // this.$alert(res.message, "", {type: 'error'})
} }
}, },
@ -236,8 +309,8 @@
}, },
// //
upsearch() { handleQuery() {
this.$refs.table.queryData(this.query);
}, },
//ID //ID
@ -245,26 +318,26 @@
var target = null; var target = null;
function filter(tree) { function filter(tree) {
tree.forEach(item => { tree.forEach((item) => {
if (item.id == id) { if (item.id == id) {
target = item target = item;
} }
if (item.children) { if (item.children) {
filter(item.children) filter(item.children);
} }
}) });
} }
filter(this.$refs.table.tableData); filter(this.$refs.table.tableData);
return target return target;
}, },
// //
handleSaveSuccess(data, type) { handleSaveSuccess(data, type) {
if (type == 'add') { if (type == "add") {
this.$refs.table.refresh() this.$refs.table.refresh();
} else if (type == 'edit') { } else if (type == "edit") {
this.$refs.table.refresh() this.$refs.table.refresh();
} }
}, },
@ -275,7 +348,7 @@
that.limitedWatch = true; that.limitedWatch = true;
that.$nextTick(() => { that.$nextTick(() => {
var g = new dagreD3.graphlib.Graph().setGraph({ var g = new dagreD3.graphlib.Graph().setGraph({
rankdir: 'DL', rankdir: "DL",
nodesep: 100, nodesep: 100,
edgesep: 50, //线 edgesep: 50, //线
ranksep: 50, // ranksep: 50, //
@ -292,13 +365,13 @@
// //
label: item.name, label: item.name,
// //
shape: 'rect', shape: "rect",
toolText: item.name, toolText: item.name,
// //
style: "fill:#fff;stroke:#000", style: "fill:#fff;stroke:#000",
labelStyle: "fill:#000;", labelStyle: "fill:#000;",
rx: 5, // rx: 5, //
ry: 5 ry: 5,
}); });
}); });
//线 //线
@ -310,52 +383,67 @@
g.setNode(transition0.source_state_.id + 100000, { g.setNode(transition0.source_state_.id + 100000, {
label: "条件表达式", label: "条件表达式",
style: "stroke: #000;fill: #afa", style: "stroke: #000;fill: #afa",
shape: "diamond" shape: "diamond",
}); });
g.setEdge(transition0.source_state_.id, transition0.source_state_.id + 100000, { g.setEdge(
transition0.source_state_.id,
transition0.source_state_.id + 100000,
{
// //
label: transition0.name, label: transition0.name,
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px" style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px",
}); }
);
let condition_expression = transition0.condition_expression; let condition_expression = transition0.condition_expression;
condition_expression.forEach(condition_expression0 => { condition_expression.forEach((condition_expression0) => {
g.setEdge(transition0.source_state_.id + 100000, condition_expression0.target_state, { g.setEdge(
transition0.source_state_.id + 100000,
condition_expression0.target_state,
{
label: condition_expression0.label, label: condition_expression0.label,
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px" style:
}) "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px",
}) }
);
});
} else { } else {
g.setEdge(transition0.source_state_.id, transition0.destination_state_.id, { g.setEdge(
transition0.source_state_.id,
transition0.destination_state_.id,
{
// //
label: transition0.name, label: transition0.name,
// //
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px" // 线 style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 线
}); }
);
} }
}); });
g.nodes().length - 1; g.nodes().length - 1;
// //
let render = new dagreD3.render(); let render = new dagreD3.render();
// svg g. // svg g.
let svg = d3.select('#mySvg'); let svg = d3.select("#mySvg");
let svgGroup = svg.append('g'); let svgGroup = svg.append("g");
// . // .
render(d3.select("svg g"), g); render(d3.select("svg g"), g);
that.mySvgHeight = document.getElementsByClassName('nodes')[0].getBoundingClientRect().height + 50; that.mySvgHeight =
document
.getElementsByClassName("nodes")[0]
.getBoundingClientRect().height + 50;
} else { } else {
} }
}); });
} }
}); });
}) });
}, },
closeMark() { closeMark() {
this.limitedWatch = false; this.limitedWatch = false;
}, },
},
} };
}
</script> </script>
<style scoped> <style scoped>
.treeMain { .treeMain {
@ -370,14 +458,14 @@
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .2); -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe; background-color: #fefefe;
border-radius: 5px; border-radius: 5px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
border-radius: 5px; border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5); -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5; background-color: #f5f5f5;
} }
@ -392,7 +480,7 @@
overflow: auto; overflow: auto;
margin: 0; margin: 0;
z-index: 2000; z-index: 2000;
background: rgba(0, 0, 0, .3); background: rgba(0, 0, 0, 0.3);
} }
.svgWrapper { .svgWrapper {
@ -407,7 +495,8 @@
.svgItem { .svgItem {
padding: 20px 40px 0; padding: 20px 40px 0;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
Microsoft YaHei, Arial, sans-serif;
font-size: 18px; font-size: 18px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;