user 界面显示岗位

This commit is contained in:
曹前明 2022-09-07 14:48:12 +08:00
parent 986c09bc22
commit d81a6c77c8
2 changed files with 321 additions and 277 deletions

View File

@ -73,32 +73,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"

View File

@ -2,7 +2,37 @@
<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-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">
@ -37,7 +67,9 @@
></el-table-column>
<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
label="访问级别"
@ -46,7 +78,7 @@
fixed="left"
>
<template #default="scope">
<el-space v-if="scope.row.level==10">一般</el-space>
<el-space v-if="scope.row.level == 10">一般</el-space>
<el-space v-else>重要</el-space>
</template>
</el-table-column>
@ -56,38 +88,44 @@
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 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"
>
<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>
<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"
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>
: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="name"
min-width="180"
></el-table-column>
<el-table-column
label="来访详述"
prop="description"
min-width="180"
></el-table-column>
></el-table-column> -->
<el-table-column
label="来访时间"
prop="visit_time"
@ -103,18 +141,11 @@
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"
>
<el-table-column label="接待人" prop="receptionist_name" min-width="80">
<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>
</el-table-column>
<el-table-column
@ -126,7 +157,7 @@
<template #default="scope">
<el-button
link
v-if="scope.row.state==10"
v-if="scope.row.state == 10"
type="primary"
size="small"
@click="addpepple(scope.row, scope.$index)"
@ -158,24 +189,22 @@
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
<detial-dialog
v-if="dialog.save"
ref="detialDialog"
></detial-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 {
export default {
name: "visit",
components: {
saveDialog,
detialDialog
detialDialog,
},
data() {
return {
timeRange: [],
dialog: {
save: false,
permission: false,
@ -186,12 +215,19 @@
search: {
keyword: null,
},
purposeOptions: [
{ label: "参观", value: 10 },
{ label: "拜访", value: 20 },
{ label: "面试", value: 30 },
{ label: "开会", value: 40 },
{ label: "拉送货", value: 50 },
],
purpose_: {
10: "参观",
20: "拜访",
30: "面试",
40: "开会"
40: "开会",
50: "拉送货",
},
state_: {
10: "创建中",
@ -199,17 +235,17 @@
30: "待入厂",
40: "进行中",
50: "已完成",
60: "已关闭"
60: "已关闭",
},
act_states: {
0: "草稿中",//p
1: "进行中",//p
0: "草稿中", //p
1: "进行中", //p
2: "被退回",//d
3: "被撤回",//d
2: "被退回", //d
3: "被撤回", //d
4: "已完成",//s
5: "已关闭",//d
4: "已完成", //s
5: "已关闭", //d
},
};
},
@ -230,7 +266,6 @@
});
},
//
table_show(row) {
this.dialog.save = true;
@ -258,7 +293,6 @@
.catch((err) => {
return err;
});
},
//
@ -266,7 +300,6 @@
this.selection = selection;
},
//
handleSaveSuccess(data, mode) {
if (mode == "add") {
@ -279,8 +312,15 @@
this.query = {};
},
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);
},
},
};
};
</script>