rparty
This commit is contained in:
parent
aa44a69c4f
commit
e80dcecc39
|
|
@ -16,30 +16,9 @@ export default {
|
||||||
return await http.post(this.url, data, config);
|
return await http.post(this.url, data, config);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
exportFile: {
|
|
||||||
url: `${config.API_URL}/fileExport`,
|
|
||||||
name: "导出附件",
|
|
||||||
get: async function(data, config={}){
|
|
||||||
return await http.get(this.url, data, config);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
importFile: {
|
|
||||||
url: `${config.API_URL}/fileImport`,
|
|
||||||
name: "导入附件",
|
|
||||||
post: async function(data, config={}){
|
|
||||||
return await http.post(this.url, data, config);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
file: {
|
file: {
|
||||||
menu: {
|
|
||||||
url: `${config.API_URL}/file/menu`,
|
|
||||||
name: "获取文件分类",
|
|
||||||
get: async function(){
|
|
||||||
return await http.get(this.url);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
list: {
|
list: {
|
||||||
url: `${config.API_URL}/file/list`,
|
url: `${config.API_URL}/file`,
|
||||||
name: "获取文件列表",
|
name: "获取文件列表",
|
||||||
get: async function(params){
|
get: async function(params){
|
||||||
return await http.get(this.url, params);
|
return await http.get(this.url, params);
|
||||||
|
|
|
||||||
|
|
@ -125,11 +125,6 @@
|
||||||
name: "employee",
|
name: "employee",
|
||||||
components: {},
|
components: {},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
|
||||||
// 接受外部v-model传入的值
|
|
||||||
type: [String],
|
|
||||||
default: "",
|
|
||||||
},
|
|
||||||
user: {
|
user: {
|
||||||
// 接受外部v-model传入的值
|
// 接受外部v-model传入的值
|
||||||
type: [String],
|
type: [String],
|
||||||
|
|
@ -163,8 +158,13 @@
|
||||||
this.getUser();
|
this.getUser();
|
||||||
this.getDept();
|
this.getDept();
|
||||||
this.getPost();
|
this.getPost();
|
||||||
|
debugger;
|
||||||
|
if(this.user===""){
|
||||||
|
this.selection = [];
|
||||||
|
this.apiObj.map(item => {
|
||||||
|
this.$refs.table.toggleRowSelection(item, false)
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
filterText(val) {
|
filterText(val) {
|
||||||
|
|
@ -181,13 +181,25 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showDialog() {
|
showDialog() {
|
||||||
this.dialoguser = true;
|
debugger;
|
||||||
this.$nextTick(function () {
|
let that = this;
|
||||||
this.apiObj.map(item => {
|
that.dialoguser = true;
|
||||||
if (item.id === this.user) {
|
that.$nextTick(function () {
|
||||||
this.$refs.table.toggleRowSelection(item, true)
|
debugger;
|
||||||
}
|
if(that.user===""){
|
||||||
})
|
that.selection = [];
|
||||||
|
that.apiObj.map(item => {
|
||||||
|
that.$refs.table.toggleRowSelection(item, false)
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.apiObj.map(item => {
|
||||||
|
debugger;
|
||||||
|
if (item.id === that.user) {
|
||||||
|
that.$refs.table.toggleRowSelection(item, true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -240,16 +252,19 @@
|
||||||
},
|
},
|
||||||
//表格选择后回调事件
|
//表格选择后回调事件
|
||||||
selectionChange(selection) {
|
selectionChange(selection) {
|
||||||
|
debugger;
|
||||||
if (selection.length > 1) {
|
if (selection.length > 1) {
|
||||||
let del_row = selection.shift();
|
let del_row = selection.shift();
|
||||||
this.selection = selection[1];
|
this.selection = selection[1];
|
||||||
this.$refs.userTable.toggleRowSelection(del_row, false); // 用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中)
|
this.$refs.userTable.toggleRowSelection(del_row, false); // 用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中)
|
||||||
}else{
|
}else{
|
||||||
|
debugger;
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
submitfrom() {
|
submitfrom() {
|
||||||
|
debugger;
|
||||||
if(this.selection.length===1){
|
if(this.selection.length===1){
|
||||||
let obj={id:this.selection[0].id,name:this.selection[0].name};
|
let obj={id:this.selection[0].id,name:this.selection[0].name};
|
||||||
this.$emit("handlerSubmit", obj);
|
this.$emit("handlerSubmit", obj);
|
||||||
|
|
|
||||||
|
|
@ -233,13 +233,12 @@
|
||||||
param.onProgress({percent: complete})
|
param.onProgress({percent: complete})
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
config.parseData(res);
|
var response = config.parseData(res);
|
||||||
param.onSuccess(res)
|
if(response.code == config.successCode){
|
||||||
// if(response.code == config.successCode){
|
param.onSuccess(res)
|
||||||
// param.onSuccess(res)
|
}else{
|
||||||
// }else{
|
param.onError(response.msg || "未知错误")
|
||||||
// param.onError(response.msg || "未知错误")
|
}
|
||||||
// }
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
param.onError(err)
|
param.onError(err)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="branch-wrap">
|
<div class="branch-wrap">
|
||||||
<div class="branch-box-wrap">
|
<div class="branch-box-wrap">
|
||||||
<div class="branch-box">
|
<div class="branch-box">
|
||||||
<el-button class="add-branch" type="success" plain round @click="addTerm">添加条件</el-button>
|
<!--<el-button class="add-branch" type="success" plain round @click="addTerm">添加条件</el-button>-->
|
||||||
<div class="col-box" v-for="(item,index) in nodeConfig.conditionNodes" :key="index">
|
<div class="col-box" v-for="(item,index) in nodeConfig.conditionNodes" :key="index">
|
||||||
<div class="condition-node">
|
<div class="condition-node">
|
||||||
<div class="condition-node-box">
|
<div class="condition-node-box">
|
||||||
|
|
|
||||||
|
|
@ -688,6 +688,15 @@ const routes = [
|
||||||
"icon": "el-icon-fold",
|
"icon": "el-icon-fold",
|
||||||
},
|
},
|
||||||
"component": "ops/thirdLogs"
|
"component": "ops/thirdLogs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "files",
|
||||||
|
"path": "/ops/files",
|
||||||
|
"meta": {
|
||||||
|
"title": "文件日志",
|
||||||
|
"icon": "el-icon-fold",
|
||||||
|
},
|
||||||
|
"component": "ops/files"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -67,18 +67,21 @@ router.beforeEach(async (to, from, next) => {
|
||||||
//加载动态/静态路由
|
//加载动态/静态路由
|
||||||
if(!isGetRouter){
|
if(!isGetRouter){
|
||||||
// let apiMenu = tool.data.get("MENU") || []
|
// let apiMenu = tool.data.get("MENU") || []
|
||||||
let userInfo = tool.data.get("USER_INFO")
|
debugger;
|
||||||
|
let userInfo = tool.data.get("USER_INFO");
|
||||||
|
let permissions = tool.data.get("PERMISSIONS");
|
||||||
let userMenu = treeFilter(userRoutes, node => {
|
let userMenu = treeFilter(userRoutes, node => {
|
||||||
return node.meta.perms ? node.meta.perms.filter(item=>userInfo.perms.indexOf(item)>-1).length > 0 : true
|
return node.meta.perms ? node.meta.perms.filter(item=>userInfo.perms.indexOf(item)>-1).length > 0 : true
|
||||||
})
|
});
|
||||||
// let menu = [...userMenu, ...apiMenu]
|
// let menu = [...userMenu, ...apiMenu]
|
||||||
var menuRouter = filterAsyncRouter(userMenu)
|
var menuRouter = filterAsyncRouter(userMenu);
|
||||||
menuRouter = flatAsyncRoutes(menuRouter)
|
menuRouter = flatAsyncRoutes(menuRouter);
|
||||||
menuRouter.forEach(item => {
|
menuRouter.forEach(item => {
|
||||||
router.addRoute("layout", item)
|
router.addRoute("layout", item)
|
||||||
})
|
});
|
||||||
routes_404_r = router.addRoute(routes_404)
|
routes_404_r = router.addRoute(routes_404);
|
||||||
if (to.matched.length == 0) {
|
debugger;
|
||||||
|
if (to.matched.length ==0||permissions[0]==='superuser') {
|
||||||
router.push(to.fullPath);
|
router.push(to.fullPath);
|
||||||
}
|
}
|
||||||
isGetRouter = true;
|
isGetRouter = true;
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ tool.objCopy = function (obj) {
|
||||||
|
|
||||||
/* 日期格式化 */
|
/* 日期格式化 */
|
||||||
tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') {
|
tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') {
|
||||||
date = new Date(date)
|
date = new Date(date);
|
||||||
var o = {
|
var o = {
|
||||||
"M+" : date.getMonth()+1, //月份
|
"M+" : date.getMonth()+1, //月份
|
||||||
"d+" : date.getDate(), //日
|
"d+" : date.getDate(), //日
|
||||||
|
|
@ -155,14 +155,21 @@ tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') {
|
||||||
"m+" : date.getMinutes(), //分
|
"m+" : date.getMinutes(), //分
|
||||||
"s+" : date.getSeconds(), //秒
|
"s+" : date.getSeconds(), //秒
|
||||||
"q+" : Math.floor((date.getMonth()+3)/3), //季度
|
"q+" : Math.floor((date.getMonth()+3)/3), //季度
|
||||||
"S" : date.getMilliseconds() //毫秒
|
"S" : date.getMilliseconds(), //毫秒
|
||||||
|
"W" : date.getDay(), //毫秒
|
||||||
};
|
};
|
||||||
if(/(y+)/.test(fmt)) {
|
var weeks = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
|
||||||
fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length));
|
|
||||||
}
|
if(fmt==='week'){
|
||||||
for(var k in o) {
|
fmt =weeks[o.w];
|
||||||
if(new RegExp("("+ k +")").test(fmt)){
|
}else{
|
||||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
|
if(/(y+)/.test(fmt)) {
|
||||||
|
fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length));
|
||||||
|
}
|
||||||
|
for(var k in o) {
|
||||||
|
if(new RegExp("("+ k +")").test(fmt)){
|
||||||
|
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fmt;
|
return fmt;
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
<div class="header-left-bg">曲阳金隅智慧安全</div>
|
<div class="header-left-bg">曲阳金隅智慧安全</div>
|
||||||
<div class="header-right-action">
|
<div class="header-right-action">
|
||||||
<div class="right-action-clock">
|
<div class="right-action-clock">
|
||||||
<span class="action-time">2022-06-22</span>
|
<span class="action-time">{{ currentDay }}</span>
|
||||||
<span class="action-time">周三下午 </span>
|
<span class="action-time">周三下午 </span>
|
||||||
<span class="action-time">17:59:52</span>
|
<span class="action-time">{{ currentTime }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -831,6 +831,8 @@
|
||||||
LBType: '1',
|
LBType: '1',
|
||||||
userMarker: {},
|
userMarker: {},
|
||||||
todayDate:'',
|
todayDate:'',
|
||||||
|
currentDay:'',
|
||||||
|
currentTime:'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -841,7 +843,12 @@
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
this.todayDate = this.warningData.params.start_create = this.cateAggForm.start_create =date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate();
|
this.timeNow = date.getDay();
|
||||||
|
this.todayDate = this.warningData.params.start_create = this.cateAggForm.start_create =this.$TOOL.dateFormat(new Date(), 'yyyy-MM-dd');
|
||||||
|
this.showTime();
|
||||||
|
setInterval(()=>{
|
||||||
|
this.showTime();
|
||||||
|
},1000);
|
||||||
window.map = new jsmap.JSMap({
|
window.map = new jsmap.JSMap({
|
||||||
mapType: jsmap.JSMapType.MAP_3D,
|
mapType: jsmap.JSMapType.MAP_3D,
|
||||||
container: 'mapContainer',
|
container: 'mapContainer',
|
||||||
|
|
@ -1016,6 +1023,10 @@
|
||||||
setInterval(function () {}, 3000)
|
setInterval(function () {}, 3000)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showTime(){
|
||||||
|
this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss');
|
||||||
|
this.currentDay = this.$TOOL.dateFormat(new Date(), 'yyyy年MM月dd日')
|
||||||
|
},
|
||||||
getWarningTotal(){
|
getWarningTotal(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.ecm.event.cateAgg.req(that.cateAggForm).then(res=>{
|
that.$API.ecm.event.cateAgg.req(that.cateAggForm).then(res=>{
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
var res1 = await this.$API.auth.info.get();
|
var res1 = await this.$API.auth.info.get();
|
||||||
this.$TOOL.data.set("USER_INFO", res1);
|
this.$TOOL.data.set("USER_INFO", res1);
|
||||||
this.$TOOL.data.set("PERMISSIONS", res1.perms.keys());
|
this.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms));
|
||||||
this.$router.replace({
|
this.$router.replace({
|
||||||
path: "/",
|
path: "/",
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<div class="right-panel-search">
|
||||||
|
<el-input v-model="search.id" placeholder="logId" clearable></el-input>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="getSearch"></el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick">
|
||||||
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||||
|
<el-table-column label="名称" prop="name" min-width="80"></el-table-column>
|
||||||
|
<el-table-column label="id" prop="id" min-width="200"></el-table-column>
|
||||||
|
<el-table-column label="路径" prop="path" min-width="150"></el-table-column>
|
||||||
|
<el-table-column label="类型" prop="type" min-width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag class="ml-2" type="success" v-if="scope.row.type===1">成功</el-tag>
|
||||||
|
<el-tag class="ml-2" type="warning" v-if="scope.row.type===2">报错</el-tag>
|
||||||
|
<el-tag class="ml-2" type="danger" v-if="scope.row.type===40">图片</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作时间" prop="requested_at" min-width="150"></el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="100">
|
||||||
|
<el-button type="text" size="small">查看详情</el-button>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<el-drawer v-model="infoDrawer" title="日志详情" :size="'50%'" destroy-on-close>
|
||||||
|
<logInfo ref="logInfo"></logInfo>
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import logInfo from './logInfo'
|
||||||
|
export default {
|
||||||
|
name: 'files',
|
||||||
|
components: {
|
||||||
|
logInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
apiObj: this.$API.common.file.list,
|
||||||
|
search:{
|
||||||
|
id:null,
|
||||||
|
},
|
||||||
|
logLists:[],
|
||||||
|
infoDrawer:false,
|
||||||
|
logDetailVisible:false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getSearch(){
|
||||||
|
this.$refs.table.reload(this.search);
|
||||||
|
},
|
||||||
|
rowClick(row){
|
||||||
|
this.infoDrawer = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.logInfo.setData(row)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.treeMain {height:280px;overflow: auto;border: 1px solid #dcdfe6;margin-bottom: 10px;}
|
||||||
|
</style>
|
||||||
|
|
@ -1,260 +1,280 @@
|
||||||
<template>
|
<template>
|
||||||
<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"></el-button>
|
<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>
|
</div>
|
||||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
<div class="right-panel">
|
||||||
</div>
|
<div class="right-panel-search">
|
||||||
<div class="right-panel">
|
<el-input
|
||||||
<div class="right-panel-search">
|
v-model="search.keyword"
|
||||||
<el-input
|
placeholder="名称"
|
||||||
v-model="search.keyword"
|
clearable
|
||||||
placeholder="名称"
|
></el-input>
|
||||||
clearable
|
<el-button
|
||||||
|
type="primary"
|
||||||
></el-input>
|
icon="el-icon-search"
|
||||||
<el-button
|
></el-button>
|
||||||
type="primary"
|
</div>
|
||||||
icon="el-icon-search"
|
</div>
|
||||||
|
</el-header>
|
||||||
></el-button>
|
<el-main class="nopadding">
|
||||||
</div>
|
<scTable
|
||||||
</div>
|
ref="table"
|
||||||
</el-header>
|
:apiObj="apiObj"
|
||||||
<el-main class="nopadding">
|
row-key="id"
|
||||||
<scTable
|
@selection-change="selectionChange"
|
||||||
ref="table"
|
stripe
|
||||||
:apiObj="apiObj"
|
@resetQuery="resetQuery"
|
||||||
row-key="id"
|
>
|
||||||
@selection-change="selectionChange"
|
<el-table-column
|
||||||
stripe
|
label="#"
|
||||||
@resetQuery="resetQuery"
|
fixed="left"
|
||||||
>
|
type="index"
|
||||||
<el-table-column
|
width="50"
|
||||||
label="#"
|
></el-table-column>
|
||||||
fixed="left"
|
|
||||||
type="index"
|
|
||||||
width="50"
|
|
||||||
></el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="来访事由" prop="state" width="180" fixed="left">
|
|
||||||
<template #default="scope">{{
|
|
||||||
purpose_[scope.row.purpose]
|
|
||||||
}}</template></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="访问级别"
|
|
||||||
prop="level"
|
|
||||||
width="200"
|
|
||||||
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"
|
|
||||||
width="180"
|
|
||||||
fixed="left"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="状态"
|
|
||||||
prop="state"
|
|
||||||
width="180"
|
|
||||||
> <template #default="scope">{{
|
|
||||||
state_[scope.row.state]
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="来访概述"
|
|
||||||
prop="name"
|
|
||||||
width="180"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="来访详述"
|
|
||||||
prop="description"
|
|
||||||
width="180"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="来访时间"
|
|
||||||
prop="visit_time"
|
|
||||||
width="180"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="离开时间"
|
|
||||||
prop="leave_time"
|
|
||||||
width="180"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="来访人数"
|
|
||||||
prop="count_people"
|
|
||||||
width="180"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="属地部门"
|
|
||||||
prop="belong_dept"
|
|
||||||
width="180"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="接待人"
|
|
||||||
prop="receptionist_name"
|
|
||||||
width="180"
|
|
||||||
></el-table-column>
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
label="创建时间"
|
|
||||||
prop="create_time"
|
|
||||||
width="180"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button-group>
|
|
||||||
|
|
||||||
|
|
||||||
<el-button
|
|
||||||
text
|
|
||||||
v-if="scope.row.state==10"
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="addpepple(scope.row, scope.$index)"
|
|
||||||
>继续编辑</el-button>
|
|
||||||
<el-button
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="table_show(scope.row, scope.$index)"
|
|
||||||
>查看</el-button>
|
|
||||||
|
|
||||||
<el-button
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="table_del(scope.row)"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-button-group>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
|
|
||||||
</el-main>
|
|
||||||
|
|
||||||
<save-dialog
|
<el-table-column label="来访事由" prop="state" width="180" fixed="left">
|
||||||
v-if="dialog.save"
|
<template #default="scope">{{purpose_[scope.row.purpose] }}</template>
|
||||||
ref="saveDialog"
|
</el-table-column>
|
||||||
@success="handleSaveSuccess"
|
<el-table-column
|
||||||
@closed="dialog.save = false"
|
label="访问级别"
|
||||||
></save-dialog>
|
prop="level"
|
||||||
<detial-dialog
|
width="200"
|
||||||
v-if="dialog.save"
|
fixed="left"
|
||||||
ref="detialDialog"
|
>
|
||||||
></detial-dialog>
|
<template #default="scope">
|
||||||
</el-container>
|
<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"
|
||||||
|
width="180"
|
||||||
|
fixed="left"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="项目状态"
|
||||||
|
prop="state"
|
||||||
|
width="180"
|
||||||
|
>
|
||||||
|
<template #default="scope">{{state_[scope.row.state] }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="审批状态"
|
||||||
|
prop="state"
|
||||||
|
width="180"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.ticket_&&scope.row.ticket_.state_" style="margin-right: 5px;">{{scope.row.ticket_.state_.name }}</span>
|
||||||
|
<el-tag
|
||||||
|
v-if="scope.row.ticket_&&scope.row.ticket_.act_state"
|
||||||
|
class="mx-1"
|
||||||
|
size="small"
|
||||||
|
:type="scope.row.ticket_.act_state===0?'':scope.row.ticket_.act_state===1?'':scope.row.ticket_.act_state===2?'danger':scope.row.ticket_.act_state===3?'danger':scope.row.ticket_.act_state===5?'danger':scope.row.ticket_.act_state===4?'success':''"
|
||||||
|
>{{act_states[scope.row.ticket_.act_state]}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="来访概述"
|
||||||
|
prop="name"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="来访详述"
|
||||||
|
prop="description"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="来访时间"
|
||||||
|
prop="visit_time"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="离开时间"
|
||||||
|
prop="leave_time"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="来访人数"
|
||||||
|
prop="count_people"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="属地部门"
|
||||||
|
prop="belong_dept"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="接待人"
|
||||||
|
prop="receptionist_name"
|
||||||
|
width="180"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.receptionist_">{{scope.row.receptionist_.name}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button-group>
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
v-if="scope.row.state==10"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="addpepple(scope.row, scope.$index)"
|
||||||
|
>继续编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="table_show(scope.row, scope.$index)"
|
||||||
|
>查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="table_del(scope.row)"
|
||||||
|
>删除
|
||||||
|
</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
></save-dialog>
|
||||||
|
<detial-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="detialDialog"
|
||||||
|
></detial-dialog>
|
||||||
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./visit_form.vue";
|
import saveDialog from "./visit_form.vue";
|
||||||
import detialDialog from "./visit_detial.vue";
|
import detialDialog from "./visit_detial.vue";
|
||||||
export default {
|
|
||||||
name: "visit",
|
|
||||||
components: {
|
|
||||||
saveDialog,
|
|
||||||
detialDialog
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialog: {
|
|
||||||
save: false,
|
|
||||||
permission: false,
|
|
||||||
},
|
|
||||||
apiObj: this.$API.vm.visit.list,
|
|
||||||
query: {},
|
|
||||||
selection: [],
|
|
||||||
search: {
|
|
||||||
keyword: null,
|
|
||||||
},
|
|
||||||
|
|
||||||
purpose_: {
|
|
||||||
10: "参观",
|
|
||||||
20: "拜访",
|
|
||||||
30: "面试",
|
|
||||||
40: "开会"
|
|
||||||
},
|
|
||||||
state_: {
|
|
||||||
10: "创建中",
|
|
||||||
20: "审批中",
|
|
||||||
30: "待入厂",
|
|
||||||
40: "进行中",
|
|
||||||
50: "已完成",
|
|
||||||
},
|
|
||||||
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//添加
|
|
||||||
add() {
|
|
||||||
this.dialog.save = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.saveDialog.open("add");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
addpepple(row){
|
|
||||||
this.$router.push({
|
|
||||||
name: "vistoradd",
|
|
||||||
query: {
|
|
||||||
visitid: row.id, //访问项目id
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
export default {
|
||||||
//查看
|
name: "visit",
|
||||||
table_show(row) {
|
components: {
|
||||||
this.dialog.save = true;
|
saveDialog,
|
||||||
this.$nextTick(() => {
|
detialDialog
|
||||||
this.$refs.detialDialog.open("show").setData(row);
|
},
|
||||||
});
|
data() {
|
||||||
},
|
return {
|
||||||
|
dialog: {
|
||||||
//权限设置
|
save: false,
|
||||||
permission() {
|
permission: false,
|
||||||
this.dialog.permission = true;
|
},
|
||||||
this.$nextTick(() => {
|
apiObj: this.$API.vm.visit.list,
|
||||||
this.$refs.permissionDialog.open();
|
query: {},
|
||||||
});
|
selection: [],
|
||||||
},
|
search: {
|
||||||
//删除
|
keyword: null,
|
||||||
table_del(row) {
|
},
|
||||||
this.$API.vm.visit.delete
|
|
||||||
.req(row.id)
|
purpose_: {
|
||||||
.then((res) => {
|
10: "参观",
|
||||||
this.$message.success("删除成功");
|
20: "拜访",
|
||||||
|
30: "面试",
|
||||||
return res;
|
40: "开会"
|
||||||
})
|
},
|
||||||
.catch((err) => {
|
state_: {
|
||||||
return err;
|
10: "创建中",
|
||||||
});
|
20: "审批中",
|
||||||
|
30: "待入厂",
|
||||||
},
|
40: "进行中",
|
||||||
|
50: "已完成",
|
||||||
//表格选择后回调事件
|
},
|
||||||
selectionChange(selection) {
|
act_states: {
|
||||||
this.selection = selection;
|
0: "草稿中",//p
|
||||||
},
|
1: "进行中",//p
|
||||||
|
|
||||||
|
2: "被退回",//d
|
||||||
//本地更新数据
|
3: "被撤回",//d
|
||||||
handleSaveSuccess(data, mode) {
|
|
||||||
if (mode == "add") {
|
4: "已完成",//s
|
||||||
this.$refs.table.refresh();
|
5: "已关闭",//d
|
||||||
} else if (mode == "edit") {
|
},
|
||||||
this.$refs.table.refresh();
|
};
|
||||||
}
|
},
|
||||||
},
|
methods: {
|
||||||
resetQuery() {
|
//添加
|
||||||
this.query = {};
|
add() {
|
||||||
},
|
this.dialog.save = true;
|
||||||
},
|
this.$nextTick(() => {
|
||||||
};
|
this.$refs.saveDialog.open("add");
|
||||||
</script>
|
});
|
||||||
|
},
|
||||||
|
addpepple(row) {
|
||||||
|
this.$router.push({
|
||||||
|
name: "vistoradd",
|
||||||
|
query: {
|
||||||
|
visitid: row.id, //访问项目id
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//查看
|
||||||
|
table_show(row) {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.detialDialog.open("show").setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//权限设置
|
||||||
|
permission() {
|
||||||
|
this.dialog.permission = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.permissionDialog.open();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
table_del(row) {
|
||||||
|
this.$API.vm.visit.delete
|
||||||
|
.req(row.id)
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
//表格选择后回调事件
|
||||||
|
selectionChange(selection) {
|
||||||
|
this.selection = selection;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//本地更新数据
|
||||||
|
handleSaveSuccess(data, mode) {
|
||||||
|
if (mode == "add") {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
} else if (mode == "edit") {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.query = {};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
height="500"
|
height="400"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
>
|
>
|
||||||
<el-table-column label="工单标题" min-width="100">
|
<el-table-column label="工单标题" min-width="100">
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
<el-button v-if="ticketDetail.state_&&ticketDetail.state_.enable_deliver" type="primary" plain @click="deliverNode">转交</el-button>
|
<el-button v-if="ticketDetail.state_&&ticketDetail.state_.enable_deliver" type="primary" plain @click="deliverNode">转交</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-for="item in operationBtn" :key="item.id" class="filter-item" type="primary" @click="operationSubmit(item.id)">{{item.name}}</el-button>
|
<el-button v-for="item in operationBtn" :key="item.id" class="filter-item" :type="item.attribute_type===2?'danger':'primary'" @click="operationSubmit(item.id)">{{item.name}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
<el-form ref="Form" :model="addForm" label-width="100px" label-position="right">
|
<el-form ref="Form" :model="addForm" label-width="100px" label-position="right">
|
||||||
<el-form-item label="处理人">
|
<el-form-item label="处理人">
|
||||||
<el-input style="width: 50%;" v-model="userName" disabled placeholder="选择处理人"></el-input>
|
<el-input style="width: 50%;" v-model="userName" disabled placeholder="选择处理人"></el-input>
|
||||||
<scUserSelect :closable="true" :multiple="false" @addNodeHandlerSubmit="addNodeHandlerSubmit"></scUserSelect>
|
<scUserSelect v-model="addForm.toadd_user" :closable="true" :multiple="false" @handlerSubmit="addNodeHandlerSubmit"></scUserSelect>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="加签原因">
|
<el-form-item label="加签原因">
|
||||||
<el-input type="textarea" :rows="3" v-model="addForm.suggestion" placeholder="加签原因"/>
|
<el-input type="textarea" :rows="3" v-model="addForm.suggestion" placeholder="加签原因"/>
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||||
<el-table-column label="ID" prop="id" min-width="120"></el-table-column>
|
<el-table-column label="ID" prop="id" min-width="120"></el-table-column>
|
||||||
<el-table-column label="工作流名称" prop="name" min-width="250"></el-table-column>
|
<el-table-column label="工作流名称" prop="name" min-width="250"></el-table-column>
|
||||||
|
<el-table-column label="标识" prop="key" min-width="250"></el-table-column>
|
||||||
<el-table-column label="工单查看权限校验" prop="view_permission_check" min-width="150">
|
<el-table-column label="工单查看权限校验" prop="view_permission_check" min-width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.view_permission_check">是</span>
|
<span v-if="scope.row.view_permission_check">是</span>
|
||||||
|
|
@ -46,8 +47,8 @@
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="addForm.name" clearable></el-input>
|
<el-input v-model="addForm.name" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标识" prop="code">
|
<el-form-item label="标识" prop="key">
|
||||||
<el-input v-model="addForm.code" clearable></el-input>
|
<el-input v-model="addForm.key" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流水前缀">
|
<el-form-item label="流水前缀">
|
||||||
<el-input v-model="addForm.sn_prefix" clearable></el-input>
|
<el-input v-model="addForm.sn_prefix" clearable></el-input>
|
||||||
|
|
@ -141,32 +142,34 @@
|
||||||
this.type = 'add';
|
this.type = 'add';
|
||||||
this.limitedVisible = true;
|
this.limitedVisible = true;
|
||||||
},
|
},
|
||||||
submitHandle() {
|
submitHandle() {
|
||||||
let that = this;
|
let that = this;
|
||||||
debugger;
|
|
||||||
console.log(that.addForm.view_permission_check);
|
|
||||||
this.$refs.addForm.validate((valid) => {
|
this.$refs.addForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
let res = null;
|
that.submit();
|
||||||
if (that.type === 'add') {
|
|
||||||
debugger;
|
|
||||||
res = that.$API.wf.workflow.create.req(that.addForm);
|
|
||||||
} else {
|
|
||||||
res = that.$API.wf.workflow.update.req(that.editId, that.addForm);
|
|
||||||
}
|
|
||||||
if(res.err_msg){
|
|
||||||
this.$message.error(res.err_msg)
|
|
||||||
}else{
|
|
||||||
that.isSaveing = false;
|
|
||||||
that.limitedVisible = false;
|
|
||||||
that.$refs.table.refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async submit(){
|
||||||
|
let that = this;
|
||||||
|
let res = null;
|
||||||
|
try{
|
||||||
|
if (that.type === 'add') {
|
||||||
|
res = await that.$API.wf.workflow.create.req(that.addForm)
|
||||||
|
} else {
|
||||||
|
res = await that.$API.wf.workflow.update.req(that.editId, that.addForm);
|
||||||
|
}
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.limitedVisible = false;
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
}catch (e) {
|
||||||
|
that.isSaveing = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
//编辑工作流
|
//编辑工作流
|
||||||
workflowEdit(row) {
|
workflowEdit(row) {
|
||||||
this.type = 'edit';
|
this.type = 'edit';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue