Merge branch 'v2' of https://e.coding.net/ctcdevteam/ehs/ehs_web into v2
This commit is contained in:
commit
6bae3795da
|
@ -24,6 +24,7 @@
|
|||
"d3": "^7.6.1",
|
||||
"dagre": "^0.8.5",
|
||||
"dagre-d3": "^0.6.4",
|
||||
"dhtmlx-gantt": "^8.0.6",
|
||||
"echarts": "5.4.1",
|
||||
"element-plus": "2.2.32",
|
||||
"file-saver": "^2.0.5",
|
||||
|
|
|
@ -57,6 +57,15 @@ export default {
|
|||
);
|
||||
}
|
||||
},
|
||||
dchannelAuth: {
|
||||
name: "门禁权限",
|
||||
req: async function(data){
|
||||
return await http.post(
|
||||
`${config.API_URL}/third/tdevice/dchannel_auth/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
blt:{
|
||||
list:{
|
||||
|
@ -114,6 +123,16 @@ export default {
|
|||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
dh:{
|
||||
dchannelAuthDelete: {
|
||||
name: "删除门禁权限",
|
||||
req: async function(data){
|
||||
return await http.post(
|
||||
`${config.API_URL}/third/dahua/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,9 +17,8 @@
|
|||
<slot></slot>
|
||||
<template v-for="(item, index) in userColumn" :key="index">
|
||||
<el-table-column v-if="!item.hide" :column-key="item.prop" :label="item.label" :prop="item.prop"
|
||||
:width="item.width" :sortable="item.sortable" :fixed="item.fixed" :filters="item.filters" :filter-method="
|
||||
remoteFilter || !item.filters ? null : filterHandler
|
||||
" :show-overflow-tooltip="item.showOverflowTooltip">
|
||||
:width="item.width" :sortable="item.sortable" :fixed="item.fixed" :filters="item.filters" :filter-method="remoteFilter || !item.filters ? null : filterHandler
|
||||
" :show-overflow-tooltip="item.showOverflowTooltip">
|
||||
<template #default="scope">
|
||||
<slot :name="item.prop" v-bind="scope">
|
||||
{{ scope.row[item.prop] }}
|
||||
|
@ -205,10 +204,10 @@ export default {
|
|||
// delete reqData[config.request.page]
|
||||
// delete reqData[config.request.pageSize]
|
||||
}
|
||||
Object.assign(reqData, this.tableParams);
|
||||
var c = Object.assign({}, this.tableParams, reqData)
|
||||
try {
|
||||
if (this.apiObj) {
|
||||
var res = await this.apiObj.req(reqData);
|
||||
var res = await this.apiObj.req(c);
|
||||
var response = this.parseData(res);
|
||||
if (response.total === 0) {
|
||||
this.emptyText = "暂无数据";
|
||||
|
|
|
@ -1507,7 +1507,16 @@ const routes = [
|
|||
},
|
||||
"component": "hrm/certificate"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "dchannelAuth",
|
||||
"path": "/hrm/dchannel_auth",
|
||||
"meta": {
|
||||
"title": "门禁权限",
|
||||
"icon": "el-icon-key",
|
||||
"perms": ["dchannel_auth"]
|
||||
},
|
||||
"component": "hrm/dchannel_auth"
|
||||
},
|
||||
]
|
||||
},
|
||||
//基础配置
|
||||
|
|
|
@ -6,24 +6,15 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<el-select v-model="areaId" placeholder="选择区域">
|
||||
<el-option
|
||||
v-for="item in areaoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
<el-option v-for="item in areaoptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" :params="apiParams" :pageStr="pageStr" :data="pageData"
|
||||
:pageSizeStr="pageSizeStr" :orderStr="orderStr" :parseData="parseData" @selection-change="selectionChange"
|
||||
stripe @resetQuery="resetQuery">
|
||||
:pageSizeStr="pageSizeStr" :orderStr="orderStr" :parseData="parseData" @selection-change="selectionChange" stripe
|
||||
@resetQuery="resetQuery">
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="设备编号" prop="deviceCode" min-width="100"></el-table-column>
|
||||
<el-table-column label="通道编号" prop="channelCode" min-width="150"></el-table-column>
|
||||
|
@ -37,7 +28,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="类型" min-width="50">
|
||||
<template #default="scope">{{
|
||||
deviceTypes[scope.row.cameraType]
|
||||
deviceTypes[scope.row.cameraType]
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否在线" prop="isOnline" min-width="180">
|
||||
|
@ -90,8 +81,9 @@
|
|||
<el-button @click="viewClose">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<channel-view v-if="dialogSave" ref="saveDialog" :channelId="channelId" :channelName="channelName" :channelArea="channelArea" :channelAreas="channelAreas"
|
||||
:channelLocation="channelLocation" @closed="dialogSave = false" @success="handleQuery"></channel-view>
|
||||
<channel-view v-if="dialogSave" ref="saveDialog" :channelId="channelId" :channelName="channelName"
|
||||
:channelArea="channelArea" :channelAreas="channelAreas" :channelLocation="channelLocation"
|
||||
@closed="dialogSave = false" @success="handleQuery"></channel-view>
|
||||
</template>
|
||||
<script>
|
||||
import channelView from "./vchannel_view";
|
||||
|
@ -134,11 +126,11 @@ export default {
|
|||
},
|
||||
code: "video_realtime",
|
||||
},
|
||||
areaId:'',
|
||||
areaId: '',
|
||||
channelCode: '',
|
||||
channelId: '',
|
||||
channelArea: '',
|
||||
pageData:[],
|
||||
pageData: [],
|
||||
areaoptions: [],
|
||||
channelAreas: [],
|
||||
channelLocation: {},
|
||||
|
@ -148,7 +140,7 @@ export default {
|
|||
2: "球机",
|
||||
3: "半球",
|
||||
},
|
||||
canUseMap:false,
|
||||
canUseMap: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
@ -158,47 +150,47 @@ export default {
|
|||
document.head.appendChild(scriptInfo);
|
||||
this.getAllVchannel();
|
||||
},
|
||||
mounted(){
|
||||
mounted() {
|
||||
this.getArea();
|
||||
let that = this;
|
||||
let host = window.location.host;
|
||||
let jsUrl = host.indexOf('localhost')>-1?'http://222.222.144.147:6013/jsmap/jsmap.js':host+'/jsmap/jsmap.js';
|
||||
that.loadScript('mapId',jsUrl, () => {
|
||||
let jsUrl = host.indexOf('localhost') > -1 ? 'http://222.222.144.147:6013/jsmap/jsmap.js' : host + '/jsmap/jsmap.js';
|
||||
that.loadScript('mapId', jsUrl, () => {
|
||||
that.canUseMap = true;
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
loadScript(id, url, callback) {
|
||||
debugger;
|
||||
//如果已经存在这个id,则证明已经加载过,已经有这个js文件了,可以直接执行回调里面的操作
|
||||
if (document.querySelector(`#${id}`)) {
|
||||
callback && callback()
|
||||
return;
|
||||
}
|
||||
//第一次加载,先创建 script 标签
|
||||
const script = document.createElement('script');
|
||||
script.src = url;
|
||||
//创建id属性
|
||||
script.setAttribute('id', id);
|
||||
//获取第一个script标签
|
||||
const firstScript = document.getElementsByTagName('script')[0];
|
||||
//获取第一个script标签的父节点 BODY,在body的第一个script引用之前插入,即把这个动态的js文件放在第一个调用
|
||||
firstScript.parentNode.insertBefore(script, firstScript);
|
||||
//script 一加载就执行
|
||||
script.onload = script.onreadystatechange = function() {
|
||||
// 加载完成
|
||||
if (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete') {
|
||||
callback && callback()
|
||||
}
|
||||
};
|
||||
},
|
||||
getAllVchannel(){
|
||||
debugger;
|
||||
this.$API.am.video.list.req({pageSize:999}).then(res=>{
|
||||
//如果已经存在这个id,则证明已经加载过,已经有这个js文件了,可以直接执行回调里面的操作
|
||||
if (document.querySelector(`#${id}`)) {
|
||||
callback && callback()
|
||||
return;
|
||||
}
|
||||
//第一次加载,先创建 script 标签
|
||||
const script = document.createElement('script');
|
||||
script.src = url;
|
||||
//创建id属性
|
||||
script.setAttribute('id', id);
|
||||
//获取第一个script标签
|
||||
const firstScript = document.getElementsByTagName('script')[0];
|
||||
//获取第一个script标签的父节点 BODY,在body的第一个script引用之前插入,即把这个动态的js文件放在第一个调用
|
||||
firstScript.parentNode.insertBefore(script, firstScript);
|
||||
//script 一加载就执行
|
||||
script.onload = script.onreadystatechange = function () {
|
||||
// 加载完成
|
||||
if (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete') {
|
||||
callback && callback()
|
||||
}
|
||||
};
|
||||
},
|
||||
getAllVchannel() {
|
||||
debugger;
|
||||
this.$API.am.video.list.req({ pageSize: 999 }).then(res => {
|
||||
debugger;
|
||||
console.log(res)
|
||||
let allVchannel = JSON.stringify(res.pageData);
|
||||
localStorage.setItem('allVchannel',allVchannel)
|
||||
localStorage.setItem('allVchannel', allVchannel)
|
||||
})
|
||||
},
|
||||
handleView(row) {
|
||||
|
@ -210,8 +202,8 @@ export default {
|
|||
viewClose() {
|
||||
this.limitedVisible = false;
|
||||
},
|
||||
//区域
|
||||
getArea() {
|
||||
//区域
|
||||
getArea() {
|
||||
this.$API.am.area.list.req({ page: 0 }).then((res) => {
|
||||
this.areaoptions = res;
|
||||
});
|
||||
|
@ -219,22 +211,22 @@ export default {
|
|||
handlePosition(row) {
|
||||
// debugger;
|
||||
console.log(row)
|
||||
if(row.my_info.id&&row.my_info.id!==null){
|
||||
if (row.my_info.id && row.my_info.id !== null) {
|
||||
this.channelId = row.my_info.id ? row.my_info.id : null;
|
||||
this.channelArea = row.my_info.area ? row.my_info.area : '';
|
||||
this.channelAreas = row.my_info.areas ? row.my_info.areas : [];
|
||||
this.channelLocation = row.my_info.location ? row.my_info.location : {};
|
||||
this.channelName = row.channelName;
|
||||
if(this.canUseMap){
|
||||
if (this.canUseMap) {
|
||||
this.dialogSave = true;
|
||||
}else{
|
||||
} else {
|
||||
this.$message("地图组件加载中,请稍后")
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
} else {
|
||||
this.$message.error("请先完成设备同步");
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection) {
|
||||
|
@ -242,7 +234,7 @@ export default {
|
|||
},
|
||||
|
||||
//搜索
|
||||
handleQuery() {
|
||||
handleQuery() {
|
||||
debugger;
|
||||
let that = this;
|
||||
let vchannel = localStorage.getItem('allVchannel');
|
||||
|
@ -251,14 +243,14 @@ export default {
|
|||
debugger;
|
||||
console.log(allVchannel)
|
||||
console.log(that.areaId)
|
||||
|
||||
that.pageData = allVchannel.filter(item=>{
|
||||
if(item.my_info.area == that.areaId){
|
||||
|
||||
that.pageData = allVchannel.filter(item => {
|
||||
if (item.my_info.area == that.areaId) {
|
||||
debugger;
|
||||
}
|
||||
return item.my_info.area == that.areaId;
|
||||
})
|
||||
// console.log(localStorage.getItem('allVchannel'))
|
||||
// console.log(localStorage.getItem('allVchannel'))
|
||||
},
|
||||
|
||||
resetQuery() {
|
||||
|
@ -275,8 +267,8 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-dialog{
|
||||
width: 100%!important;
|
||||
height: 100%!important;
|
||||
}
|
||||
::v-deep .el-dialog {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,156 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-aside width="300px">
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<div style="font-size: 20px; padding: 8px;">门禁通道</div>
|
||||
<el-tree ref="dchannel" class="menu" node-key="id" :data="dchannelOptions"
|
||||
@node-click="dchannelClick"></el-tree>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<!-- <el-select v-model="query.dchannel" placeholder="门禁通道" @change="handleQuery" clearable
|
||||
style="margin-left: 2px; width: 220px">
|
||||
<el-option v-for="item in dchannelOptions" :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; width: 120px">
|
||||
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select> -->
|
||||
<div style="font-size: 18px;">当前通道: {{ currentDchannel }}</div>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="query.personName" 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" :pageStr="pageStr" :pageSizeStr="pageSizeStr"
|
||||
:orderStr="orderStr" :parseData="parseData" stripe>
|
||||
<el-table-column label="通道名称" prop="dchannel">
|
||||
{{ currentDchannel }}
|
||||
</el-table-column>
|
||||
<el-table-column label="人员类型">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.my_info">{{ epOptions[scope.row.my_info.type] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="人员姓名">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.my_info">{{ scope.row.my_info.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部门/单位">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.my_info">{{ scope.row.my_info.belong_dept_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间范围">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.my_info">
|
||||
<p v-if="scope.row.my_info.third_info">{{ scope.row.my_info.third_info.dh_face_card_start }}
|
||||
</p>
|
||||
<p v-if="scope.row.my_info.third_info">{{ scope.row.my_info.third_info.dh_face_card_end }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left">
|
||||
<template #default="scope">
|
||||
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
||||
<template #reference>
|
||||
<el-button link type="danger" size="small"
|
||||
v-auth="'dchannel_auth.delete'">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "doorauth",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
apiObj: null,
|
||||
pageStr: "pageNum",
|
||||
pageSizeStr: "pageSize",
|
||||
orderStr: "sort",
|
||||
currentDchannel: '',
|
||||
parseData: (res) => {
|
||||
return {
|
||||
data: res, //分析无分页的数据字段结构
|
||||
rows: res.pageData, //分析行数据字段结构
|
||||
total: res.totalRows, //分析总数字段结构
|
||||
}
|
||||
},
|
||||
query: {},
|
||||
dchannelOptions: [],
|
||||
typeOptions: [
|
||||
{ label: "正式员工", value: "employee" },
|
||||
{ label: "相关方", value: "remployee" },
|
||||
{ label: "访客", value: "visitor" },
|
||||
{ label: "货车司机", value: "driver" },
|
||||
],
|
||||
epOptions: {
|
||||
"employee": "正式员工",
|
||||
"remployee": "相关方",
|
||||
'visitor': "访客",
|
||||
"driver": "司机"
|
||||
},
|
||||
trigger_: {
|
||||
"door": "门禁",
|
||||
"location": "定位",
|
||||
"panel": "面板机"
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getDchannels()
|
||||
},
|
||||
methods: {
|
||||
getDchannels() {
|
||||
this.$API.third.tdevice.list.req({ page: 0, type: 70 }).then(res => {
|
||||
res.forEach(m => {
|
||||
m.label = m.name
|
||||
})
|
||||
this.dchannelOptions = res
|
||||
})
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
dchannelClick(data) {
|
||||
this.apiObj = this.$API.third.tdevice.dchannelAuth
|
||||
this.query.channelCode = data.code
|
||||
this.query.pageNum = 1
|
||||
this.query.pageSize = 20
|
||||
this.currentDchannel = data.name
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
table_del(row) {
|
||||
var json_data = {
|
||||
"url": "/evo-apigw/evo-accesscontrol/1.0.0/card/accessControl/doorAuthority/removeAuthorizeAllCardNumberByChannelCode",
|
||||
"method": "post",
|
||||
"json": { "personIdsString": row.my_info.third_info.dh_id, "cardNumberString": row.my_info.third_info.dh_face_card, "channelCode": row.resouceCode }
|
||||
}
|
||||
this.$API.third.dh.dchannelAuthDelete.req(json_data).then(() => {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -2,128 +2,60 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="add"
|
||||
>新建项目</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-button type="primary" icon="el-icon-plus" @click="add">新建项目</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
|
||||
/>
|
||||
<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>
|
||||
<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>
|
||||
<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="80" fixed="left">
|
||||
<template #default="scope">{{
|
||||
purpose_[scope.row.purpose]
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="来访概述"
|
||||
prop="name"
|
||||
min-width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="访问级别"
|
||||
prop="level"
|
||||
min-width="80"
|
||||
fixed="left"
|
||||
>
|
||||
<el-table-column label="来访概述" prop="name" min-width="160" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="访问级别" prop="level" min-width="80" 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="220"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column label="来访单位" prop="company" min-width="220" fixed="left"></el-table-column>
|
||||
<el-table-column label="项目状态" prop="state" min-width="80">
|
||||
<template #default="scope">{{ state_[scope.row.state] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批状态" min-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"
|
||||
class="mx-1"
|
||||
size="small"
|
||||
:type="
|
||||
scope.row.ticket_.act_state === 0
|
||||
? ''
|
||||
: scope.row.ticket_.act_state === 1
|
||||
<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
|
||||
>
|
||||
? '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
|
||||
|
@ -131,21 +63,9 @@
|
|||
prop="name"
|
||||
min-width="180"
|
||||
></el-table-column> -->
|
||||
<el-table-column
|
||||
label="来访时间"
|
||||
prop="visit_time"
|
||||
width="160"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="离开时间"
|
||||
prop="leave_time"
|
||||
width="160"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="来访人数"
|
||||
prop="count_people"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column label="来访时间" prop="visit_time" width="160"></el-table-column>
|
||||
<el-table-column label="离开时间" prop="leave_time" width="160"></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_">{{
|
||||
|
@ -153,46 +73,22 @@
|
|||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
width="180"
|
||||
></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)"
|
||||
>继续编辑
|
||||
<el-button link v-if="scope.row.state == 10" type="primary" size="small"
|
||||
@click="addpepple(scope.row, scope.$index)">继续编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看
|
||||
<el-button link type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.state != 30"
|
||||
link
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="table_del(scope.row)"
|
||||
>删除
|
||||
<el-button v-if="scope.row.state != 30" link type="danger" size="small" @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>
|
||||
<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>
|
||||
|
@ -220,6 +116,8 @@ export default {
|
|||
keyword: null,
|
||||
},
|
||||
purposeOptions: [
|
||||
{ label: "售后服务", value: 2 },
|
||||
{ label: "业务洽谈", value: 4 },
|
||||
{ label: "参观", value: 10 },
|
||||
{ label: "拜访", value: 20 },
|
||||
{ label: "面试", value: 30 },
|
||||
|
@ -228,6 +126,8 @@ export default {
|
|||
{ label: "其他", value: 60 },
|
||||
],
|
||||
purpose_: {
|
||||
2: "售后服务",
|
||||
4: "业务洽谈",
|
||||
10: "参观",
|
||||
20: "拜访",
|
||||
30: "面试",
|
||||
|
|
|
@ -5,27 +5,28 @@
|
|||
<el-main>
|
||||
<el-card header="基本信息" shadow="hover">
|
||||
<el-descriptions :column="2">
|
||||
<el-descriptions-item label="来访概述:">{{form.name}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访级别:">{{levelOptions[form.level]}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访单位:">{{form.company}}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访概述:">{{ form.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="来访级别:">{{ levelOptions[form.level] }}</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-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>
|
||||
<div v-if="form.vehicle_photos_">
|
||||
<span style="vertical-align: top;">车辆照片:</span>
|
||||
<el-image v-for="item in form.vehicle_photos_" :key="item.id" :src="item.path"
|
||||
<span style="vertical-align: top;">车辆照片:</span>
|
||||
<el-image v-for="item in form.vehicle_photos_" :key="item.id" :src="item.path"
|
||||
style="width:100px;height:100px"></el-image>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 8px" shadow="hover" header="访客信息">
|
||||
<scTable ref="table" :data="peoplelist" row-key="id" height="auto" stripe hideDo hidePagination>
|
||||
|
@ -42,13 +43,9 @@
|
|||
<el-space v-else>否</el-space>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="照片:">
|
||||
<el-image
|
||||
v-if="scope.row.visitor_ && scope.row.visitor_.photo"
|
||||
style="margin-right: 8px;height: 146px;height:146px;"
|
||||
:src="scope.row.visitor_.photo"
|
||||
:preview-src-list="[scope.row.visitor_.photo]"
|
||||
fit="cover"
|
||||
/>
|
||||
<el-image v-if="scope.row.visitor_ && scope.row.visitor_.photo"
|
||||
style="margin-right: 8px;height: 146px;height:146px;" :src="scope.row.visitor_.photo"
|
||||
:preview-src-list="[scope.row.visitor_.photo]" fit="cover" />
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="健康码:">
|
||||
<el-image style="width: 100px; height: 100px" :src="scope.row.health_code"
|
||||
|
@ -77,8 +74,8 @@
|
|||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||
<el-table-column label="操作" width="60">
|
||||
<template #default="scope">
|
||||
<el-button link v-if="scope.row.blt_ == null" type="primary" size="small"
|
||||
@click="bindCard(scope.row, 10)" v-auth="'blt_bind.create'">绑卡
|
||||
<el-button link v-if="scope.row.blt_ == null" type="primary" size="small" @click="bindCard(scope.row, 10)"
|
||||
v-auth="'blt_bind.create'">绑卡
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -92,7 +89,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import config from "@/config"
|
||||
import config from "@/config"
|
||||
import ScBind from "@/components/scBind/index.vue";
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
|
@ -127,6 +124,8 @@ export default {
|
|||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
purposeoptions: [
|
||||
{ name: "售后服务", id: 2 },
|
||||
{ name: "业务洽谈", id: 4 },
|
||||
{ id: 10, name: "参观" },
|
||||
{ id: 20, name: "拜访" },
|
||||
{ id: 30, name: "面试" },
|
||||
|
@ -135,6 +134,8 @@ export default {
|
|||
{ id: 60, name: "其他" },
|
||||
],
|
||||
purpose_: {
|
||||
2: "售后服务",
|
||||
4: "业务洽谈",
|
||||
10: "参观",
|
||||
20: "拜访",
|
||||
30: "面试",
|
||||
|
@ -143,9 +144,9 @@ export default {
|
|||
60: "其他"
|
||||
},
|
||||
levelOptions: {
|
||||
10: "一般",
|
||||
20: "重要"
|
||||
},
|
||||
10: "一般",
|
||||
20: "重要"
|
||||
},
|
||||
state_: {
|
||||
10: "创建中",
|
||||
20: "审批中",
|
||||
|
@ -203,11 +204,11 @@ export default {
|
|||
this.loading = true
|
||||
this.$API.vm.visit.read.req(data.id).then((res) => {
|
||||
this.loading = false;
|
||||
let urls = config.API_URL.slice(0,-4);
|
||||
let urls = config.API_URL.slice(0, -4);
|
||||
this.form = res;
|
||||
|
||||
this.form.vehicle_photos_.forEach(item=>{
|
||||
item.path = urls+item.path
|
||||
this.form.vehicle_photos_.forEach(item => {
|
||||
item.path = urls + item.path
|
||||
})
|
||||
}).catch(e => { this.loading = false });
|
||||
|
||||
|
|
|
@ -1,30 +1,13 @@
|
|||
<template>
|
||||
<el-drawer
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<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-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:disabled="mode == 'show'"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form ref="dialogForm" :model="form" :rules="rules" :disabled="mode == 'show'" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :md="24" :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-option v-for="item in purposeoptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -36,37 +19,25 @@
|
|||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="来访详述">
|
||||
<el-input
|
||||
v-model="form.description"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
<el-input v-model="form.description" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="来访时间">
|
||||
<el-date-picker
|
||||
v-model="form.visit_time"
|
||||
type="datetime"
|
||||
placeholder="选择来访时间"
|
||||
/>
|
||||
<el-date-picker v-model="form.visit_time" type="datetime" placeholder="选择来访时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="离开时间">
|
||||
<el-date-picker
|
||||
v-model="form.leave_time"
|
||||
type="datetime"
|
||||
placeholder="选择离开时间"
|
||||
/>
|
||||
<el-date-picker v-model="form.leave_time" type="datetime" placeholder="选择离开时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="接待人">
|
||||
<span style="display:flex">
|
||||
<el-input readonly v-model="receptionist_name"></el-input>
|
||||
<!-- <el-select v-model="form.receptionist" disabled placeholder="选择接待人">
|
||||
<el-input readonly v-model="receptionist_name"></el-input>
|
||||
<!-- <el-select v-model="form.receptionist" disabled placeholder="选择接待人">
|
||||
<el-option
|
||||
v-for="item in receptionistoptions"
|
||||
:key="item.id"
|
||||
|
@ -74,18 +45,14 @@
|
|||
:value="item.id"
|
||||
/>
|
||||
</el-select> -->
|
||||
<ehsUserSelect :multiple="false" @submit="getReceptionist" >
|
||||
</ehsUserSelect >
|
||||
<ehsUserSelect :multiple="false" @submit="getReceptionist">
|
||||
</ehsUserSelect>
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="来访单位">
|
||||
<el-input
|
||||
v-model="form.company"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
<el-input v-model="form.company" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
|
@ -98,25 +65,19 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :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-input-number v-model="form.count_people" :min="0" :max="32767"
|
||||
controls-position="right"></el-input-number>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
|
@ -138,7 +99,7 @@ export default {
|
|||
},
|
||||
form: {},
|
||||
rules: {
|
||||
purpose: [{ required: true, message: "请输入" }],
|
||||
purpose: [{ required: true, message: "请输入" }],
|
||||
name: [{ required: true, message: "来访概述" }],
|
||||
visit_time: [{ required: true, message: "请输入" }],
|
||||
leave_time: [{ required: true, message: "请输入" }],
|
||||
|
@ -150,18 +111,20 @@ export default {
|
|||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
purposeoptions: [
|
||||
{ name: "售后服务", id: 2 },
|
||||
{ name: "业务洽谈", id: 4 },
|
||||
{ id: 10, name: "参观" },
|
||||
{ id: 20, name: "拜访" },
|
||||
{ id: 30, name: "面试" },
|
||||
{ id: 40, name: "开会" },
|
||||
{ id: 50, name: "货车司机" },
|
||||
],
|
||||
|
||||
|
||||
receptionist_name: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
@ -173,11 +136,11 @@ export default {
|
|||
},
|
||||
|
||||
|
||||
|
||||
|
||||
getReceptionist(data) {
|
||||
// 子组件调用父组件的方法并传参
|
||||
this.form.receptionist=data.id;
|
||||
this.receptionist_name=data.name
|
||||
this.form.receptionist = data.id;
|
||||
this.receptionist_name = data.name
|
||||
},
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue