Merge branch 'ehs' of https://e.coding.net/ctcdevteam/ehs/ehs_web into ehs
This commit is contained in:
commit
1ed6787310
|
@ -62,7 +62,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="姓名"
|
placeholder="姓名"
|
||||||
clearable
|
clearable
|
||||||
@click="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
@ -164,7 +164,7 @@ export default {
|
||||||
//同步
|
//同步
|
||||||
async syncData() {
|
async syncData() {
|
||||||
this.syncLoading = true;
|
this.syncLoading = true;
|
||||||
var res = await this.$API.third.tdevice.vchannelSync.req({});
|
var res = await this.$API.third.tdevice.bltSync.req({});
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
this.syncLoading = false;
|
this.syncLoading = false;
|
||||||
},
|
},
|
||||||
|
@ -180,6 +180,7 @@ export default {
|
||||||
handleBindBlt(type, row) {
|
handleBindBlt(type, row) {
|
||||||
this.dis = false;
|
this.dis = false;
|
||||||
this.form.blt = row.id;
|
this.form.blt = row.id;
|
||||||
|
this.form.code = row.code;
|
||||||
this.bindBltMac = row.code;
|
this.bindBltMac = row.code;
|
||||||
this.form.type = type;
|
this.form.type = type;
|
||||||
if (type === 20) {
|
if (type === 20) {
|
||||||
|
@ -189,13 +190,15 @@ export default {
|
||||||
this.showBindBlt = true;
|
this.showBindBlt = true;
|
||||||
},
|
},
|
||||||
submitBindBlt() {
|
submitBindBlt() {
|
||||||
let that = this;
|
let that = this
|
||||||
that.$API.third.tdevice.bltBind.req(this.form).then((res) => {
|
let form = {
|
||||||
if (res.err_msg) {
|
code: this.form.code,
|
||||||
} else {
|
type: this.form.type,
|
||||||
that.showBindBlt = false;
|
employee: this.form.employee
|
||||||
|
}
|
||||||
|
that.$API.third.tdevice.bltBind.req(form).then((res) => {
|
||||||
|
this.showBindBlt = false;
|
||||||
that.$refs.table.refresh();
|
that.$refs.table.refresh();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="编号"
|
placeholder="编号"
|
||||||
clearable
|
clearable
|
||||||
@click="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<span v-if="scope.row.trigger == 20">定位</span>
|
<span v-if="scope.row.trigger == 20">定位</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="音响" prop="speaker_on" width="50">
|
<el-table-column label="喇叭" prop="speaker_on" width="50">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.speaker_on"
|
v-model="scope.row.speaker_on"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="视频" prop="vchannel">
|
<el-form-item label="视频" prop="vchannel">
|
||||||
<el-select v-model="form.vchannel">
|
<el-select v-model="form.vchannel" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in vchanneloptions"
|
v-for="item in vchanneloptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="视频" prop="vchannels">
|
<el-form-item label="视频" prop="vchannels">
|
||||||
<el-select v-model="form.vchannels" multiple="true">
|
<el-select v-model="form.vchannels" multiple="true" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in vchanneloptions"
|
v-for="item in vchanneloptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|
|
@ -1,15 +1,48 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-select v-model="query.cates" placeholder="事件种类" @change="handleQuery">
|
<el-select
|
||||||
<el-option v-for="item in cateOptions" :key="item.id">{{item.name}}</el-option>
|
v-model="query.cates"
|
||||||
</el-select>
|
placeholder="事件种类"
|
||||||
</div>
|
@change="handleQuery"
|
||||||
<div class="right-panel">
|
clearable
|
||||||
|
>
|
||||||
</div>
|
<el-option
|
||||||
</el-header>
|
v-for="item in cateOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-model="query.area"
|
||||||
|
placeholder="发生区域"
|
||||||
|
@change="handleQuery"
|
||||||
|
style="margin-left:2px"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in areaOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="timeRange"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="发生时间始"
|
||||||
|
end-placeholder="发生时间止"
|
||||||
|
style="margin-left:2px"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
@change="handleQuery"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel"></div>
|
||||||
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
|
@ -21,11 +54,15 @@
|
||||||
>
|
>
|
||||||
<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">
|
||||||
<template #default="scope" >
|
<template #default="scope">
|
||||||
<el-tag v-for="item in scope.row.cates_"
|
<el-tag
|
||||||
:key="item.id" type="warning">{{item.name}}</el-tag>
|
v-for="item in scope.row.cates_"
|
||||||
|
:key="item.id"
|
||||||
|
type="warning"
|
||||||
|
>{{ item.name }}</el-tag
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="发生区域" prop="area_.name"></el-table-column>
|
<el-table-column label="发生区域" prop="area_.name"></el-table-column>
|
||||||
<el-table-column label="当事人" prop="employee_.name">
|
<el-table-column label="当事人" prop="employee_.name">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
@ -63,9 +100,13 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="发生时间" prop="create_time" width="150"></el-table-column>
|
<el-table-column
|
||||||
|
label="发生时间"
|
||||||
<el-table-column
|
prop="create_time"
|
||||||
|
width="150"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
label="处理人"
|
label="处理人"
|
||||||
prop="handle_user_name"
|
prop="handle_user_name"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
@ -83,24 +124,26 @@
|
||||||
<el-tag v-else type="success">否</el-tag>
|
<el-tag v-else type="success">否</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" fixed="right" align="center">
|
<el-table-column label="操作" fixed="right" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="info"
|
type="info"
|
||||||
size="small"
|
size="small"
|
||||||
@click="table_show(scope.row, scope.$index)"
|
@click="table_show(scope.row, scope.$index)"
|
||||||
>查看</el-button>
|
>查看</el-button
|
||||||
<el-button
|
>
|
||||||
link
|
<el-button
|
||||||
type="primary"
|
link
|
||||||
size="small"
|
type="primary"
|
||||||
v-if="scope.row.handle_user==null"
|
size="small"
|
||||||
@click="table_handle(scope.row, scope.$index)"
|
v-if="scope.row.handle_user == null"
|
||||||
>处理</el-button>
|
@click="table_handle(scope.row, scope.$index)"
|
||||||
<!-- <el-button text type="warning" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button> -->
|
>处理</el-button
|
||||||
<!-- <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
>
|
||||||
|
<!-- <el-button text type="warning" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button> -->
|
||||||
|
<!-- <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button text type="danger" size="small">删除</el-button>
|
<el-button text type="danger" size="small">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -110,7 +153,6 @@
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { CircleCheckFilled, CircleCloseFilled } from "@element-plus/icons-vue";
|
import { CircleCheckFilled, CircleCloseFilled } from "@element-plus/icons-vue";
|
||||||
|
@ -119,10 +161,13 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
CircleCheckFilled,
|
CircleCheckFilled,
|
||||||
CircleCloseFilled,
|
CircleCloseFilled,
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
defaultTime: ['00:00:00', '23:59:59'],
|
||||||
|
timeRange: [],
|
||||||
|
cateOptions: [],
|
||||||
|
areaOptions: [],
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
permission: false,
|
permission: false,
|
||||||
|
@ -135,33 +180,57 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getCateOptions();
|
||||||
|
this.getAreaOptions();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//查看
|
//查看
|
||||||
table_show(row) {
|
table_show(row) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "eventhandlefrom",
|
name: "eventhandlefrom",
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//事件处理
|
getCateOptions() {
|
||||||
table_handle(row) {
|
this.$API.ecm.event_cate.list.req({ page: 0 }).then((res) => {
|
||||||
|
this.cateOptions = res;
|
||||||
this.$router.push({
|
});
|
||||||
|
},
|
||||||
|
getAreaOptions() {
|
||||||
|
this.$API.am.area.list.req({page: 0}).then(res=>{
|
||||||
|
this.areaOptions = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//事件处理
|
||||||
|
table_handle(row) {
|
||||||
|
this.$router.push({
|
||||||
name: "eventhandlefrom",
|
name: "eventhandlefrom",
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
//搜索
|
//搜索
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query)
|
if(this.timeRange){
|
||||||
},
|
this.query.start_create = this.timeRange[0]
|
||||||
|
this.query.end_create = this.timeRange[1]
|
||||||
|
}else{
|
||||||
|
this.query.end_create = null
|
||||||
|
this.query.start_create = null
|
||||||
|
}
|
||||||
|
if(this.query.cates){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.query.cates = null
|
||||||
|
}
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
|
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
},
|
},
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<sc-title title="音响配置"></sc-title>
|
<sc-title title="喇叭配置"></sc-title>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="喇叭开启" prop="speaker_on">
|
<el-form-item label="喇叭开启" prop="speaker_on">
|
||||||
|
|
|
@ -1,18 +1,48 @@
|
||||||
<template>
|
<template>
|
||||||
<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="add"></el-button>
|
<el-select
|
||||||
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
v-model="query.cates"
|
||||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button>
|
placeholder="事件种类"
|
||||||
</div>
|
@change="handleQuery"
|
||||||
<div class="right-panel">
|
clearable
|
||||||
<div class="right-panel-search">
|
>
|
||||||
<el-input v-model="search.keyword" placeholder="姓名/手机号" clearable @click="handleQuery"></el-input>
|
<el-option
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
v-for="item in cateOptions"
|
||||||
</div>
|
:key="item.id"
|
||||||
</div>
|
:label="item.name"
|
||||||
</el-header> -->
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-model="query.area"
|
||||||
|
placeholder="发生区域"
|
||||||
|
@change="handleQuery"
|
||||||
|
style="margin-left:2px"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in areaOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="timeRange"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="发生时间始"
|
||||||
|
end-placeholder="发生时间止"
|
||||||
|
style="margin-left:2px"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
@change="handleQuery"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel"></div>
|
||||||
|
</el-header> -->
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
|
@ -102,6 +132,9 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
timeRange: [],
|
||||||
|
cateOptions: [],
|
||||||
|
areaOptions: [],
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
permission: false,
|
permission: false,
|
||||||
|
@ -114,8 +147,21 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
// this.getCateOptions();
|
||||||
|
// this.getAreaOptions();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getCateOptions() {
|
||||||
|
this.$API.ecm.event_cate.list.req({ page: 0 }).then((res) => {
|
||||||
|
this.cateOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getAreaOptions() {
|
||||||
|
this.$API.am.area.list.req({page: 0}).then(res=>{
|
||||||
|
this.areaOptions = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
//查看
|
//查看
|
||||||
table_show(row) {
|
table_show(row) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
|
|
|
@ -124,6 +124,7 @@ export default {
|
||||||
dutyAgg: [],
|
dutyAgg: [],
|
||||||
//数据统计
|
//数据统计
|
||||||
ep_count_type: "2",
|
ep_count_type: "2",
|
||||||
|
countIndex: "2",
|
||||||
userCount: {
|
userCount: {
|
||||||
total: 0,
|
total: 0,
|
||||||
count_employee: 0, //正式员工
|
count_employee: 0, //正式员工
|
||||||
|
|
|
@ -8,9 +8,34 @@
|
||||||
v-auth="'certificate.create'"
|
v-auth="'certificate.create'"
|
||||||
@click="handleForm('add')"
|
@click="handleForm('add')"
|
||||||
></el-button>
|
></el-button>
|
||||||
<!--
|
<el-select
|
||||||
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
v-model="query.type"
|
||||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
placeholder="证书类型"
|
||||||
|
@change="handleQuery"
|
||||||
|
clearable
|
||||||
|
style="margin-left: 2px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeoptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-model="query.employee__type"
|
||||||
|
placeholder="人员类型"
|
||||||
|
@change="handleQuery"
|
||||||
|
clearable
|
||||||
|
style="margin-left: 2px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in eptypeOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
|
@ -18,12 +43,12 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="证书名称/编号"
|
placeholder="证书名称/编号"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></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>
|
||||||
|
@ -177,6 +202,12 @@ export default {
|
||||||
{ id: 20, name: "特种设备操作证书" },
|
{ id: 20, name: "特种设备操作证书" },
|
||||||
{ id: 30, name: "安全管理人员证书" },
|
{ id: 30, name: "安全管理人员证书" },
|
||||||
],
|
],
|
||||||
|
eptypeOptions: [
|
||||||
|
{label:"正式员工", value:"employee"},
|
||||||
|
{label:"相关方", value:"remployee"},
|
||||||
|
{label:"访客", value:"visitor"},
|
||||||
|
{label:"货车司机", value:"driver"}
|
||||||
|
],
|
||||||
type_: {
|
type_: {
|
||||||
10: "特种作业证书",
|
10: "特种作业证书",
|
||||||
20: "特种设备操作证书",
|
20: "特种设备操作证书",
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="证书名称/编号"
|
placeholder="证书名称/编号"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></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>
|
||||||
|
|
|
@ -1,18 +1,31 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="timeRange"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="打卡时间始"
|
||||||
|
end-placeholder="打卡时间止"
|
||||||
|
style="margin-left: 2px"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
@change="handleQuery"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="员工姓名/编号"
|
placeholder="员工姓名/编号"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></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>
|
||||||
|
@ -55,6 +68,7 @@ export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
timeRange: [],
|
||||||
apiObj: this.$API.hrm.clock_record.list,
|
apiObj: this.$API.hrm.clock_record.list,
|
||||||
query: {},
|
query: {},
|
||||||
selection: [],
|
selection: [],
|
||||||
|
@ -72,6 +86,13 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleQuery(){
|
handleQuery(){
|
||||||
|
if (this.timeRange) {
|
||||||
|
this.query.start_create = this.timeRange[0];
|
||||||
|
this.query.end_create = this.timeRange[1];
|
||||||
|
} else {
|
||||||
|
this.query.end_create = null;
|
||||||
|
this.query.start_create = null;
|
||||||
|
}
|
||||||
this.$refs.table.queryData(this.query)
|
this.$refs.table.queryData(this.query)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -2,15 +2,20 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<!-- <el-button
|
<el-select
|
||||||
type="primary"
|
v-model="query.type"
|
||||||
icon="el-icon-plus"
|
placeholder="人员类型"
|
||||||
v-auth="'employee.create'"
|
@change="handleQuery"
|
||||||
@click="handleForm('add')"
|
clearable
|
||||||
></el-button> -->
|
style="margin-left: 2px"
|
||||||
<!--
|
>
|
||||||
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
<el-option
|
||||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
v-for="item in typeOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
|
@ -18,7 +23,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="姓名/手机号"
|
placeholder="姓名/手机号"
|
||||||
clearable
|
clearable
|
||||||
@click="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -202,7 +207,14 @@ export default {
|
||||||
employee: "正式员工",
|
employee: "正式员工",
|
||||||
remployee: "相关方",
|
remployee: "相关方",
|
||||||
visitor: "访客",
|
visitor: "访客",
|
||||||
|
driver: "货车司机"
|
||||||
},
|
},
|
||||||
|
typeOptions: [
|
||||||
|
{label:"正式员工", value:"employee"},
|
||||||
|
{label:"相关方", value:"remployee"},
|
||||||
|
{label:"访客", value:"visitor"},
|
||||||
|
{label:"货车司机", value:"driver"}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
@ -1,224 +1,355 @@
|
||||||
<template>
|
<template>
|
||||||
<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="add" v-auth="'operation.create'"></el-button>
|
<el-button
|
||||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
type="primary"
|
||||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
icon="el-icon-plus"
|
||||||
</div>
|
@click="add"
|
||||||
<div class="right-panel">
|
v-auth="'operation.create'"
|
||||||
<div class="right-panel-search">
|
></el-button>
|
||||||
<el-select v-model="query.create_by">
|
<el-select
|
||||||
<el-option label="全部" value="000" />
|
v-model="query.state"
|
||||||
<el-option label="我的" :value="userId" />
|
placeholder="作业状态"
|
||||||
</el-select>
|
@change="handleQuery"
|
||||||
<el-input v-model="query.search" placeholder="名称" clearable @click="handleQuery"></el-input>
|
style="margin-left: 2px"
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
clearable
|
||||||
</div>
|
>
|
||||||
</div>
|
<el-option
|
||||||
</el-header>
|
v-for="item in stateOptions"
|
||||||
<el-main class="nopadding">
|
:key="item.value"
|
||||||
<scTable ref="tableoperation" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe
|
:label="item.label"
|
||||||
@resetQuery="resetQuery">
|
:value="item.value"
|
||||||
<!-- <el-table-column
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="timeRange"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="作业开始时间始"
|
||||||
|
end-placeholder="作业开始时间止"
|
||||||
|
style="margin-left: 2px"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
@change="handleQuery"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-select @change="handleFilterTypeChange" v-model="filterType">
|
||||||
|
<el-option
|
||||||
|
v-for="item in filterOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
placeholder="名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="tableoperation"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
@selection-change="selectionChange"
|
||||||
|
stripe
|
||||||
|
@resetQuery="resetQuery"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column
|
||||||
label="#"
|
label="#"
|
||||||
type="index"
|
type="index"
|
||||||
width="50"
|
width="50"
|
||||||
></el-table-column> -->
|
></el-table-column> -->
|
||||||
<el-table-column label="许可证" prop="opls" width="160">
|
<el-table-column label="许可证" prop="opls" width="160">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-for="item in scope.row.cates_" :key="item.id" style="margin-right:2px">{{ item.name }}
|
<el-tag
|
||||||
</el-tag>
|
v-for="item in scope.row.cates_"
|
||||||
</template>
|
:key="item.id"
|
||||||
</el-table-column>
|
style="margin-right: 2px"
|
||||||
<el-table-column label="作业简介" prop="name" width="200"></el-table-column>
|
>{{ item.name }}
|
||||||
<el-table-column label="作业状态" prop="state">
|
</el-tag>
|
||||||
<template #default="scope">{{ stateoptions[scope.row.state] }}</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="生产状态" prop="state_work"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column label="作业区域"><template #default="scope">
|
label="作业简介"
|
||||||
{{ scope.row.area_.name }}
|
prop="name"
|
||||||
</template>
|
width="200"
|
||||||
</el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="预计开始" prop="start_time"></el-table-column>
|
<el-table-column label="作业状态" prop="state">
|
||||||
<el-table-column label="预计结束" prop="end_time"></el-table-column>
|
<template #default="scope">{{
|
||||||
<el-table-column label="属地部门" prop="dept_ter"><template #default="scope">
|
stateoptions[scope.row.state]
|
||||||
{{ scope.row.dept_ter_.name }}
|
}}</template>
|
||||||
</template></el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="业务部门" prop="dept_bus"><template #default="scope">
|
<el-table-column label="生产状态" prop="state_work"></el-table-column>
|
||||||
{{ scope.row.dept_bus_.name }}
|
<el-table-column label="作业区域"
|
||||||
</template></el-table-column>
|
><template #default="scope">
|
||||||
<el-table-column label="创建人" prop="create_by"><template #default="scope">
|
{{ scope.row.area_.name }}
|
||||||
{{ scope.row.create_by_.name }}
|
</template>
|
||||||
</template></el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
<el-table-column label="预计开始" prop="start_time"></el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="180">
|
<el-table-column label="预计结束" prop="end_time"></el-table-column>
|
||||||
<template #default="scope">
|
<el-table-column label="属地部门" prop="dept_ter"
|
||||||
<el-button link type="primary" size="small" v-auth="'operation.update'"
|
><template #default="scope">
|
||||||
@click="creatopl(scope.row)">许可证
|
{{ scope.row.dept_ter_.name }}
|
||||||
</el-button>
|
</template></el-table-column
|
||||||
<el-button link type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看
|
>
|
||||||
</el-button>
|
<el-table-column label="业务部门" prop="dept_bus"
|
||||||
<el-button v-if="scope.row.state === 10" link type="warning" size="small"
|
><template #default="scope">
|
||||||
v-auth="'operation.update'" @click="table_edit(scope.row, scope.$index)">编辑
|
{{ scope.row.dept_bus_.name }}
|
||||||
</el-button>
|
</template></el-table-column
|
||||||
<el-button link type="danger" size="small" v-if="scope.row.state === 10"
|
>
|
||||||
v-auth="'operation.delete'" @click="table_del(scope.row)">删除
|
<el-table-column label="创建人" prop="create_by"
|
||||||
</el-button>
|
><template #default="scope">
|
||||||
</template>
|
{{ scope.row.create_by_.name }}
|
||||||
</el-table-column>
|
</template></el-table-column
|
||||||
</scTable>
|
>
|
||||||
</el-main>
|
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||||
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" @closed="dialog.save = false">
|
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||||
</save-dialog>
|
<template #default="scope">
|
||||||
</el-container>
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
v-auth="'operation.update'"
|
||||||
|
@click="creatopl(scope.row)"
|
||||||
|
>许可证
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="table_show(scope.row, scope.$index)"
|
||||||
|
>查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.state === 10"
|
||||||
|
link
|
||||||
|
type="warning"
|
||||||
|
size="small"
|
||||||
|
v-auth="'operation.update'"
|
||||||
|
@click="table_edit(scope.row, scope.$index)"
|
||||||
|
>编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
v-if="scope.row.state === 10"
|
||||||
|
v-auth="'operation.delete'"
|
||||||
|
@click="table_del(scope.row)"
|
||||||
|
>删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
>
|
||||||
|
</save-dialog>
|
||||||
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./operation_form.vue";
|
import saveDialog from "./operation_form.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "operation",
|
name: "operation",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
permission: false,
|
permission: false,
|
||||||
},
|
},
|
||||||
apiObj: this.$API.opm.operation.list,
|
apiObj: this.$API.opm.operation.list,
|
||||||
query: {
|
query: {},
|
||||||
search: '',
|
filterType: "all",
|
||||||
create_by: '000',
|
filterOptions: [
|
||||||
},
|
{
|
||||||
selection: [],
|
label: "全部",
|
||||||
search: {
|
value: "all",
|
||||||
keyword: null,
|
},
|
||||||
},
|
{
|
||||||
stateoptions: {
|
label: "我创建的",
|
||||||
10: "创建中",
|
value: "my",
|
||||||
20: "审批中",
|
},
|
||||||
30: "待作业",
|
],
|
||||||
40: "作业中",
|
timeRange: [],
|
||||||
50: "已结束",
|
stateOptions: [
|
||||||
},
|
{
|
||||||
userId: '',
|
label: "创建中",
|
||||||
};
|
value: 10,
|
||||||
},
|
},
|
||||||
mounted() {
|
{
|
||||||
let userInfo = this.$TOOL.data.get("USER_INFO");
|
label: "审批中",
|
||||||
this.userId = userInfo.id;
|
value: 20,
|
||||||
},
|
},
|
||||||
methods: {
|
{
|
||||||
|
label: "待作业",
|
||||||
|
value: 30,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "进行中",
|
||||||
|
value: 40,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "已结束",
|
||||||
|
value: 50,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
selection: [],
|
||||||
|
search: {
|
||||||
|
keyword: null,
|
||||||
|
},
|
||||||
|
stateoptions: {
|
||||||
|
10: "创建中",
|
||||||
|
20: "审批中",
|
||||||
|
30: "待作业",
|
||||||
|
40: "作业中",
|
||||||
|
50: "已结束",
|
||||||
|
},
|
||||||
|
userId: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let userInfo = this.$TOOL.data.get("USER_INFO");
|
||||||
|
this.userId = userInfo.id;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//添加
|
||||||
|
add() {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("add");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
//添加
|
//编辑
|
||||||
add() {
|
table_edit(row) {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open("add");
|
this.$refs.saveDialog.open("edit").setData(row);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//查看
|
||||||
|
table_show(row) {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("show").setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//创建作业许可证
|
||||||
|
creatopl(row) {
|
||||||
|
this.$router.push({
|
||||||
|
name: "opl",
|
||||||
|
query: {
|
||||||
|
id: row.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//权限设置
|
||||||
|
permission() {
|
||||||
|
this.dialog.permission = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.permissionDialog.open();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
//编辑
|
//删除
|
||||||
table_edit(row) {
|
table_del(row) {
|
||||||
this.dialog.save = true;
|
this.$API.opm.operation.delete
|
||||||
this.$nextTick(() => {
|
.req(row.id)
|
||||||
this.$refs.saveDialog.open("edit").setData(row);
|
.then((res) => {
|
||||||
});
|
this.$message.success("删除成功");
|
||||||
},
|
this.$refs.tableoperation.refresh();
|
||||||
//查看
|
return res;
|
||||||
table_show(row) {
|
})
|
||||||
this.dialog.save = true;
|
.catch((err) => {
|
||||||
this.$nextTick(() => {
|
return err;
|
||||||
this.$refs.saveDialog.open("show").setData(row);
|
});
|
||||||
});
|
},
|
||||||
},
|
|
||||||
//创建作业许可证
|
|
||||||
creatopl(row) {
|
|
||||||
this.$router.push({
|
|
||||||
name: "opl",
|
|
||||||
query: {
|
|
||||||
id: row.id,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//权限设置
|
|
||||||
permission() {
|
|
||||||
this.dialog.permission = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.permissionDialog.open();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
//删除
|
//表格选择后回调事件
|
||||||
table_del(row) {
|
selectionChange(selection) {
|
||||||
this.$API.opm.operation.delete
|
this.selection = selection;
|
||||||
.req(row.id)
|
},
|
||||||
.then((res) => {
|
//表格内开关
|
||||||
this.$message.success("删除成功");
|
changeSwitch(val, row) {
|
||||||
this.$refs.tableoperation.refresh();
|
row.status = row.status == "1" ? "0" : "1";
|
||||||
return res;
|
row.$switch_status = true;
|
||||||
})
|
setTimeout(() => {
|
||||||
.catch((err) => {
|
delete row.$switch_status;
|
||||||
return err;
|
row.status = val;
|
||||||
});
|
this.$message.success("操作成功");
|
||||||
},
|
}, 500);
|
||||||
|
},
|
||||||
|
//搜索
|
||||||
|
handleQuery() {
|
||||||
|
let obj = {};
|
||||||
|
if (this.timeRange) {
|
||||||
|
this.query.start_create = this.timeRange[0];
|
||||||
|
this.query.end_create = this.timeRange[1];
|
||||||
|
} else {
|
||||||
|
this.query.end_create = null;
|
||||||
|
this.query.start_create = null;
|
||||||
|
}
|
||||||
|
if (this.query.cates) {
|
||||||
|
} else {
|
||||||
|
this.query.cates = null;
|
||||||
|
}
|
||||||
|
this.$refs.tableoperation.queryData(this.query);
|
||||||
|
},
|
||||||
|
handleFilterTypeChange(val) {
|
||||||
|
if (val == "all") {
|
||||||
|
this.query.create_by = null;
|
||||||
|
} else if (val == "my") {
|
||||||
|
this.query.create_by = this.userId;
|
||||||
|
}
|
||||||
|
this.$refs.tableoperation.queryData(this.query);
|
||||||
|
},
|
||||||
|
//根据ID获取树结构
|
||||||
|
filterTree(id) {
|
||||||
|
var target = null;
|
||||||
|
function filter(tree) {
|
||||||
|
tree.forEach((item) => {
|
||||||
|
if (item.id == id) {
|
||||||
|
target = item;
|
||||||
|
}
|
||||||
|
if (item.children) {
|
||||||
|
filter(item.children);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
filter(this.$refs.tableoperation.tableData);
|
||||||
//表格选择后回调事件
|
return target;
|
||||||
selectionChange(selection) {
|
},
|
||||||
this.selection = selection;
|
//本地更新数据
|
||||||
},
|
handleSaveSuccess(data, mode) {
|
||||||
//表格内开关
|
if (mode == "add") {
|
||||||
changeSwitch(val, row) {
|
this.$refs.tableoperation.refresh();
|
||||||
row.status = row.status == "1" ? "0" : "1";
|
} else if (mode == "edit") {
|
||||||
row.$switch_status = true;
|
this.$refs.tableoperation.refresh();
|
||||||
setTimeout(() => {
|
}
|
||||||
delete row.$switch_status;
|
},
|
||||||
row.status = val;
|
resetQuery() {
|
||||||
this.$message.success("操作成功");
|
this.query = {};
|
||||||
}, 500);
|
},
|
||||||
},
|
},
|
||||||
//搜索
|
|
||||||
handleQuery() {
|
|
||||||
let obj = {};
|
|
||||||
obj.search = this.query.search;
|
|
||||||
if (this.query.create_by == '000') {
|
|
||||||
obj.create_by = '';
|
|
||||||
} else {
|
|
||||||
obj.create_by = this.query.create_by;
|
|
||||||
}
|
|
||||||
this.$refs.tableoperation.queryData(obj);
|
|
||||||
},
|
|
||||||
//根据ID获取树结构
|
|
||||||
filterTree(id) {
|
|
||||||
var target = null;
|
|
||||||
function filter(tree) {
|
|
||||||
tree.forEach((item) => {
|
|
||||||
if (item.id == id) {
|
|
||||||
target = item;
|
|
||||||
}
|
|
||||||
if (item.children) {
|
|
||||||
filter(item.children);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
filter(this.$refs.tableoperation.tableData);
|
|
||||||
return target;
|
|
||||||
},
|
|
||||||
//本地更新数据
|
|
||||||
handleSaveSuccess(data, mode) {
|
|
||||||
if (mode == "add") {
|
|
||||||
this.$refs.tableoperation.refresh();
|
|
||||||
} else if (mode == "edit") {
|
|
||||||
this.$refs.tableoperation.refresh();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
resetQuery() {
|
|
||||||
this.query = {};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input v-model="query.search" placeholder="名称" clearable @click="handleQuery"></el-input>
|
<el-input v-model="query.search" placeholder="名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="编号/名称"
|
placeholder="编号/名称"
|
||||||
clearable
|
clearable
|
||||||
@click="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="姓名"
|
placeholder="姓名"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
@ -12,12 +12,12 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="名称"
|
placeholder="名称"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></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>
|
||||||
|
|
|
@ -1,213 +1,385 @@
|
||||||
<template>
|
<template>
|
||||||
<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="add" v-auth="'rpj.create'"></el-button>
|
<el-button
|
||||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
type="primary"
|
||||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
icon="el-icon-plus"
|
||||||
</div>
|
@click="add"
|
||||||
<div class="right-panel">
|
v-auth="'rpj.create'"
|
||||||
<div class="right-panel-search">
|
></el-button>
|
||||||
<el-select v-model="query.create_by">
|
<el-select
|
||||||
<el-option label="全部" value="000" />
|
v-model="query.state"
|
||||||
<el-option label="我的" :value="userId" />
|
placeholder="项目状态"
|
||||||
</el-select>
|
@change="handleQuery"
|
||||||
<el-input v-model="query.search" placeholder="名称" clearable></el-input>
|
style="margin-left: 2px"
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
clearable
|
||||||
</div>
|
>
|
||||||
</div>
|
<el-option
|
||||||
</el-header>
|
v-for="item in stateOptions"
|
||||||
<el-main class="nopadding">
|
:key="item.value"
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe @resetQuery="resetQuery">
|
:label="item.label"
|
||||||
<el-table-column label="#" type="index" fixed="left" width="50"></el-table-column>
|
:value="item.value"
|
||||||
<el-table-column label="名称" prop="name" fixed="left" width="180"></el-table-column>
|
></el-option>
|
||||||
<el-table-column label="项目类型" prop="type" width="180">
|
</el-select>
|
||||||
<template #default="scope">{{ type_[scope.row.type] }}
|
<el-date-picker
|
||||||
</template>
|
v-model="timeRange"
|
||||||
</el-table-column>
|
type="datetimerange"
|
||||||
<el-table-column label="合同编号" prop="contract_number" width="180"></el-table-column>
|
range-separator="至"
|
||||||
<el-table-column label="进厂时间" prop="come_time" width="180"></el-table-column>
|
start-placeholder="入厂时间始"
|
||||||
<el-table-column label="离厂时间" prop="leave_time" width="180"></el-table-column>
|
end-placeholder="入厂时间止"
|
||||||
<el-table-column label="状态" prop="state" width="100">
|
style="margin-left: 2px"
|
||||||
<template #default="scope">{{ state_[scope.row.state] }}</template>
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
</el-table-column>
|
@change="handleQuery"
|
||||||
<el-table-column label="审批状态" width="200">
|
clearable
|
||||||
<template #default="scope">
|
/>
|
||||||
<span v-if="scope.row.ticket_ && scope.row.ticket_.state_"
|
</div>
|
||||||
style="margin-right: 5px;">{{ scope.row.ticket_.state_.name }}</span>
|
<div class="right-panel">
|
||||||
<el-tag v-if="scope.row.ticket_ && scope.row.ticket_.act_state"
|
<div class="right-panel-search">
|
||||||
: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' : ''">
|
<el-select @change="handleFilterTypeChange" v-model="filterType">
|
||||||
{{ act_states[scope.row.ticket_.act_state] }}
|
<el-option
|
||||||
</el-tag>
|
v-for="item in filterOptions"
|
||||||
</template>
|
:key="item.value"
|
||||||
</el-table-column>
|
:label="item.label"
|
||||||
<el-table-column label="所属部门" prop="belong_dept_name" width="180"></el-table-column>
|
:value="item.value"
|
||||||
<el-table-column label="相关方" prop="rparty_name" width="180"></el-table-column>
|
></el-option>
|
||||||
<el-table-column label="创建人" prop="create_by" width="180"></el-table-column>
|
</el-select>
|
||||||
<el-table-column label="创建时间" prop="create_time" width="180"></el-table-column>
|
<el-input
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="180">
|
v-model="query.search"
|
||||||
<template #default="scope">
|
placeholder="名称"
|
||||||
<el-button v-if="scope.row.state === 10" link type="primary" size="small"
|
clearable
|
||||||
@click="next_add(scope.row, scope.$index)" v-auth="'rpj.update'">继续编辑
|
@keyup.enter="handleQuery"
|
||||||
</el-button>
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
@resetQuery="resetQuery"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="#"
|
||||||
|
type="index"
|
||||||
|
fixed="left"
|
||||||
|
width="50"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="名称"
|
||||||
|
prop="name"
|
||||||
|
fixed="left"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="项目类型" prop="type" width="180">
|
||||||
|
<template #default="scope">{{ type_[scope.row.type] }} </template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="合同编号"
|
||||||
|
prop="contract_number"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="进厂时间"
|
||||||
|
prop="come_time"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="离厂时间"
|
||||||
|
prop="leave_time"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="状态" prop="state" width="100">
|
||||||
|
<template #default="scope">{{ state_[scope.row.state] }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审批状态" width="200">
|
||||||
|
<template #default="scope">
|
||||||
|
<span
|
||||||
|
v-if="scope.row.ticket_ && scope.row.ticket_.state_"
|
||||||
|
style="margin-right: 5px"
|
||||||
|
>{{ scope.row.ticket_.state_.name }}</span
|
||||||
|
>
|
||||||
|
<el-tag
|
||||||
|
v-if="scope.row.ticket_ && scope.row.ticket_.act_state"
|
||||||
|
:type="
|
||||||
|
scope.row.ticket_.act_state === 0
|
||||||
|
? ''
|
||||||
|
: scope.row.ticket_.act_state === 1
|
||||||
|
? ''
|
||||||
|
: scope.row.ticket_.act_state === 2
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.ticket_.act_state === 3
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.ticket_.act_state === 5
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.ticket_.act_state === 4
|
||||||
|
? 'success'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ act_states[scope.row.ticket_.act_state] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="所属部门"
|
||||||
|
prop="belong_dept_name"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="相关方"
|
||||||
|
prop="rparty_name"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建人"
|
||||||
|
prop="create_by_name"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.state === 10"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="next_add(scope.row, scope.$index)"
|
||||||
|
v-auth="'rpj.update'"
|
||||||
|
>继续编辑
|
||||||
|
</el-button>
|
||||||
|
|
||||||
<el-button link type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看
|
<el-button
|
||||||
</el-button>
|
link
|
||||||
<!--<el-button
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="table_show(scope.row, scope.$index)"
|
||||||
|
>查看
|
||||||
|
</el-button>
|
||||||
|
<!--<el-button
|
||||||
text
|
text
|
||||||
type="warning"
|
type="warning"
|
||||||
size="small"
|
size="small"
|
||||||
@click="table_edit(scope.row, scope.$index)"
|
@click="table_edit(scope.row, scope.$index)"
|
||||||
>编辑
|
>编辑
|
||||||
</el-button>-->
|
</el-button>-->
|
||||||
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
<el-popconfirm
|
||||||
<template #reference>
|
title="确定删除吗?"
|
||||||
<el-button link type="danger" size="small" v-auth="'rpj.delete'">删除</el-button>
|
@confirm="table_del(scope.row, scope.$index)"
|
||||||
</template>
|
>
|
||||||
</el-popconfirm>
|
<template #reference>
|
||||||
</template>
|
<el-button link type="danger" size="small" v-auth="'rpj.delete'"
|
||||||
</el-table-column>
|
>删除</el-button
|
||||||
</scTable>
|
>
|
||||||
</el-main>
|
</template>
|
||||||
</el-container>
|
</el-popconfirm>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
|
||||||
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" @closed="dialog.save = false">
|
<save-dialog
|
||||||
</save-dialog>
|
v-if="dialog.save"
|
||||||
<show-dialog v-if="dialog.show" ref="showDialog" @closed="dialog.show = false"></show-dialog>
|
ref="saveDialog"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
>
|
||||||
|
</save-dialog>
|
||||||
|
<show-dialog
|
||||||
|
v-if="dialog.show"
|
||||||
|
ref="showDialog"
|
||||||
|
@closed="dialog.show = false"
|
||||||
|
></show-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./rpj_form.vue";
|
import saveDialog from "./rpj_form.vue";
|
||||||
import showDialog from "./rpj_show.vue";
|
import showDialog from "./rpj_show.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "remployee",
|
name: "remployee",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
showDialog,
|
showDialog,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
show: false,
|
show: false,
|
||||||
permission: false,
|
permission: false,
|
||||||
},
|
},
|
||||||
adminform: {
|
adminform: {
|
||||||
username: "",
|
username: "",
|
||||||
},
|
},
|
||||||
apiObj: this.$API.rpm.rpj.list,
|
apiObj: this.$API.rpm.rpj.list,
|
||||||
query: {
|
query: {},
|
||||||
search: '',
|
userId: "",
|
||||||
create_by: '000'
|
selection: [],
|
||||||
},
|
search: {
|
||||||
userId: '',
|
search: "",
|
||||||
selection: [],
|
keyword: null,
|
||||||
search: {
|
},
|
||||||
search: '',
|
type_: {
|
||||||
keyword: null,
|
10: "建筑施工",
|
||||||
},
|
20: "设备设施检维修",
|
||||||
type_: {
|
30: "保安保洁服务",
|
||||||
10: "建筑施工",
|
40: "其他",
|
||||||
20: "设备设施检维修",
|
},
|
||||||
30: "保安保洁服务",
|
timeRange: [],
|
||||||
40: "其他",
|
filteType: "all",
|
||||||
},
|
stateOptions: [
|
||||||
state_: {
|
{
|
||||||
10: "创建中",
|
label: "创建中",
|
||||||
20: "审批中",
|
value: 10,
|
||||||
30: "待入厂",
|
},
|
||||||
40: "进行中",
|
{
|
||||||
50: "已完成",
|
label: "审批中",
|
||||||
},
|
value: 20,
|
||||||
act_states: {
|
},
|
||||||
0: "草稿中",
|
{
|
||||||
1: "进行中",
|
label: "待入厂",
|
||||||
2: "被退回",
|
value: 30,
|
||||||
3: "被撤回",
|
},
|
||||||
4: "已完成",
|
{
|
||||||
5: "已关闭",
|
label: "进行中",
|
||||||
},
|
value: 40,
|
||||||
};
|
},
|
||||||
},
|
{
|
||||||
mounted() {
|
label: "已完成",
|
||||||
let userInfo = this.$TOOL.data.get("USER_INFO");
|
value: 50,
|
||||||
this.userId = userInfo.id;
|
},
|
||||||
},
|
{
|
||||||
methods: {
|
label: "已关闭",
|
||||||
//添加
|
value: 60,
|
||||||
add() {
|
},
|
||||||
this.dialog.save = true;
|
],
|
||||||
this.$nextTick(() => {
|
state_: {
|
||||||
this.$refs.saveDialog.open("add");
|
10: "创建中",
|
||||||
});
|
20: "审批中",
|
||||||
},
|
30: "待入厂",
|
||||||
//编辑
|
40: "进行中",
|
||||||
table_edit(row) {
|
50: "已完成",
|
||||||
this.dialog.save = true;
|
},
|
||||||
this.$nextTick(() => {
|
act_states: {
|
||||||
this.$refs.saveDialog.open("edit").setData(row);
|
0: "草稿中",
|
||||||
});
|
1: "进行中",
|
||||||
},
|
2: "被退回",
|
||||||
//查看
|
3: "被撤回",
|
||||||
table_show(row) {
|
4: "已完成",
|
||||||
// debugger;
|
5: "已关闭",
|
||||||
this.dialog.show = true;
|
},
|
||||||
this.$nextTick(() => {
|
filterType: "all",
|
||||||
this.$refs.showDialog.open().setData(row);
|
filterOptions: [
|
||||||
});
|
{
|
||||||
},
|
label: "全部",
|
||||||
|
value: "all",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "我创建的",
|
||||||
|
value: "my",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let userInfo = this.$TOOL.data.get("USER_INFO");
|
||||||
|
this.userId = userInfo.id;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//添加
|
||||||
|
add() {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("add");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//编辑
|
||||||
|
table_edit(row) {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("edit").setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//查看
|
||||||
|
table_show(row) {
|
||||||
|
// debugger;
|
||||||
|
this.dialog.show = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.showDialog.open().setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
//权限设置
|
//权限设置
|
||||||
permission() {
|
permission() {
|
||||||
this.dialog.permission = true;
|
this.dialog.permission = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.permissionDialog.open();
|
this.$refs.permissionDialog.open();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//删除
|
//删除
|
||||||
async table_del(row) {
|
async table_del(row) {
|
||||||
this.$API.rpm.rpj.delete
|
this.$API.rpm.rpj.delete
|
||||||
.req(row.id)
|
.req(row.id)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
return err;
|
return err;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
next_add(row) {
|
next_add(row) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "rpjadd",
|
name: "rpjadd",
|
||||||
query: {
|
query: {
|
||||||
rpjid: row.id, //入厂项目id
|
rpjid: row.id, //入厂项目id
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess(data, mode) {
|
||||||
if (mode == "add") {
|
if (mode == "add") {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
} else if (mode == "edit") {
|
} else if (mode == "edit") {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
},
|
},
|
||||||
//搜索
|
//搜索
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
let obj = {};
|
if (this.timeRange) {
|
||||||
obj.search = this.query.search;
|
this.query.start_come = this.timeRange[0];
|
||||||
if (this.query.create_by == '000') {
|
this.query.end_come = this.timeRange[1];
|
||||||
obj.create_by = '';
|
} else {
|
||||||
} else {
|
this.query.end_come = null;
|
||||||
obj.create_by = this.query.create_by;
|
this.query.start_come = null;
|
||||||
}
|
}
|
||||||
this.$refs.table.queryData(obj);
|
this.$refs.table.queryData(this.query);
|
||||||
},
|
},
|
||||||
},
|
handleFilterTypeChange(val) {
|
||||||
|
if (val == "all") {
|
||||||
|
this.query.create_by = null;
|
||||||
|
} else if (val == "my") {
|
||||||
|
this.query.create_by = this.userId;
|
||||||
|
}
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input v-model="query.search" placeholder="部门名称" clearable></el-input>
|
<el-input v-model="query.search" placeholder="部门名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input v-model="query.search" placeholder="角色名称" clearable></el-input>
|
<el-input v-model="query.search" placeholder="角色名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input v-model="query.search" placeholder="登录账号 / 姓名" clearable></el-input>
|
<el-input v-model="query.search" placeholder="登录账号/姓名" clearable @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,18 +8,18 @@
|
||||||
@click="addDept"
|
@click="addDept"
|
||||||
v-auth="'dept.create'"
|
v-auth="'dept.create'"
|
||||||
></el-button>
|
></el-button>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
v-auth="'dept.delete'"
|
v-auth="'dept.delete'"
|
||||||
:disabled="selection.length == 0"
|
:disabled="selection.length == 0"
|
||||||
@click="batch_del"
|
@click="batch_del"
|
||||||
></el-button>
|
></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="query.search" placeholder="部门名称"></el-input>
|
<el-input v-model="query.search" placeholder="部门名称" @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input v-model="query.search" placeholder="角色名称" clearable></el-input>
|
<el-input v-model="query.search" placeholder="角色名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,19 +34,20 @@
|
||||||
v-auth="'user.create'"
|
v-auth="'user.create'"
|
||||||
@click="add"
|
@click="add"
|
||||||
></el-button>
|
></el-button>
|
||||||
<!-- <el-button
|
<el-select
|
||||||
type="danger"
|
v-model="query.type"
|
||||||
plain
|
placeholder="账号类型"
|
||||||
icon="el-icon-delete"
|
@change="handleQuery"
|
||||||
:disabled="selection.length == 0"
|
clearable
|
||||||
@click="batch_del"
|
style="margin-left: 2px"
|
||||||
></el-button> -->
|
>
|
||||||
<!-- <el-button
|
<el-option
|
||||||
type="primary"
|
v-for="item in userTypeOptions2"
|
||||||
plain
|
:key="item.value"
|
||||||
:disabled="selection.length == 0"
|
:label="item.label"
|
||||||
>密码重置
|
:value="item.value"
|
||||||
</el-button> -->
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
|
@ -73,32 +74,36 @@
|
||||||
remoteFilter
|
remoteFilter
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
>
|
>
|
||||||
<!-- <el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="index"
|
||||||
width="50"
|
width="50"
|
||||||
></el-table-column> -->
|
></el-table-column>
|
||||||
<el-table-column label="ID" prop="id" width="160"></el-table-column>
|
<!-- <el-table-column label="ID" prop="id" width="160"></el-table-column> -->
|
||||||
<el-table-column label="姓名" prop="name"></el-table-column>
|
<el-table-column label="姓名" prop="name"></el-table-column>
|
||||||
<el-table-column label="登录账号" prop="username"></el-table-column>
|
<el-table-column label="登录账号" prop="username" width="140"></el-table-column>
|
||||||
<el-table-column label="是否启用" prop="is_active">
|
<el-table-column label="是否启用" prop="is_active">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="success" v-if="scope.row.is_active">启用</el-tag>
|
<el-tag type="success" v-if="scope.row.is_active">启用</el-tag>
|
||||||
<el-tag v-else type="danger">禁用</el-tag>
|
<el-tag v-else type="danger">禁用</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="微信通知" width="80">
|
<!-- <el-table-column label="微信通知" width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-icon v-if="scope.row.wx_openid" color="green"
|
<el-icon v-if="scope.row.wx_openid" color="green"
|
||||||
><CircleCheckFilled
|
><CircleCheckFilled
|
||||||
/></el-icon>
|
/></el-icon>
|
||||||
<el-icon v-else color="red"><CircleCloseFilled /></el-icon>
|
<el-icon v-else color="red"><CircleCloseFilled /></el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="账号类型" prop="type">
|
<el-table-column label="账号类型" prop="type">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{userTypeOptions[scope.row.type]}}</span>
|
<span>{{userTypeOptions[scope.row.type]}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="部门" prop="belong_dept_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="岗位" prop="post_name">
|
||||||
|
</el-table-column>
|
||||||
<!-- <el-table-column label="小程序" width="80">
|
<!-- <el-table-column label="小程序" width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-icon v-if="scope.row.wxmp_openid" color="green"
|
<el-icon v-if="scope.row.wxmp_openid" color="green"
|
||||||
|
@ -168,6 +173,16 @@
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
label-position="left"
|
label-position="left"
|
||||||
>
|
>
|
||||||
|
<el-form-item label="账户类型:" prop="type">
|
||||||
|
<el-select v-model="addForm.type" placeholder="账号类型">
|
||||||
|
<el-option
|
||||||
|
v-for="item in userTypeOptions2"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="登录账号" prop="username">
|
<el-form-item label="登录账号" prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addForm.username"
|
v-model="addForm.username"
|
||||||
|
@ -240,19 +255,19 @@ export default {
|
||||||
},
|
},
|
||||||
//表单数据
|
//表单数据
|
||||||
addForm: {
|
addForm: {
|
||||||
id: "",
|
|
||||||
username: "",
|
username: "",
|
||||||
name: "",
|
name: "",
|
||||||
// email: "",
|
// email: "",
|
||||||
phone: "",
|
phone: null,
|
||||||
// belong_dept: [],
|
// belong_dept: [],
|
||||||
is_active: true,
|
is_active: true,
|
||||||
|
type: "employee"
|
||||||
},
|
},
|
||||||
//验证规则
|
//验证规则
|
||||||
rules: {
|
rules: {
|
||||||
username: [{ required: true, message: "请输入登录账号" }],
|
username: [{ required: true, message: "请输入登录账号" }],
|
||||||
name: [{ required: true, message: "请输入真实姓名" }],
|
name: [{ required: true, message: "请输入真实姓名" }],
|
||||||
group: [{ required: true, message: "请选择所属角色" }],
|
type: [{ required: true, message: "请选择所属账号类型" }],
|
||||||
},
|
},
|
||||||
//所需数据选项
|
//所需数据选项
|
||||||
groups: [],
|
groups: [],
|
||||||
|
@ -283,6 +298,12 @@ export default {
|
||||||
'visitor': '访客',
|
'visitor': '访客',
|
||||||
'driver':'司机'
|
'driver':'司机'
|
||||||
},
|
},
|
||||||
|
userTypeOptions2: [
|
||||||
|
{label:"正式员工", value:"employee"},
|
||||||
|
{label:"相关方", value:"remployee"},
|
||||||
|
{label:"访客", value:"visitor"},
|
||||||
|
{label:"货车司机", value:"driver"}
|
||||||
|
],
|
||||||
idArr: []
|
idArr: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -326,6 +347,7 @@ export default {
|
||||||
this.addForm.username = row.username;
|
this.addForm.username = row.username;
|
||||||
this.addForm.phone = row.phone;
|
this.addForm.phone = row.phone;
|
||||||
this.addForm.is_active = row.is_active;
|
this.addForm.is_active = row.is_active;
|
||||||
|
this.addForm.type = row.type;
|
||||||
},
|
},
|
||||||
formSetting(row) {
|
formSetting(row) {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
|
|
|
@ -1,222 +1,253 @@
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
title="用户岗位关系"
|
title="用户岗位关系"
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
:size="1000"
|
:size="1000"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
@closed="closeDrawer"
|
@closed="closeDrawer"
|
||||||
>
|
>
|
||||||
<el-container v-loading="loading">
|
<el-container v-loading="loading">
|
||||||
<!--<sc-title title="详细信息"></sc-title>-->
|
<!--<sc-title title="详细信息"></sc-title>-->
|
||||||
<el-main style="padding: 0 20px 20px 20px">
|
<el-main style="padding: 0 20px 20px 20px">
|
||||||
<el-form
|
<el-form
|
||||||
ref="dialogForm"
|
ref="dialogForm"
|
||||||
:model="form"
|
:model="form"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="姓名:" prop="name">
|
<el-form-item label="姓名:" prop="name">
|
||||||
<span>{{form.name}}</span>
|
<span>{{ form.name }}</span>
|
||||||
</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="登录账号:" prop="name">
|
<el-form-item label="登录账号:" prop="name">
|
||||||
<span>{{form.username}}</span>
|
<span>{{ form.username }}</span>
|
||||||
</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="手机号:" prop="phone">
|
<el-form-item label="手机号:" prop="phone">
|
||||||
<span>{{form.phone}}</span>
|
<span>{{ form.phone }}</span>
|
||||||
</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="是否启用:">
|
||||||
<span>{{job_states[form.is_active]}}</span>
|
<span>{{ job_states[form.is_active] }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!--drag-sort -->
|
<!--drag-sort -->
|
||||||
<sc-form-table v-model="userPostForm.list" :addTemplate="addTemplate" placeholder="暂无数据">
|
<sc-form-table
|
||||||
<!-- <el-table-column prop="val" label="名称" min-width="150">
|
v-model="userPostForm.list"
|
||||||
|
:addTemplate="addTemplate"
|
||||||
|
placeholder="暂无数据"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column prop="val" label="名称" min-width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.id">{{scope.row.name}}</span>
|
<span v-if="scope.row.id">{{scope.row.name}}</span>
|
||||||
<el-input v-else v-model="scope.row.name" placeholder="名称"></el-input>
|
<el-input v-else v-model="scope.row.name" placeholder="名称"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column prop="val" label="排序" min-width="80">
|
<el-table-column prop="val" label="排序" min-width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.id">{{scope.row.sort}}</span>
|
<span v-if="scope.row.id">{{ scope.row.sort }}</span>
|
||||||
<el-input v-else v-model="scope.row.sort" placeholder="请输入内容"></el-input>
|
<el-input
|
||||||
</template>
|
v-else
|
||||||
</el-table-column>
|
v-model="scope.row.sort"
|
||||||
<el-table-column prop="time" label="部门" min-width="150">
|
placeholder="请输入内容"
|
||||||
<template #default="scope">
|
></el-input>
|
||||||
<span v-if="scope.row.id&&scope.row.dept_">{{scope.row.dept_.name}}</span>
|
</template>
|
||||||
<el-cascader
|
</el-table-column>
|
||||||
v-else
|
<el-table-column prop="time" label="部门" min-width="150">
|
||||||
v-model="scope.row.dept"
|
<template #default="scope">
|
||||||
:options="group"
|
<span v-if="scope.row.id && scope.row.dept_">{{
|
||||||
:props="groupsProps"
|
scope.row.dept_.name
|
||||||
:show-all-levels="false"
|
}}</span>
|
||||||
clearable
|
<el-cascader
|
||||||
style="width: 100%"
|
v-else
|
||||||
@change="groupsProps"
|
v-model="scope.row.dept"
|
||||||
></el-cascader>
|
:options="group"
|
||||||
</template>
|
:props="groupsProps"
|
||||||
</el-table-column>
|
:show-all-levels="false"
|
||||||
<el-table-column prop="type" label="岗位" min-width="150">
|
clearable
|
||||||
<template #default="scope">
|
style="width: 100%"
|
||||||
<span v-if="scope.row.id">{{scope.row.post_.name}}</span>
|
@change="groupsProps"
|
||||||
<el-select v-else v-model="scope.row.post" filterable placeholder="请选择所在岗位">
|
></el-cascader>
|
||||||
<el-option v-for="item in postOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
</template>
|
||||||
</el-select>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column prop="type" label="岗位" min-width="150">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column prop="open" label="操作" width="80" align="center">
|
<span v-if="scope.row.id">{{ scope.row.post_.name }}</span>
|
||||||
<template #default="scope">
|
<el-select
|
||||||
<el-button v-if="scope.row.id" text type="danger" size="small" @click="userPostDel(scope.row.id)">删除</el-button>
|
v-else
|
||||||
<el-button v-else text type="primary" size="small" @click="createUserPost(scope.row)">添加</el-button>
|
v-model="scope.row.post"
|
||||||
</template>
|
filterable
|
||||||
</el-table-column>
|
placeholder="请选择所在岗位"
|
||||||
</sc-form-table>
|
>
|
||||||
</el-main>
|
<el-option
|
||||||
</el-container>
|
v-for="item in postOptions"
|
||||||
</el-drawer>
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="open" label="操作" width="80" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.id"
|
||||||
|
text
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
@click="userPostDel(scope.row.id)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
text
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="createUserPost(scope.row)"
|
||||||
|
>添加</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</sc-form-table>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {genTree} from "@/utils/verificate";
|
import { genTree } from "@/utils/verificate";
|
||||||
export default {
|
export default {
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
addTemplate: {
|
addTemplate: {
|
||||||
name: '',
|
name: "",
|
||||||
sort: '',
|
sort: "",
|
||||||
user: '',
|
user: "",
|
||||||
post: "",
|
post: "",
|
||||||
dept: "",
|
dept: "",
|
||||||
},
|
},
|
||||||
userPostForm: {
|
userPostForm: {
|
||||||
title: "用户/岗位关系",
|
title: "用户/岗位关系",
|
||||||
list: []
|
list: [],
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
job_states: { true: "启用",false: "禁用"},
|
job_states: { true: "启用", false: "禁用" },
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
form: {},
|
form: {},
|
||||||
addForm: {
|
addForm: {
|
||||||
name: "",
|
name: "",
|
||||||
sort: "",
|
sort: "",
|
||||||
user: "",
|
user: "",
|
||||||
post: "",
|
post: "",
|
||||||
dept: [],
|
dept: [],
|
||||||
},
|
},
|
||||||
groupsProps: {
|
groupsProps: {
|
||||||
// value: "id",
|
// value: "id",
|
||||||
multiple: false,
|
multiple: false,
|
||||||
emitPath: false,
|
emitPath: false,
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
},
|
},
|
||||||
group: [],
|
group: [],
|
||||||
postOptions: [],
|
postOptions: [],
|
||||||
selectionFilters: [],
|
selectionFilters: [],
|
||||||
filtersAddTemplate: {
|
filtersAddTemplate: {
|
||||||
text: "",
|
text: "",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getPosts();
|
this.getPosts();
|
||||||
this.getGroup();
|
this.getGroup();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getPosts() {
|
||||||
|
this.$API.system.post.list.req({ page: 0 }).then((res) => {
|
||||||
|
if (res.err_msg) {
|
||||||
|
this.$message.error(res.err_msg);
|
||||||
|
} else {
|
||||||
|
this.postOptions = res;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//加载树数据
|
||||||
|
async getGroup() {
|
||||||
|
let res = await this.$API.system.dept.list.req({ page: 0 });
|
||||||
|
this.group = genTree(res);
|
||||||
|
},
|
||||||
|
//显示
|
||||||
|
open(mode) {
|
||||||
|
this.mode = mode;
|
||||||
|
this.visible = true;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
//表单注入数据
|
||||||
|
setData(data) {
|
||||||
|
debugger;
|
||||||
|
Object.assign(this.form, data);
|
||||||
|
this.getUserPostList();
|
||||||
|
},
|
||||||
|
closeDrawer() {
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit("closed");
|
||||||
|
},
|
||||||
|
handleChange(value) {
|
||||||
|
debugger;
|
||||||
|
console.log(value);
|
||||||
|
console.log(this.addForm.parent);
|
||||||
|
},
|
||||||
|
|
||||||
},
|
//设置过滤项
|
||||||
methods: {
|
setFilters(filters) {
|
||||||
getPosts(){
|
this.selectionFilters = filters;
|
||||||
this.$API.system.post.list.req({page:0}).then(res=>{
|
this.setFiltersVisible = true;
|
||||||
if(res.err_msg){
|
},
|
||||||
this.$message.error(res.err_msg)
|
/////
|
||||||
}else{
|
//用户岗位关系列表
|
||||||
this.postOptions = res;
|
getUserPostList() {
|
||||||
}
|
debugger;
|
||||||
})
|
console.log(this.form.id);
|
||||||
},
|
let obj = { user: this.form.id, page: 0 };
|
||||||
//加载树数据
|
this.$API.system.userPost.list.req(obj).then((res) => {
|
||||||
async getGroup() {
|
this.userPostForm.list = res;
|
||||||
let res = await this.$API.system.dept.list.req({page: 0});
|
});
|
||||||
this.group =genTree(res);
|
},
|
||||||
},
|
//新增用户岗位关系
|
||||||
//显示
|
createUserPost(row) {
|
||||||
open(mode) {
|
debugger;
|
||||||
this.mode = mode;
|
console.log(row);
|
||||||
this.visible = true;
|
this.isSaveing = true;
|
||||||
return this;
|
row.user = this.form.id;
|
||||||
},
|
this.$API.system.userPost.create.req(row).then((res) => {
|
||||||
//表单注入数据
|
this.getUserPostList();
|
||||||
setData(data) {
|
this.$message.success("操作成功");
|
||||||
debugger;
|
});
|
||||||
Object.assign(this.form, data);
|
},
|
||||||
this.getUserPostList();
|
//用户岗位关系删除
|
||||||
},
|
userPostDel(id) {
|
||||||
closeDrawer() {
|
this.$confirm(`确定删除该岗位关系吗?`, "提示", {
|
||||||
this.visible = false;
|
type: "warning",
|
||||||
this.$emit('closed');
|
confirmButtonText: "删除",
|
||||||
},
|
confirmButtonClass: "el-button--danger",
|
||||||
handleChange(value) {
|
}).then(() => {
|
||||||
debugger;
|
this.$API.system.userPost.delete.req(id).then((res) => {
|
||||||
console.log(value);
|
this.getUserPostList();
|
||||||
console.log(this.addForm.parent);
|
this.$message.success("操作成功");
|
||||||
},
|
});
|
||||||
|
});
|
||||||
//设置过滤项
|
},
|
||||||
setFilters(filters) {
|
},
|
||||||
this.selectionFilters = filters;
|
};
|
||||||
this.setFiltersVisible = true;
|
|
||||||
},
|
|
||||||
/////
|
|
||||||
//用户岗位关系列表
|
|
||||||
getUserPostList(){
|
|
||||||
debugger;
|
|
||||||
console.log(this.form.id);
|
|
||||||
let obj = {user:this.form.id, page:0};
|
|
||||||
this.$API.system.userPost.list.req(obj).then(res=>{
|
|
||||||
this.userPostForm.list=res;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//新增用户岗位关系
|
|
||||||
createUserPost(row){
|
|
||||||
debugger;
|
|
||||||
console.log(row);
|
|
||||||
this.isSaveing = true;
|
|
||||||
row.user = this.form.id;
|
|
||||||
this.$API.system.userPost.create.req(row).then(res=>{
|
|
||||||
this.getUserPostList();
|
|
||||||
this.$message.success("操作成功");
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//用户岗位关系删除
|
|
||||||
userPostDel(id){
|
|
||||||
this.$confirm(`确定删除该岗位关系吗?`, '提示', {
|
|
||||||
type: 'warning',
|
|
||||||
confirmButtonText: '删除',
|
|
||||||
confirmButtonClass: 'el-button--danger'
|
|
||||||
}).then(() => {
|
|
||||||
this.$API.system.userPost.delete.req(id).then(res=>{
|
|
||||||
this.getUserPostList();
|
|
||||||
this.$message.success("操作成功");
|
|
||||||
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -1,284 +1,326 @@
|
||||||
<template>
|
<template>
|
||||||
<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="add" v-auth="'visit.create'"></el-button>
|
<el-button
|
||||||
</div>
|
type="primary"
|
||||||
<div class="right-panel">
|
icon="el-icon-plus"
|
||||||
<div class="right-panel-search">
|
@click="add"
|
||||||
<el-input
|
v-auth="'visit.create'"
|
||||||
v-model="query.search"
|
></el-button>
|
||||||
placeholder="名称"
|
<el-select
|
||||||
clearable
|
v-model="query.purpose"
|
||||||
></el-input>
|
placeholder="来访事由"
|
||||||
<el-button
|
@change="handleQuery"
|
||||||
type="primary"
|
clearable
|
||||||
icon="el-icon-search"
|
style="margin-left: 2px"
|
||||||
></el-button>
|
>
|
||||||
</div>
|
<el-option
|
||||||
</div>
|
v-for="item in purposeOptions"
|
||||||
</el-header>
|
:key="item.value"
|
||||||
<el-main class="nopadding">
|
:label="item.label"
|
||||||
<scTable
|
:value="item.value"
|
||||||
ref="table"
|
></el-option>
|
||||||
:apiObj="apiObj"
|
</el-select>
|
||||||
row-key="id"
|
<el-date-picker
|
||||||
@selection-change="selectionChange"
|
v-model="timeRange"
|
||||||
stripe
|
type="datetimerange"
|
||||||
@resetQuery="resetQuery"
|
range-separator="至"
|
||||||
>
|
start-placeholder="来访时间始"
|
||||||
<el-table-column
|
end-placeholder="来访时间止"
|
||||||
label="#"
|
style="margin-left: 2px"
|
||||||
fixed="left"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
type="index"
|
@change="handleQuery"
|
||||||
width="50"
|
clearable
|
||||||
></el-table-column>
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<div class="right-panel-search">
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
placeholder="名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
@selection-change="selectionChange"
|
||||||
|
stripe
|
||||||
|
@resetQuery="resetQuery"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="#"
|
||||||
|
fixed="left"
|
||||||
|
type="index"
|
||||||
|
width="50"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column label="来访事由" prop="state" width="180" fixed="left">
|
<el-table-column label="来访事由" prop="state" width="180" fixed="left">
|
||||||
<template #default="scope">{{purpose_[scope.row.purpose] }}</template>
|
<template #default="scope">{{
|
||||||
</el-table-column>
|
purpose_[scope.row.purpose]
|
||||||
<el-table-column
|
}}</template>
|
||||||
label="访问级别"
|
</el-table-column>
|
||||||
prop="level"
|
<el-table-column
|
||||||
min-width="100"
|
label="访问级别"
|
||||||
fixed="left"
|
prop="level"
|
||||||
>
|
min-width="100"
|
||||||
<template #default="scope">
|
fixed="left"
|
||||||
<el-space v-if="scope.row.level==10">一般</el-space>
|
>
|
||||||
<el-space v-else>重要</el-space>
|
<template #default="scope">
|
||||||
</template>
|
<el-space v-if="scope.row.level == 10">一般</el-space>
|
||||||
</el-table-column>
|
<el-space v-else>重要</el-space>
|
||||||
<el-table-column
|
</template>
|
||||||
label="来访单位"
|
</el-table-column>
|
||||||
prop="company"
|
<el-table-column
|
||||||
min-width="180"
|
label="来访单位"
|
||||||
fixed="left"
|
prop="company"
|
||||||
></el-table-column>
|
min-width="180"
|
||||||
<el-table-column
|
fixed="left"
|
||||||
label="项目状态"
|
></el-table-column>
|
||||||
prop="state"
|
<el-table-column label="项目状态" prop="state" min-width="180">
|
||||||
min-width="180"
|
<template #default="scope">{{ state_[scope.row.state] }}</template>
|
||||||
>
|
</el-table-column>
|
||||||
<template #default="scope">{{state_[scope.row.state] }}</template>
|
<el-table-column label="审批状态" min-width="150">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column
|
<span
|
||||||
label="审批状态"
|
v-if="scope.row.ticket_ && scope.row.ticket_.state_"
|
||||||
prop="state"
|
style="margin-right: 5px"
|
||||||
min-width="150"
|
>{{ scope.row.ticket_.state_.name }}</span
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<el-tag
|
||||||
<span v-if="scope.row.ticket_&&scope.row.ticket_.state_" style="margin-right: 5px;">{{scope.row.ticket_.state_.name }}</span>
|
v-if="scope.row.ticket_ && scope.row.ticket_.act_state"
|
||||||
<el-tag
|
class="mx-1"
|
||||||
v-if="scope.row.ticket_&&scope.row.ticket_.act_state"
|
size="small"
|
||||||
class="mx-1"
|
:type="
|
||||||
size="small"
|
scope.row.ticket_.act_state === 0
|
||||||
:type="scope.row.ticket_.act_state===0?'':scope.row.ticket_.act_state===1?'':scope.row.ticket_.act_state===2?'danger':scope.row.ticket_.act_state===3?'danger':scope.row.ticket_.act_state===5?'danger':scope.row.ticket_.act_state===4?'success':''"
|
? ''
|
||||||
>{{act_states[scope.row.ticket_.act_state]}}</el-tag>
|
: scope.row.ticket_.act_state === 1
|
||||||
</template>
|
? ''
|
||||||
</el-table-column>
|
: scope.row.ticket_.act_state === 2
|
||||||
<el-table-column
|
? 'danger'
|
||||||
|
: scope.row.ticket_.act_state === 3
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.ticket_.act_state === 5
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.ticket_.act_state === 4
|
||||||
|
? 'success'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
>{{ act_states[scope.row.ticket_.act_state] }}</el-tag
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column
|
||||||
label="来访概述"
|
label="来访概述"
|
||||||
prop="name"
|
prop="name"
|
||||||
min-width="180"
|
min-width="180"
|
||||||
></el-table-column>
|
></el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="来访详述"
|
label="来访时间"
|
||||||
prop="description"
|
prop="visit_time"
|
||||||
min-width="180"
|
width="180"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="来访时间"
|
label="离开时间"
|
||||||
prop="visit_time"
|
prop="leave_time"
|
||||||
width="180"
|
width="180"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="离开时间"
|
label="来访人数"
|
||||||
prop="leave_time"
|
prop="count_people"
|
||||||
width="180"
|
min-width="80"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="接待人" prop="receptionist_name" min-width="80">
|
||||||
label="来访人数"
|
<template #default="scope">
|
||||||
prop="count_people"
|
<span v-if="scope.row.receptionist_">{{
|
||||||
min-width="80"
|
scope.row.receptionist_.name
|
||||||
></el-table-column>
|
}}</span>
|
||||||
<el-table-column
|
</template>
|
||||||
label="属地部门"
|
</el-table-column>
|
||||||
prop="belong_dept"
|
<el-table-column
|
||||||
min-width="150"
|
label="创建时间"
|
||||||
></el-table-column>
|
prop="create_time"
|
||||||
<el-table-column
|
width="180"
|
||||||
label="接待人"
|
></el-table-column>
|
||||||
prop="receptionist_name"
|
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||||
min-width="80"
|
<template #default="scope">
|
||||||
>
|
<el-button
|
||||||
<template #default="scope">
|
link
|
||||||
<span v-if="scope.row.receptionist_">{{scope.row.receptionist_.name}}</span>
|
v-if="scope.row.state == 10"
|
||||||
</template>
|
type="primary"
|
||||||
</el-table-column>
|
size="small"
|
||||||
<el-table-column
|
@click="addpepple(scope.row, scope.$index)"
|
||||||
label="创建时间"
|
v-auth="'visit.update'"
|
||||||
prop="create_time"
|
>继续编辑
|
||||||
width="180"
|
</el-button>
|
||||||
></el-table-column>
|
<el-button
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
link
|
||||||
<template #default="scope">
|
type="primary"
|
||||||
<el-button
|
size="small"
|
||||||
link
|
@click="table_show(scope.row, scope.$index)"
|
||||||
v-if="scope.row.state==10"
|
>查看
|
||||||
type="primary"
|
</el-button>
|
||||||
size="small"
|
<el-button
|
||||||
@click="addpepple(scope.row, scope.$index)"
|
link
|
||||||
v-auth="'visit.update'"
|
type="primary"
|
||||||
>继续编辑
|
size="small"
|
||||||
</el-button>
|
@click="table_del(scope.row)"
|
||||||
<el-button
|
v-auth="'visit.delete'"
|
||||||
link
|
>删除
|
||||||
type="primary"
|
</el-button>
|
||||||
size="small"
|
</template>
|
||||||
@click="table_show(scope.row, scope.$index)"
|
</el-table-column>
|
||||||
>查看
|
</scTable>
|
||||||
</el-button>
|
</el-main>
|
||||||
<el-button
|
<save-dialog
|
||||||
link
|
v-if="dialog.save"
|
||||||
type="primary"
|
ref="saveDialog"
|
||||||
size="small"
|
@success="handleSaveSuccess"
|
||||||
@click="table_del(scope.row)"
|
@closed="dialog.save = false"
|
||||||
v-auth="'visit.delete'"
|
></save-dialog>
|
||||||
>删除
|
<detial-dialog v-if="dialog.save" ref="detialDialog"></detial-dialog>
|
||||||
</el-button>
|
</el-container>
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</el-main>
|
|
||||||
<save-dialog
|
|
||||||
v-if="dialog.save"
|
|
||||||
ref="saveDialog"
|
|
||||||
@success="handleSaveSuccess"
|
|
||||||
@closed="dialog.save = false"
|
|
||||||
></save-dialog>
|
|
||||||
<detial-dialog
|
|
||||||
v-if="dialog.save"
|
|
||||||
ref="detialDialog"
|
|
||||||
></detial-dialog>
|
|
||||||
</el-container>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./visit_form.vue";
|
import saveDialog from "./visit_form.vue";
|
||||||
import detialDialog from "./visit_detial.vue";
|
import detialDialog from "./visit_detial.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "visit",
|
name: "visit",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
detialDialog
|
detialDialog,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialog: {
|
timeRange: [],
|
||||||
save: false,
|
dialog: {
|
||||||
permission: false,
|
save: false,
|
||||||
},
|
permission: false,
|
||||||
apiObj: this.$API.vm.visit.list,
|
},
|
||||||
query: {},
|
apiObj: this.$API.vm.visit.list,
|
||||||
selection: [],
|
query: {},
|
||||||
search: {
|
selection: [],
|
||||||
keyword: null,
|
search: {
|
||||||
},
|
keyword: null,
|
||||||
|
},
|
||||||
|
purposeOptions: [
|
||||||
|
{ label: "参观", value: 10 },
|
||||||
|
{ label: "拜访", value: 20 },
|
||||||
|
{ label: "面试", value: 30 },
|
||||||
|
{ label: "开会", value: 40 },
|
||||||
|
{ label: "拉送货", value: 50 },
|
||||||
|
],
|
||||||
|
purpose_: {
|
||||||
|
10: "参观",
|
||||||
|
20: "拜访",
|
||||||
|
30: "面试",
|
||||||
|
40: "开会",
|
||||||
|
50: "拉送货",
|
||||||
|
},
|
||||||
|
state_: {
|
||||||
|
10: "创建中",
|
||||||
|
20: "审批中",
|
||||||
|
30: "待入厂",
|
||||||
|
40: "进行中",
|
||||||
|
50: "已完成",
|
||||||
|
60: "已关闭",
|
||||||
|
},
|
||||||
|
act_states: {
|
||||||
|
0: "草稿中", //p
|
||||||
|
1: "进行中", //p
|
||||||
|
|
||||||
purpose_: {
|
2: "被退回", //d
|
||||||
10: "参观",
|
3: "被撤回", //d
|
||||||
20: "拜访",
|
|
||||||
30: "面试",
|
|
||||||
40: "开会"
|
|
||||||
},
|
|
||||||
state_: {
|
|
||||||
10: "创建中",
|
|
||||||
20: "审批中",
|
|
||||||
30: "待入厂",
|
|
||||||
40: "进行中",
|
|
||||||
50: "已完成",
|
|
||||||
60: "已关闭"
|
|
||||||
},
|
|
||||||
act_states: {
|
|
||||||
0: "草稿中",//p
|
|
||||||
1: "进行中",//p
|
|
||||||
|
|
||||||
2: "被退回",//d
|
4: "已完成", //s
|
||||||
3: "被撤回",//d
|
5: "已关闭", //d
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//添加
|
||||||
|
add() {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("add");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
addpepple(row) {
|
||||||
|
this.$router.push({
|
||||||
|
name: "vistoradd",
|
||||||
|
query: {
|
||||||
|
visitid: row.id, //访问项目id
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
4: "已完成",//s
|
//查看
|
||||||
5: "已关闭",//d
|
table_show(row) {
|
||||||
},
|
this.dialog.save = true;
|
||||||
};
|
this.$nextTick(() => {
|
||||||
},
|
this.$refs.detialDialog.open("show").setData(row);
|
||||||
methods: {
|
});
|
||||||
//添加
|
},
|
||||||
add() {
|
|
||||||
this.dialog.save = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.saveDialog.open("add");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
addpepple(row) {
|
|
||||||
this.$router.push({
|
|
||||||
name: "vistoradd",
|
|
||||||
query: {
|
|
||||||
visitid: row.id, //访问项目id
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
//权限设置
|
||||||
|
permission() {
|
||||||
|
this.dialog.permission = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.permissionDialog.open();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
table_del(row) {
|
||||||
|
this.$API.vm.visit.delete
|
||||||
|
.req(row.id)
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
|
||||||
//查看
|
return res;
|
||||||
table_show(row) {
|
})
|
||||||
this.dialog.save = true;
|
.catch((err) => {
|
||||||
this.$nextTick(() => {
|
return err;
|
||||||
this.$refs.detialDialog.open("show").setData(row);
|
});
|
||||||
});
|
},
|
||||||
},
|
|
||||||
|
|
||||||
//权限设置
|
//表格选择后回调事件
|
||||||
permission() {
|
selectionChange(selection) {
|
||||||
this.dialog.permission = true;
|
this.selection = selection;
|
||||||
this.$nextTick(() => {
|
},
|
||||||
this.$refs.permissionDialog.open();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//删除
|
|
||||||
table_del(row) {
|
|
||||||
this.$API.vm.visit.delete
|
|
||||||
.req(row.id)
|
|
||||||
.then((res) => {
|
|
||||||
this.$message.success("删除成功");
|
|
||||||
|
|
||||||
return res;
|
//本地更新数据
|
||||||
})
|
handleSaveSuccess(data, mode) {
|
||||||
.catch((err) => {
|
if (mode == "add") {
|
||||||
return err;
|
this.$refs.table.refresh();
|
||||||
});
|
} else if (mode == "edit") {
|
||||||
|
this.$refs.table.refresh();
|
||||||
},
|
}
|
||||||
|
},
|
||||||
//表格选择后回调事件
|
resetQuery() {
|
||||||
selectionChange(selection) {
|
this.query = {};
|
||||||
this.selection = selection;
|
},
|
||||||
},
|
handleQuery() {
|
||||||
|
if (this.timeRange) {
|
||||||
|
this.query.start_come = this.timeRange[0];
|
||||||
//本地更新数据
|
this.query.end_come = this.timeRange[1];
|
||||||
handleSaveSuccess(data, mode) {
|
} else {
|
||||||
if (mode == "add") {
|
this.query.end_come = null;
|
||||||
this.$refs.table.refresh();
|
this.query.start_come = null;
|
||||||
} else if (mode == "edit") {
|
}
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.queryData(this.query);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
resetQuery() {
|
};
|
||||||
this.query = {};
|
|
||||||
},
|
|
||||||
handleQuery() {
|
|
||||||
this.$refs.table.queryData(this.query)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -18,8 +18,9 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="姓名/手机号"
|
placeholder="姓名/手机号"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
|
|
|
@ -1,104 +1,176 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-header>
|
||||||
<el-main class="nopadding">
|
<div class="left-panel">
|
||||||
<scTable
|
<el-select
|
||||||
ref="table"
|
v-model="query.workflow"
|
||||||
:apiObj = "apiObj"
|
placeholder="审批流"
|
||||||
:params = "params"
|
@change="handleQuery"
|
||||||
row-key="id"
|
clearable
|
||||||
stripe
|
style="margin-left: 2px"
|
||||||
highlightCurrentRow
|
>
|
||||||
>
|
<el-option
|
||||||
<el-table-column label="ID" prop="id" width="180"></el-table-column>
|
v-for="item in wfOptions"
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
:key="item.id"
|
||||||
<el-table-column label="工单标题" prop="title" width="180"></el-table-column>
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
<el-table-column label="工作流" prop="title">
|
></el-option>
|
||||||
<template #default="scope">
|
</el-select>
|
||||||
{{ scope.row.workflow_.name }}
|
<el-date-picker
|
||||||
</template>
|
v-model="timeRange"
|
||||||
</el-table-column>
|
type="datetimerange"
|
||||||
<el-table-column label="所在节点">
|
range-separator="至"
|
||||||
<template #default="scope">
|
start-placeholder="创建时间始"
|
||||||
{{ scope.row.state_.name }}
|
end-placeholder="创建时间止"
|
||||||
</template>
|
style="margin-left: 2px"
|
||||||
</el-table-column>
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
<el-table-column label="进行状态" prop="sort">
|
@change="handleQuery"
|
||||||
<template #default="scope">
|
clearable
|
||||||
<el-tag
|
/>
|
||||||
:type="scope.row.act_state===0?'':scope.row.act_state===1?'':scope.row.act_state===2?'danger':scope.row.act_state===3?'danger':scope.row.act_state===5?'danger':scope.row.act_state===4?'success':''"
|
</div>
|
||||||
>{{act_states[scope.row.act_state]}}</el-tag>
|
</el-header>
|
||||||
</template>
|
<el-container>
|
||||||
</el-table-column>
|
<el-main class="nopadding">
|
||||||
<el-table-column label="处理人类型">
|
<scTable
|
||||||
<template #default="scope">
|
ref="table"
|
||||||
{{ participant_[scope.row.participant_type] }}
|
:apiObj="apiObj"
|
||||||
</template>
|
:params="params"
|
||||||
</el-table-column>
|
row-key="id"
|
||||||
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
|
stripe
|
||||||
<el-table-column label="操作" fixed="right" align="center">
|
highlightCurrentRow
|
||||||
<template #default="scope">
|
>
|
||||||
<el-button type="text" size="small" @click="handleShow(scope.row)">查看</el-button>
|
<el-table-column label="ID" prop="id" width="180"></el-table-column>
|
||||||
<!--多人且主动接单-->
|
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="工单标题"
|
||||||
|
prop="title"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
</template>
|
<el-table-column label="工作流" prop="title">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
</scTable>
|
{{ scope.row.workflow_.name }}
|
||||||
</el-main>
|
</template>
|
||||||
</el-container>
|
</el-table-column>
|
||||||
|
<el-table-column label="所在节点">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.state_.name }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="进行状态" prop="sort">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag
|
||||||
|
:type="
|
||||||
|
scope.row.act_state === 0
|
||||||
|
? ''
|
||||||
|
: scope.row.act_state === 1
|
||||||
|
? ''
|
||||||
|
: scope.row.act_state === 2
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 3
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 5
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 4
|
||||||
|
? 'success'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="处理人类型">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ participant_[scope.row.participant_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
width="150"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="text" size="small" @click="handleShow(scope.row)"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
|
<!--多人且主动接单-->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "state",
|
name: "state",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
query: {},
|
||||||
apiObj: this.$API.wf.ticket.list,
|
timeRange: [],
|
||||||
params: {"category": "all"},
|
list: [],
|
||||||
act_states: {
|
apiObj: this.$API.wf.ticket.list,
|
||||||
0: "草稿中",
|
params: { category: "all" },
|
||||||
1: "进行中",
|
act_states: {
|
||||||
2: "被退回",
|
0: "草稿中",
|
||||||
3: "被撤回",
|
1: "进行中",
|
||||||
4: "已完成",
|
2: "被退回",
|
||||||
5: "已关闭",
|
3: "被撤回",
|
||||||
},
|
4: "已完成",
|
||||||
participant_: {
|
5: "已关闭",
|
||||||
0: "无处理人",
|
},
|
||||||
1: "单人",
|
participant_: {
|
||||||
2: "多人",
|
0: "无处理人",
|
||||||
},
|
1: "单人",
|
||||||
};
|
2: "多人",
|
||||||
},
|
},
|
||||||
mounted() {
|
wfOptions: [],
|
||||||
},
|
};
|
||||||
methods: {
|
},
|
||||||
handleShow(row) {
|
mounted() {
|
||||||
let cateType = row.workflow_.key;
|
this.getWfOptions();
|
||||||
let projectId = null;
|
},
|
||||||
if (cateType === 'visit') {
|
methods: {
|
||||||
projectId = row.ticket_data.visit;
|
getWfOptions() {
|
||||||
} else if (cateType === 'rpj') {
|
this.$API.wf.workflow.list.req({ page: 0 }).then((res) => {
|
||||||
projectId = row.ticket_data.rpj;
|
this.wfOptions = res;
|
||||||
} else if(cateType.indexOf('opl_')!=-1){
|
});
|
||||||
// operation = row.ticket_data.operation ? row.ticket_data.operation : null;
|
},
|
||||||
projectId = row.ticket_data.opl;
|
handleQuery() {
|
||||||
cateType = 'opl'
|
if (this.timeRange) {
|
||||||
}
|
this.query.start_create = this.timeRange[0];
|
||||||
this.$router.push({
|
this.query.end_create = this.timeRange[1];
|
||||||
path: "ticketdetail",
|
} else {
|
||||||
query: {
|
this.query.end_create = null;
|
||||||
id: row.id,
|
this.query.start_create = null;
|
||||||
type: 'show',
|
}
|
||||||
projectId: projectId,
|
this.$refs.table.queryData(this.query);
|
||||||
catetype: cateType,
|
},
|
||||||
// operation: operation
|
handleShow(row) {
|
||||||
},
|
let cateType = row.workflow_.key;
|
||||||
});
|
let projectId = null;
|
||||||
},
|
if (cateType === "visit") {
|
||||||
},
|
projectId = row.ticket_data.visit;
|
||||||
};
|
} else if (cateType === "rpj") {
|
||||||
|
projectId = row.ticket_data.rpj;
|
||||||
|
} else if (cateType.indexOf("opl_") != -1) {
|
||||||
|
// operation = row.ticket_data.operation ? row.ticket_data.operation : null;
|
||||||
|
projectId = row.ticket_data.opl;
|
||||||
|
cateType = "opl";
|
||||||
|
}
|
||||||
|
this.$router.push({
|
||||||
|
path: "ticketdetail",
|
||||||
|
query: {
|
||||||
|
id: row.id,
|
||||||
|
type: "show",
|
||||||
|
projectId: projectId,
|
||||||
|
catetype: cateType,
|
||||||
|
// operation: operation
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="工作流名称"
|
placeholder="工作流名称"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
Loading…
Reference in New Issue