gongdan
This commit is contained in:
parent
e54616b53a
commit
8ebf1d4e31
|
@ -44,6 +44,12 @@ export default {
|
||||||
return await http.get( `${config.API_URL}/wf/workflow/${id}/init/`);
|
return await http.get( `${config.API_URL}/wf/workflow/${id}/init/`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
initkey: {
|
||||||
|
name: "新建工单初始化",
|
||||||
|
req: async function(key){
|
||||||
|
return await http.get( `${config.API_URL}/wf/workflow/${key}/init_key/`);
|
||||||
|
}
|
||||||
|
},
|
||||||
customfields: {
|
customfields: {
|
||||||
name: "工作流下的自定义字段",
|
name: "工作流下的自定义字段",
|
||||||
req: async function(id){
|
req: async function(id){
|
||||||
|
|
|
@ -155,15 +155,6 @@ const routes = [
|
||||||
},
|
},
|
||||||
"component": "wf/workflow"
|
"component": "wf/workflow"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "ticket",
|
|
||||||
"path": "/wf/ticket",
|
|
||||||
"meta": {
|
|
||||||
"title": "工单",
|
|
||||||
"icon": "el-icon-menu",
|
|
||||||
},
|
|
||||||
"component": "wf/ticket"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "configuration",
|
"name": "configuration",
|
||||||
"path": "/wf/configuration",
|
"path": "/wf/configuration",
|
||||||
|
@ -228,14 +219,14 @@ const routes = [
|
||||||
"component": "wf/ccwork"
|
"component": "wf/ccwork"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "workdetail",
|
"name": "visitdetail",
|
||||||
"path": "/wf/workdetail",
|
"path": "/wf/visitdetail",
|
||||||
"meta": {
|
"meta": {
|
||||||
"title": "工单详情",
|
"title": "访客工单详情",
|
||||||
"icon": "el-icon-menu",
|
"icon": "el-icon-menu",
|
||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"component": "wf/workdetail"
|
"component": "wf/visitdetail"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -478,7 +469,19 @@ const routes = [
|
||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"component": "vm/people"
|
"component": "vm/people"
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"name": "vistoradd",
|
||||||
|
"path": "/vm/vistoradd",
|
||||||
|
"meta": {
|
||||||
|
"title": "来访项目相关信息",
|
||||||
|
"icon": "el-icon-menu",
|
||||||
|
"hidden": true
|
||||||
|
},
|
||||||
|
"component": "vm/vistoradd"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,6 +43,14 @@
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<sc-title title="音响配置"></sc-title>
|
<sc-title title="音响配置"></sc-title>
|
||||||
|
<el-form-item label="事件优先级" prop="priority">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.priority"
|
||||||
|
:min="1"
|
||||||
|
:max="99"
|
||||||
|
controls-position="right"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="喇叭" prop="speakers">
|
<el-form-item label="喇叭" prop="speakers">
|
||||||
<el-select v-model="form.speakers" multiple="true">
|
<el-select v-model="form.speakers" multiple="true">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -53,7 +61,14 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="播放次数" prop="voice_num">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.voice_num"
|
||||||
|
:min="2"
|
||||||
|
:max="10"
|
||||||
|
controls-position="right"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="喇叭声音" prop="voice_person">
|
<el-form-item label="喇叭声音" prop="voice_person">
|
||||||
<el-select v-model="form.voice_person">
|
<el-select v-model="form.voice_person">
|
||||||
<el-option
|
<el-option
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
<el-icon v-if="item.icon"><component :is="item.icon"/></el-icon>
|
<el-icon v-if="item.icon"><component :is="item.icon"/></el-icon>
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>{{item.title}}</span>
|
<span>{{item.title}}</span>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-menu-item-group>
|
</el-menu-item-group>
|
||||||
|
@ -61,7 +62,8 @@
|
||||||
{
|
{
|
||||||
icon: "el-icon-operation",
|
icon: "el-icon-operation",
|
||||||
title: "个人设置",
|
title: "个人设置",
|
||||||
component: "seting"
|
component: "seting",
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "el-icon-bell",
|
icon: "el-icon-bell",
|
||||||
|
|
|
@ -1,189 +0,0 @@
|
||||||
<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
|
|
||||||
></el-input>
|
|
||||||
<el-button type="primary" icon="el-icon-search"></el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-header>
|
|
||||||
<el-main class="nopadding">
|
|
||||||
<scTable
|
|
||||||
ref="table"
|
|
||||||
:data="peoplelist"
|
|
||||||
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="visitor_.name"></el-table-column>
|
|
||||||
<el-table-column label="访客手机号" prop="visitor_.phone"></el-table-column>
|
|
||||||
<el-table-column label="访客身份证号" prop="visitor_.id_number"></el-table-column>
|
|
||||||
<el-table-column label="是否重要访客" prop="is_main">
|
|
||||||
<template #default="scope"
|
|
||||||
><el-space v-if="scope.row.is_main == true">是</el-space>
|
|
||||||
<el-space v-else>否</el-space>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button-group>
|
|
||||||
|
|
||||||
<el-button
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="table_del(scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-button-group>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
<sc-dialog v-model="dialogpeople" draggable title="创建来访人员">
|
|
||||||
<el-form
|
|
||||||
ref="dialofrom"
|
|
||||||
:model="formpeople"
|
|
||||||
:rules="rules"
|
|
||||||
:disabled="mode === 'show'"
|
|
||||||
label-width="120px"
|
|
||||||
>
|
|
||||||
<el-row>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="访客姓名" prop="visitor">
|
|
||||||
<el-select
|
|
||||||
v-model="formpeople.visitor"
|
|
||||||
placeholder="选择接待人"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in visitoroptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="是否主访客" prop="is_main">
|
|
||||||
<el-radio-group v-model="formpeople.is_main">
|
|
||||||
<el-radio-button label="true">是</el-radio-button>
|
|
||||||
<el-radio-button label="false">否</el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button @click="dialogpeople = false">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="submitpeople">确 定</el-button>
|
|
||||||
</template>
|
|
||||||
</sc-dialog>
|
|
||||||
</el-main>
|
|
||||||
</el-container>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "people",
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialog: {
|
|
||||||
save: false,
|
|
||||||
permission: false,
|
|
||||||
},
|
|
||||||
apiObj: this.$API.vm.visit.list,
|
|
||||||
query: {},
|
|
||||||
selection: [],
|
|
||||||
search: {
|
|
||||||
keyword: null,
|
|
||||||
},
|
|
||||||
dialogpeople: false,
|
|
||||||
formpeople: {
|
|
||||||
id: "",
|
|
||||||
visit: "",
|
|
||||||
},
|
|
||||||
visitoroptions: [],
|
|
||||||
visttID: "",
|
|
||||||
peoplelist: [],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getvisitorlist();
|
|
||||||
this.visttID = this.$route.query.id;
|
|
||||||
this.getpeoplelistlist();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//添加
|
|
||||||
add() {
|
|
||||||
this.dialogpeople = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
//项目访客人员
|
|
||||||
getpeoplelistlist() {
|
|
||||||
this.$API.vm.people.list
|
|
||||||
.req({ visit: this.visttID, page: 0 })
|
|
||||||
.then((res) => {
|
|
||||||
this.peoplelist = res;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
//访客接待人
|
|
||||||
getvisitorlist() {
|
|
||||||
this.$API.vm.visitor.list.req({ page: 0 }).then((res) => {
|
|
||||||
this.visitoroptions = res;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//表单提交方法
|
|
||||||
submitpeople() {
|
|
||||||
this.formpeople.visit = this.visttID;
|
|
||||||
this.$refs.dialofrom.validate((valid) => {
|
|
||||||
|
|
||||||
this.$API.vm.people.create
|
|
||||||
.req(this.formpeople)
|
|
||||||
.then((res) => {
|
|
||||||
this.$message.success("创建成功");
|
|
||||||
this.dialogpeople = false;
|
|
||||||
return res;
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
return err;
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//删除访客信息
|
|
||||||
table_del(row) {
|
|
||||||
this.$API.vm.people.delete
|
|
||||||
.req(row.id)
|
|
||||||
.then((res) => {
|
|
||||||
this.$message.success("访客删除成功");
|
|
||||||
|
|
||||||
return res;
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
return err;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
|
@ -112,26 +112,21 @@
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
|
|
||||||
<el-button
|
|
||||||
|
<el-button
|
||||||
text
|
text
|
||||||
v-if="scope.row.level==10"
|
v-if="scope.row.state==10"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="bindpeople(scope.row, scope.$index)"
|
@click="addpepple(scope.row, scope.$index)"
|
||||||
>绑定人员</el-button>
|
>继续编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
text
|
text
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="table_show(scope.row, scope.$index)"
|
@click="table_show(scope.row, scope.$index)"
|
||||||
>查看</el-button>
|
>查看</el-button>
|
||||||
<el-button
|
|
||||||
text
|
|
||||||
type="warning"
|
|
||||||
size="small"
|
|
||||||
@click="table_edit(scope.row, scope.$index)"
|
|
||||||
>编辑</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
text
|
text
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -151,14 +146,20 @@
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
></save-dialog>
|
></save-dialog>
|
||||||
|
<detial-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="detialDialog"
|
||||||
|
></detial-dialog>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./visit_form.vue";
|
import saveDialog from "./visit_form.vue";
|
||||||
|
import detialDialog from "./visit_detial.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "visit",
|
name: "visit",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
|
detialDialog
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -197,19 +198,21 @@ export default {
|
||||||
this.$refs.saveDialog.open("add");
|
this.$refs.saveDialog.open("add");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
addpepple(row){
|
||||||
//编辑
|
this.$router.push({
|
||||||
table_edit(row) {
|
name: "vistoradd",
|
||||||
this.dialog.save = true;
|
query: {
|
||||||
this.$nextTick(() => {
|
visitid: row.id, //访问项目id
|
||||||
this.$refs.saveDialog.open("edit").setData(row);
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//查看
|
//查看
|
||||||
table_show(row) {
|
table_show(row) {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open("show").setData(row);
|
this.$refs.detialDialog.open("show").setData(row);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -234,13 +237,7 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
//绑定项目的访问人员
|
|
||||||
bindpeople(row){
|
|
||||||
this.$router.push({name: "people",
|
|
||||||
query:{
|
|
||||||
id: row.id
|
|
||||||
} })
|
|
||||||
},
|
|
||||||
//表格选择后回调事件
|
//表格选择后回调事件
|
||||||
selectionChange(selection) {
|
selectionChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
|
|
|
@ -0,0 +1,194 @@
|
||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
:title="titleMap[mode]"
|
||||||
|
v-model="visible"
|
||||||
|
:size="1000"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
|
<el-container v-loading="loading">
|
||||||
|
<el-main style="padding: 0 20px 20px 20px">
|
||||||
|
<el-descriptions direction="vertical" :column="3" border>
|
||||||
|
|
||||||
|
|
||||||
|
<el-descriptions-item label="来访概述:">{{
|
||||||
|
form.name
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访单位:">{{
|
||||||
|
form.company
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访人数:">
|
||||||
|
<el-tag size="small">{{ form.count_people }}人</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访人员:" >
|
||||||
|
<el-tag size="small" v-for="item in form.visitors_" :key='item.id'>{{ item.visitor_.name }}</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="状态:">{{
|
||||||
|
state_[form.state]
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访时间:">{{
|
||||||
|
form.visit_time
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="离开时间:">{{
|
||||||
|
form.leave_time
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访事由:">{{
|
||||||
|
purpose_[form.purpose]
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访详述:">{{
|
||||||
|
form.description
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-descriptions-item label="接待人:" v-if="form.receptionist_">
|
||||||
|
{{ form.receptionist_.name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
</el-descriptions>
|
||||||
|
<el-card style="margin-top:20px">
|
||||||
|
<scTable
|
||||||
|
|
||||||
|
ref="table"
|
||||||
|
:data="peoplelist"
|
||||||
|
row-key="id"
|
||||||
|
height='auto'
|
||||||
|
stripe
|
||||||
|
hideDo
|
||||||
|
hidePagination
|
||||||
|
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="#"
|
||||||
|
fixed="left"
|
||||||
|
type="index"
|
||||||
|
width="50"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="访客姓名"
|
||||||
|
prop="visitor_.name"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="访客手机号"
|
||||||
|
prop="visitor_.phone"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="访客身份证号"
|
||||||
|
prop="visitor_.id_number"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="是否重要访客" prop="is_main">
|
||||||
|
<template #default="scope"
|
||||||
|
><el-space v-if="scope.row.is_main == true">是</el-space>
|
||||||
|
<el-space v-else>否</el-space>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||||
|
|
||||||
|
</scTable>
|
||||||
|
</el-card>
|
||||||
|
</el-main>
|
||||||
|
|
||||||
|
</el-container>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { genTree } from "@/utils/verificate";
|
||||||
|
import selectUser from "@/layout/components/userselect";
|
||||||
|
export default {
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
components: {
|
||||||
|
selectUser,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
mode: "add",
|
||||||
|
titleMap: {
|
||||||
|
add: "新增",
|
||||||
|
edit: "编辑",
|
||||||
|
show: "查看",
|
||||||
|
},
|
||||||
|
form: {},
|
||||||
|
rules: {
|
||||||
|
purpose: [{ required: true, message: "请输入" }],
|
||||||
|
name: [{ required: true, message: "来访概述" }],
|
||||||
|
visit_time: [{ required: true, message: "请输入" }],
|
||||||
|
leave_time: [{ required: true, message: "请输入" }],
|
||||||
|
receptionist: [{ required: true, message: "请输入" }],
|
||||||
|
level: [{ required: true, message: "请输入" }],
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
isSaveing: false,
|
||||||
|
selectionFilters: [],
|
||||||
|
setFiltersVisible: false,
|
||||||
|
purposeoptions: [
|
||||||
|
{ id: 10, name: "参观" },
|
||||||
|
{ id: 20, name: "拜访" },
|
||||||
|
{ id: 30, name: "面试" },
|
||||||
|
{ id: 40, name: "开会" },
|
||||||
|
],
|
||||||
|
purpose_: {
|
||||||
|
10: "参观",
|
||||||
|
20: "拜访",
|
||||||
|
30: "面试",
|
||||||
|
40: "开会",
|
||||||
|
},
|
||||||
|
state_: {
|
||||||
|
10: "创建中",
|
||||||
|
20: "审批中",
|
||||||
|
30: "待入厂",
|
||||||
|
40: "进行中",
|
||||||
|
50: "已完成",
|
||||||
|
},
|
||||||
|
receptionistoptions: [],
|
||||||
|
peoplelist: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getUser();
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//访客接待人
|
||||||
|
getUser() {
|
||||||
|
this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
||||||
|
this.receptionistoptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//显示
|
||||||
|
open(mode = "add") {
|
||||||
|
this.mode = mode;
|
||||||
|
this.visible = true;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//表单注入数据
|
||||||
|
setData(data) {
|
||||||
|
|
||||||
|
this.$API.vm.visit.read.req(data.id).then((res) => {
|
||||||
|
this.form = res;
|
||||||
|
});
|
||||||
|
|
||||||
|
this.$API.vm.people.list
|
||||||
|
.req({ visit:data.id, page: 0 })
|
||||||
|
.then((res) => {
|
||||||
|
this.peoplelist = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//设置过滤项
|
||||||
|
setFilters(filters) {
|
||||||
|
this.selectionFilters = filters;
|
||||||
|
this.setFiltersVisible = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-transfer {
|
||||||
|
--el-transfer-panel-width: 345px !important;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -122,30 +122,10 @@ export default {
|
||||||
form: defaultform,
|
form: defaultform,
|
||||||
//验证规则
|
//验证规则
|
||||||
rules: {
|
rules: {
|
||||||
phone: [
|
|
||||||
{ required: true, message: "请输入手机号" },
|
|
||||||
{
|
|
||||||
pattern: /^[1][3, 4, 5, 6, 7, 8, 9][0-9]{9}$/,
|
|
||||||
message: "请输入正确的手机号码",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
name: [{ required: true, message: "请输入姓名" }],
|
name: [{ required: true, message: "请输入姓名" }],
|
||||||
photo: [{ required: true, message: "请上传证件照" }],
|
|
||||||
id_number: [
|
|
||||||
{ required: true, message: "请输入身份证号", trigger: "blur" },
|
|
||||||
{
|
|
||||||
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
|
|
||||||
message: "你的身份证格式不正确",
|
|
||||||
},
|
|
||||||
/*{
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if (this.form.id_number.length !== 18) {
|
|
||||||
callback(new Error('请输入正确的身份证号!'));
|
|
||||||
}
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
dialogcart: false,
|
dialogcart: false,
|
||||||
apiObj: [],
|
apiObj: [],
|
||||||
|
|
|
@ -0,0 +1,449 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<el-steps
|
||||||
|
:active="active"
|
||||||
|
style="width: 100%"
|
||||||
|
:align-center="true"
|
||||||
|
finish-status="success"
|
||||||
|
>
|
||||||
|
<el-step
|
||||||
|
v-for="(item, index) of stepTitle"
|
||||||
|
:key="index"
|
||||||
|
:title="item"
|
||||||
|
style="50%"
|
||||||
|
@click="handleStep(index)"
|
||||||
|
>
|
||||||
|
</el-step>
|
||||||
|
</el-steps>
|
||||||
|
</el-header>
|
||||||
|
<!--基本信息!-->
|
||||||
|
<el-main class="nopadding" v-show="active === 0">
|
||||||
|
<el-form
|
||||||
|
ref="dialogForm"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
:disabled="mode == 'show'"
|
||||||
|
label-width="100px"
|
||||||
|
style="margin: 40px 40px 40px 40px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="来访概述">
|
||||||
|
<el-input v-model="form.name" type="text" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="来访时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.visit_time"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择来访时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="离开时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.leave_time"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择离开时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="来访单位">
|
||||||
|
<el-input v-model="form.company" type="text" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="来访级别">
|
||||||
|
<el-radio-group v-model="form.level">
|
||||||
|
<el-radio-button label="10">一般</el-radio-button>
|
||||||
|
<el-radio-button label="20">重要</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="来访人数">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_people"
|
||||||
|
:min="0"
|
||||||
|
:max="32767"
|
||||||
|
controls-position="right"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="来访事由">
|
||||||
|
<el-select v-model="form.purpose" placeholder="选择来访事由">
|
||||||
|
<el-option
|
||||||
|
v-for="item in purposeoptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="16" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="来访详述">
|
||||||
|
<el-input
|
||||||
|
v-model="form.description"
|
||||||
|
type="text"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="8" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="接待人">
|
||||||
|
<el-select
|
||||||
|
v-model="form.receptionist"
|
||||||
|
disabled
|
||||||
|
placeholder="选择接待人"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in receptionistoptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
<select-user
|
||||||
|
ref="form.receptionist"
|
||||||
|
:user="form.receptionist"
|
||||||
|
:closable="true"
|
||||||
|
:multiple="false"
|
||||||
|
@submit="refresh"
|
||||||
|
>
|
||||||
|
</select-user>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button style="margin-top: 12px" @click="handleNextStep"
|
||||||
|
>下一步</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-main>
|
||||||
|
|
||||||
|
<!--选择人员!-->
|
||||||
|
<el-main class="nopadding" v-show="active === 1">
|
||||||
|
<div class="left-panel">
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
||||||
|
</div>
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:data="peoplelist"
|
||||||
|
row-key="id"
|
||||||
|
height='auto'
|
||||||
|
stripe
|
||||||
|
hideDo
|
||||||
|
hidePagination
|
||||||
|
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="#"
|
||||||
|
fixed="left"
|
||||||
|
type="index"
|
||||||
|
width="50"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="访客姓名"
|
||||||
|
prop="visitor_.name"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="访客手机号"
|
||||||
|
prop="visitor_.phone"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="访客身份证号"
|
||||||
|
prop="visitor_.id_number"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="是否重要访客" prop="is_main">
|
||||||
|
<template #default="scope"
|
||||||
|
><el-space v-if="scope.row.is_main == true">是</el-space>
|
||||||
|
<el-space v-else>否</el-space>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button-group>
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="table_del(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-button-group>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
<sc-dialog v-model="dialogpeople" draggable title="创建来访人员">
|
||||||
|
<el-form
|
||||||
|
ref="dialofrom"
|
||||||
|
:model="formpeople"
|
||||||
|
:rules="rules"
|
||||||
|
:disabled="mode === 'show'"
|
||||||
|
label-width="120px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="访客姓名" prop="visitor">
|
||||||
|
<el-select
|
||||||
|
v-model="formpeople.visitor"
|
||||||
|
placeholder="选择接待人"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in visitoroptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="是否主访客" prop="is_main">
|
||||||
|
<el-radio-group v-model="formpeople.is_main">
|
||||||
|
<el-radio-button label="true">是</el-radio-button>
|
||||||
|
<el-radio-button label="false">否</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="dialogpeople = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitpeople">确 定</el-button>
|
||||||
|
</template>
|
||||||
|
</sc-dialog>
|
||||||
|
|
||||||
|
<span> <el-button style="margin-top: 20px" @click="handleLastStep"
|
||||||
|
>上一步</el-button
|
||||||
|
> </span>
|
||||||
|
<span v-for=" item in initform.transitions" :key="item.id">
|
||||||
|
<el-button style="margin-top: 20px" @click="submitticket(item.id)"
|
||||||
|
>{{item.name}}</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<el-button style="margin-top: 20px" @click="submitOut">退出</el-button> </span>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<style scoped>
|
||||||
|
.left-panel{
|
||||||
|
margin:10px
|
||||||
|
}
|
||||||
|
.clearfix {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-card p {
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.stepSuc:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.stepErr:hover {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
import { genTree } from "@/utils/verificate";
|
||||||
|
import selectUser from "@/layout/components/userselect";
|
||||||
|
|
||||||
|
const defaultformworker = {
|
||||||
|
duty: "",
|
||||||
|
rcertificates: [],
|
||||||
|
rpj: "",
|
||||||
|
};
|
||||||
|
export default {
|
||||||
|
name: "vistoradd",
|
||||||
|
components: { selectUser },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
active: 0,
|
||||||
|
stepSuc: [0],
|
||||||
|
form: [],
|
||||||
|
stepTitle: ["基本信息", "选择访客"],
|
||||||
|
receptionistoptions: [],
|
||||||
|
purposeoptions: [
|
||||||
|
{ id: 10, name: "参观" },
|
||||||
|
{ id: 20, name: "拜访" },
|
||||||
|
{ id: 30, name: "面试" },
|
||||||
|
{ id: 40, name: "开会" },
|
||||||
|
],
|
||||||
|
search: {
|
||||||
|
keyword: null,
|
||||||
|
},
|
||||||
|
dialog: {
|
||||||
|
save: false,
|
||||||
|
permission: false,
|
||||||
|
},
|
||||||
|
apiObj: this.$API.vm.visit.list,
|
||||||
|
query: {},
|
||||||
|
selection: [],
|
||||||
|
dialogpeople: false,
|
||||||
|
formpeople: {
|
||||||
|
id: "",
|
||||||
|
visit: "",
|
||||||
|
},
|
||||||
|
visitoroptions: [],
|
||||||
|
peoplelist: [],
|
||||||
|
initform:[],
|
||||||
|
ticket:{},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.visitid = this.$route.query.visitid; //作业ID
|
||||||
|
this.getRpj();
|
||||||
|
this.getUser();
|
||||||
|
this.getpeoplelistlist();
|
||||||
|
this.getvisitorlist();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//访问项目基本信息
|
||||||
|
getRpj() {
|
||||||
|
this.$API.vm.visit.read.req(this.visitid).then((res) => {
|
||||||
|
this.form = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//接待人
|
||||||
|
getUser() {
|
||||||
|
this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
||||||
|
this.receptionistoptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//渲染工单提交按钮
|
||||||
|
getInit(){
|
||||||
|
this.$API.wf.workflow.initkey.req('visit').then((res) => {
|
||||||
|
this.initform = res;
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleStep(val) {
|
||||||
|
//点击步骤条
|
||||||
|
if (this.stepSuc.includes(val) === true) {
|
||||||
|
this.active = val;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//组件点击上一步
|
||||||
|
handleLastStep() {
|
||||||
|
if (--this.active === 0) {
|
||||||
|
this.active = 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//组件点击下一步
|
||||||
|
handleNextStep() {
|
||||||
|
if (this.active == 0) {
|
||||||
|
this.$API.vm.visit.update
|
||||||
|
.req(this.form.id, this.form)
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success("基本信息更新成功!");
|
||||||
|
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
this.getInit();
|
||||||
|
this.active = 1;
|
||||||
|
} else {
|
||||||
|
this.active = 1;
|
||||||
|
}
|
||||||
|
// this.stepSuc.push(++this.active)
|
||||||
|
},
|
||||||
|
//退出界面
|
||||||
|
submitOut() {
|
||||||
|
this.$router.push({
|
||||||
|
name: "visit",
|
||||||
|
query: {},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//添加
|
||||||
|
add() {
|
||||||
|
this.dialogpeople = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
//项目访客人员
|
||||||
|
getpeoplelistlist() {
|
||||||
|
this.$API.vm.people.list
|
||||||
|
.req({ visit: this.visitid, page: 0 })
|
||||||
|
.then((res) => {
|
||||||
|
this.peoplelist = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//访客接待人
|
||||||
|
getvisitorlist() {
|
||||||
|
this.$API.vm.visitor.list.req({ page: 0 }).then((res) => {
|
||||||
|
this.visitoroptions = res;
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//表单提交方法
|
||||||
|
submitpeople() {
|
||||||
|
this.formpeople.visit = this.visitid;
|
||||||
|
this.$refs.dialofrom.validate((valid) => {
|
||||||
|
this.$API.vm.people.create
|
||||||
|
.req(this.formpeople)
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success("创建成功");
|
||||||
|
this.dialogpeople = false;
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//删除访客信息
|
||||||
|
table_del(row) {
|
||||||
|
this.$API.vm.people.delete
|
||||||
|
.req(row.id)
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success("访客删除成功");
|
||||||
|
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//提交工单
|
||||||
|
submitticket(id){
|
||||||
|
this.ticket={};
|
||||||
|
this.ticket.workflow=this.initform.workflow;
|
||||||
|
this.ticket.ticket_data={visit:this.visitid};
|
||||||
|
this.ticket.transition=id;
|
||||||
|
this.$API.wf.ticket.create.req(this.ticket).then((res) => {
|
||||||
|
this.$message.success("提交成功");
|
||||||
|
this.$router.push({
|
||||||
|
name: "visit",
|
||||||
|
query: {},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -80,12 +80,20 @@ export default {
|
||||||
this.list = res;
|
this.list = res;
|
||||||
},
|
},
|
||||||
handleShow(row) {
|
handleShow(row) {
|
||||||
this.$router.push({
|
|
||||||
name: "workdetail",
|
var catetype = row.workflow_.key;
|
||||||
query: {
|
|
||||||
id: row.id,
|
switch (catetype) {
|
||||||
},
|
case 'visit':
|
||||||
});
|
this.$router.push({
|
||||||
|
name: "visitdetail",
|
||||||
|
query: {
|
||||||
|
id: row.id,
|
||||||
|
visitID:row.ticket_data.visit
|
||||||
|
},
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
|
||||||
|
<el-card style="margin-left: 10px">
|
||||||
|
<el-table
|
||||||
|
:data="logs"
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
style="width: 100%; border-top: 1px solid #ebeef5"
|
||||||
|
height="500"
|
||||||
|
highlight-current-row
|
||||||
|
>
|
||||||
|
<el-table-column label="工单标题" min-width="100">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.ticket_data.title">{{ scope.row.ticket_data.title }}中</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="进行状态" min-width="100">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.state_.type == 0"
|
||||||
|
>{{ scope.row.state_.name }}中</span
|
||||||
|
>
|
||||||
|
<span v-else>已{{ scope.row.state_.name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作人" min-width="100">
|
||||||
|
<template #default="scope" ><el-span v-if="scope.row.participant_">{{
|
||||||
|
scope.row.participant_.name
|
||||||
|
}}</el-span></template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作意见"
|
||||||
|
min-width="100"
|
||||||
|
prop="suggestion"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="更新时间"
|
||||||
|
min-width="100"
|
||||||
|
prop="update_time"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<!--工单处理详情组件-->
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "detail",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
logs: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.workId = this.$route.query.id;
|
||||||
|
this.getFlowlogss();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getFlowlogss() {
|
||||||
|
|
||||||
|
this.$API.wf.ticket.ticketFlowlogs.req(this.workId).then(res => {
|
||||||
|
this.logs = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<el-card style="margin-bottom: 10px">
|
||||||
|
<el-steps
|
||||||
|
:active="actives"
|
||||||
|
spac="400px"
|
||||||
|
align-center=""
|
||||||
|
style="padding-top: 20px"
|
||||||
|
>
|
||||||
|
<el-step
|
||||||
|
:title="item.name"
|
||||||
|
v-for="item in flowSteps"
|
||||||
|
:key="item.id"
|
||||||
|
></el-step>
|
||||||
|
</el-steps>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<!--工单进度组件-->
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
|
||||||
|
name: "workstep",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
actives: 4,
|
||||||
|
flowSteps: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.workId = this.$route.query.id;
|
||||||
|
this.getFlowSteps();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getFlowSteps() {
|
||||||
|
let res = await this.$API.wf.ticket.ticketFlowSteps.req(this.workId);
|
||||||
|
|
||||||
|
this.flowSteps = res;
|
||||||
|
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
|
@ -0,0 +1,111 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<el-card style="margin-bottom: 10px">
|
||||||
|
<work-step ref="workStep"></work-step>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card style="margin-left: 10px; margin-bottom: 10px">
|
||||||
|
<el-descriptions title="来访信息" :column="3">
|
||||||
|
|
||||||
|
<el-descriptions-item label="工单流水号:">{{
|
||||||
|
ticketDetail.sn
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="来访概述:">{{
|
||||||
|
visitDetail.name
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访单位:">{{
|
||||||
|
visitDetail.company
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访人数:">
|
||||||
|
<el-tag size="small">{{ visitDetail.count_people }}人</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访人员:" >
|
||||||
|
<el-tag v-for="item in visitDetail.visitors_" :key='item.id' size="small">{{ item.visitor_.name }}</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="状态:">{{
|
||||||
|
state_[visitDetail.state]
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访时间:">{{
|
||||||
|
visitDetail.visit_time
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="离开时间:">{{
|
||||||
|
visitDetail.leave_time
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访事由:">{{
|
||||||
|
purpose_[visitDetail.purpose]
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="来访详述:">{{
|
||||||
|
visitDetail.description
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-descriptions-item label="接待人:" v-if="visitDetail.receptionist_">
|
||||||
|
{{ visitDetail.receptionist_.name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
</el-descriptions>
|
||||||
|
</el-card>
|
||||||
|
<el-card>
|
||||||
|
<work-details ref="workDetails"></work-details>
|
||||||
|
</el-card>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import workDetails from "./details.vue";
|
||||||
|
import workStep from "./steps.vue";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
workDetails,
|
||||||
|
workStep,
|
||||||
|
},
|
||||||
|
name: "visitdetail",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
workId: "",
|
||||||
|
visitId: "",
|
||||||
|
ticketDetail: [],
|
||||||
|
visitDetail: [],
|
||||||
|
purpose_: {
|
||||||
|
10: "参观",
|
||||||
|
20: "拜访",
|
||||||
|
30: "面试",
|
||||||
|
40: "开会"
|
||||||
|
},
|
||||||
|
state_: {
|
||||||
|
10: "创建中",
|
||||||
|
20: "审批中",
|
||||||
|
30: "待入厂",
|
||||||
|
40: "进行中",
|
||||||
|
50: "已完成",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.workId = this.$route.query.id;
|
||||||
|
this.visitId = this.$route.query.visitID;
|
||||||
|
this.getticketItem();
|
||||||
|
this.getVisit();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//工单详情
|
||||||
|
getticketItem() {
|
||||||
|
this.$API.wf.ticket.ticketItem.req(this.workId).then((res) => {
|
||||||
|
this.ticketDetail = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//访客详情
|
||||||
|
getVisit() {
|
||||||
|
this.$API.vm.visit.read.req(this.visitId).then((res) => {
|
||||||
|
this.visitDetail = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
|
@ -1,172 +0,0 @@
|
||||||
<template>
|
|
||||||
<el-container>
|
|
||||||
<el-main class="nopadding">
|
|
||||||
<el-card style="margin-bottom: 10px">
|
|
||||||
<el-steps
|
|
||||||
:active="actives"
|
|
||||||
spac="400px"
|
|
||||||
align-center=""
|
|
||||||
style="padding-top: 20px"
|
|
||||||
>
|
|
||||||
<el-step
|
|
||||||
:title="item.name"
|
|
||||||
v-for="item in flowSteps"
|
|
||||||
:key="item.id"
|
|
||||||
></el-step>
|
|
||||||
</el-steps>
|
|
||||||
</el-card>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-card style="margin-left: 10px">
|
|
||||||
<p style="text-align: center;font-size: 20px">{{ticketDetail.title}}</p>
|
|
||||||
<el-col :span="12">
|
|
||||||
<div class="items">
|
|
||||||
<span class="itemLabel">工作流:</span>
|
|
||||||
<span>{{ticketDetail.workflow_.name}}</span>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<div class="items">
|
|
||||||
<span class="itemLabel">流水号:</span>
|
|
||||||
<span>{{ticketDetail.sn}}</span>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<div class="items">
|
|
||||||
<span class="itemLabel">创建时间:</span>
|
|
||||||
<span>{{ticketDetail.create_time}}</span>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col v-for="item in ticketDetail.ticket_data_" :key="item.id" :span="12">
|
|
||||||
<div class="items">
|
|
||||||
<span class="itemLabel">{{item.field_name}}:</span>
|
|
||||||
<span>{{item.field_display}}</span>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-card>
|
|
||||||
<el-card style="margin-left: 10px">
|
|
||||||
<el-table
|
|
||||||
:data="logs"
|
|
||||||
fit
|
|
||||||
stripe
|
|
||||||
style="width: 100%; border-top: 1px solid #ebeef5"
|
|
||||||
height="500"
|
|
||||||
highlight-current-row
|
|
||||||
>
|
|
||||||
<el-table-column label="工单标题" min-width="100">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.ticket_data.title">{{ scope.row.ticket_data.title }}中</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="进行状态" min-width="100">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.state_.type == 0"
|
|
||||||
>{{ scope.row.state_.name }}中</span
|
|
||||||
>
|
|
||||||
<span v-else>已{{ scope.row.state_.name }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作人" min-width="100">
|
|
||||||
<template #default="scope" ><el-span v-if="scope.row.participant_">{{
|
|
||||||
scope.row.participant_.name
|
|
||||||
}}</el-span></template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="操作意见"
|
|
||||||
min-width="100"
|
|
||||||
prop="suggestion"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="更新时间"
|
|
||||||
min-width="100"
|
|
||||||
prop="update_time"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-main>
|
|
||||||
</el-container>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "workdetail",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
actives: 4,
|
|
||||||
flowSteps: [],
|
|
||||||
workId: "",
|
|
||||||
ticketDetail: [],
|
|
||||||
logs: [],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.workId = this.$route.query.id;
|
|
||||||
this.getFlowSteps();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async getFlowSteps() {
|
|
||||||
let res = await this.$API.wf.ticket.ticketFlowSteps.req(this.workId);
|
|
||||||
console.log(res);
|
|
||||||
this.flowSteps = res;
|
|
||||||
this.$API.wf.ticket.ticketItem.req(this.workId).then((res) => {
|
|
||||||
|
|
||||||
|
|
||||||
this.ticketDetail = res
|
|
||||||
for (let i = 0; i < this.ticketDetail.ticket_data_.length; i++) {
|
|
||||||
if (this.ticketDetail.ticket_data_[i].label === "sys_user") {
|
|
||||||
this.ticketDetail.ticket_data_[i].field_choice = that.staffs;
|
|
||||||
}
|
|
||||||
if (this.ticketDetail.ticket_data_[i].label === "deptSelect") {
|
|
||||||
this.ticketDetail.ticket_data_[i].field_choice = that.orgList;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// console.log(that.ticketDetail.state_.enable_retreat);
|
|
||||||
let state = res.state;
|
|
||||||
let dat = this.flowSteps.filter((item) => {
|
|
||||||
return item.id == state;
|
|
||||||
})
|
|
||||||
// debugger;
|
|
||||||
let state_fields = dat[0].state_fields;
|
|
||||||
if (state_fields !== {}) {
|
|
||||||
for (let labe in state_fields) {
|
|
||||||
for (let j = 0; j < this.ticketDetail.ticket_data_.length; j++) {
|
|
||||||
if (this.ticketDetail.ticket_data_[j].field_key === labe) {
|
|
||||||
// debugger;
|
|
||||||
// console.log(labe)
|
|
||||||
// console.log(state_fields[labe])
|
|
||||||
if (state_fields[labe] !== 4) {
|
|
||||||
this.ticketDetail.ticket_data_[j].is_hidden = false
|
|
||||||
} else {
|
|
||||||
this.ticketDetail.ticket_data_[j].is_hidden = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
that.sort = dat[0].sort;
|
|
||||||
that.actives = that.flowSteps.indexOf(dat[0]);
|
|
||||||
if (that.flowSteps.length - that.actives > 1) {
|
|
||||||
} else {
|
|
||||||
that.actives = that.flowSteps.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
this.$API.wf.ticket.ticketFlowlogs.req(this.workId).then(res => {
|
|
||||||
|
|
||||||
this.logs = res
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
</style>
|
|
Loading…
Reference in New Issue