user 界面显示岗位
This commit is contained in:
parent
986c09bc22
commit
d81a6c77c8
|
|
@ -73,32 +73,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"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,37 @@
|
||||||
<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
|
||||||
|
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>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
|
|
@ -37,7 +67,9 @@
|
||||||
></el-table-column>
|
></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">{{
|
||||||
|
purpose_[scope.row.purpose]
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="访问级别"
|
label="访问级别"
|
||||||
|
|
@ -56,38 +88,44 @@
|
||||||
min-width="180"
|
min-width="180"
|
||||||
fixed="left"
|
fixed="left"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="项目状态" prop="state" min-width="180">
|
||||||
label="项目状态"
|
|
||||||
prop="state"
|
|
||||||
min-width="180"
|
|
||||||
>
|
|
||||||
<template #default="scope">{{ state_[scope.row.state] }}</template>
|
<template #default="scope">{{ state_[scope.row.state] }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="审批状态" prop="state" min-width="150">
|
||||||
label="审批状态"
|
|
||||||
prop="state"
|
|
||||||
min-width="150"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.ticket_&&scope.row.ticket_.state_" style="margin-right: 5px;">{{scope.row.ticket_.state_.name }}</span>
|
<span
|
||||||
|
v-if="scope.row.ticket_ && scope.row.ticket_.state_"
|
||||||
|
style="margin-right: 5px"
|
||||||
|
>{{ scope.row.ticket_.state_.name }}</span
|
||||||
|
>
|
||||||
<el-tag
|
<el-tag
|
||||||
v-if="scope.row.ticket_ && scope.row.ticket_.act_state"
|
v-if="scope.row.ticket_ && scope.row.ticket_.act_state"
|
||||||
class="mx-1"
|
class="mx-1"
|
||||||
size="small"
|
size="small"
|
||||||
:type="scope.row.ticket_.act_state===0?'':scope.row.ticket_.act_state===1?'':scope.row.ticket_.act_state===2?'danger':scope.row.ticket_.act_state===3?'danger':scope.row.ticket_.act_state===5?'danger':scope.row.ticket_.act_state===4?'success':''"
|
:type="
|
||||||
>{{act_states[scope.row.ticket_.act_state]}}</el-tag>
|
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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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
|
|
||||||
label="来访详述"
|
|
||||||
prop="description"
|
|
||||||
min-width="180"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="来访时间"
|
label="来访时间"
|
||||||
prop="visit_time"
|
prop="visit_time"
|
||||||
|
|
@ -103,18 +141,11 @@
|
||||||
prop="count_people"
|
prop="count_people"
|
||||||
min-width="80"
|
min-width="80"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="接待人" prop="receptionist_name" min-width="80">
|
||||||
label="属地部门"
|
|
||||||
prop="belong_dept"
|
|
||||||
min-width="150"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="接待人"
|
|
||||||
prop="receptionist_name"
|
|
||||||
min-width="80"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.receptionist_">{{scope.row.receptionist_.name}}</span>
|
<span v-if="scope.row.receptionist_">{{
|
||||||
|
scope.row.receptionist_.name
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -158,10 +189,7 @@
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
></save-dialog>
|
></save-dialog>
|
||||||
<detial-dialog
|
<detial-dialog v-if="dialog.save" ref="detialDialog"></detial-dialog>
|
||||||
v-if="dialog.save"
|
|
||||||
ref="detialDialog"
|
|
||||||
></detial-dialog>
|
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -172,10 +200,11 @@
|
||||||
name: "visit",
|
name: "visit",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
detialDialog
|
detialDialog,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
timeRange: [],
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
permission: false,
|
permission: false,
|
||||||
|
|
@ -186,12 +215,19 @@
|
||||||
search: {
|
search: {
|
||||||
keyword: null,
|
keyword: null,
|
||||||
},
|
},
|
||||||
|
purposeOptions: [
|
||||||
|
{ label: "参观", value: 10 },
|
||||||
|
{ label: "拜访", value: 20 },
|
||||||
|
{ label: "面试", value: 30 },
|
||||||
|
{ label: "开会", value: 40 },
|
||||||
|
{ label: "拉送货", value: 50 },
|
||||||
|
],
|
||||||
purpose_: {
|
purpose_: {
|
||||||
10: "参观",
|
10: "参观",
|
||||||
20: "拜访",
|
20: "拜访",
|
||||||
30: "面试",
|
30: "面试",
|
||||||
40: "开会"
|
40: "开会",
|
||||||
|
50: "拉送货",
|
||||||
},
|
},
|
||||||
state_: {
|
state_: {
|
||||||
10: "创建中",
|
10: "创建中",
|
||||||
|
|
@ -199,7 +235,7 @@
|
||||||
30: "待入厂",
|
30: "待入厂",
|
||||||
40: "进行中",
|
40: "进行中",
|
||||||
50: "已完成",
|
50: "已完成",
|
||||||
60: "已关闭"
|
60: "已关闭",
|
||||||
},
|
},
|
||||||
act_states: {
|
act_states: {
|
||||||
0: "草稿中", //p
|
0: "草稿中", //p
|
||||||
|
|
@ -230,7 +266,6 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//查看
|
//查看
|
||||||
table_show(row) {
|
table_show(row) {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
|
|
@ -258,7 +293,6 @@
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
return err;
|
return err;
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//表格选择后回调事件
|
//表格选择后回调事件
|
||||||
|
|
@ -266,7 +300,6 @@
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess(data, mode) {
|
||||||
if (mode == "add") {
|
if (mode == "add") {
|
||||||
|
|
@ -279,7 +312,14 @@
|
||||||
this.query = {};
|
this.query = {};
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query)
|
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);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue