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