rparty
This commit is contained in:
parent
aa44a69c4f
commit
e80dcecc39
|
@ -16,30 +16,9 @@ export default {
|
|||
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: {
|
||||
menu: {
|
||||
url: `${config.API_URL}/file/menu`,
|
||||
name: "获取文件分类",
|
||||
get: async function(){
|
||||
return await http.get(this.url);
|
||||
}
|
||||
},
|
||||
list: {
|
||||
url: `${config.API_URL}/file/list`,
|
||||
url: `${config.API_URL}/file`,
|
||||
name: "获取文件列表",
|
||||
get: async function(params){
|
||||
return await http.get(this.url, params);
|
||||
|
|
|
@ -125,11 +125,6 @@
|
|||
name: "employee",
|
||||
components: {},
|
||||
props: {
|
||||
value: {
|
||||
// 接受外部v-model传入的值
|
||||
type: [String],
|
||||
default: "",
|
||||
},
|
||||
user: {
|
||||
// 接受外部v-model传入的值
|
||||
type: [String],
|
||||
|
@ -163,8 +158,13 @@
|
|||
this.getUser();
|
||||
this.getDept();
|
||||
this.getPost();
|
||||
|
||||
|
||||
debugger;
|
||||
if(this.user===""){
|
||||
this.selection = [];
|
||||
this.apiObj.map(item => {
|
||||
this.$refs.table.toggleRowSelection(item, false)
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
|
@ -181,13 +181,25 @@
|
|||
},
|
||||
methods: {
|
||||
showDialog() {
|
||||
this.dialoguser = true;
|
||||
this.$nextTick(function () {
|
||||
this.apiObj.map(item => {
|
||||
if (item.id === this.user) {
|
||||
this.$refs.table.toggleRowSelection(item, true)
|
||||
}
|
||||
})
|
||||
debugger;
|
||||
let that = this;
|
||||
that.dialoguser = true;
|
||||
that.$nextTick(function () {
|
||||
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) {
|
||||
debugger;
|
||||
if (selection.length > 1) {
|
||||
let del_row = selection.shift();
|
||||
this.selection = selection[1];
|
||||
this.$refs.userTable.toggleRowSelection(del_row, false); // 用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中)
|
||||
}else{
|
||||
debugger;
|
||||
this.selection = selection;
|
||||
}
|
||||
},
|
||||
|
||||
submitfrom() {
|
||||
debugger;
|
||||
if(this.selection.length===1){
|
||||
let obj={id:this.selection[0].id,name:this.selection[0].name};
|
||||
this.$emit("handlerSubmit", obj);
|
||||
|
|
|
@ -233,13 +233,12 @@
|
|||
param.onProgress({percent: complete})
|
||||
}
|
||||
}).then(res => {
|
||||
config.parseData(res);
|
||||
param.onSuccess(res)
|
||||
// if(response.code == config.successCode){
|
||||
// param.onSuccess(res)
|
||||
// }else{
|
||||
// param.onError(response.msg || "未知错误")
|
||||
// }
|
||||
var response = config.parseData(res);
|
||||
if(response.code == config.successCode){
|
||||
param.onSuccess(res)
|
||||
}else{
|
||||
param.onError(response.msg || "未知错误")
|
||||
}
|
||||
}).catch(err => {
|
||||
param.onError(err)
|
||||
})
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="branch-wrap">
|
||||
<div class="branch-box-wrap">
|
||||
<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="condition-node">
|
||||
<div class="condition-node-box">
|
||||
|
|
|
@ -688,6 +688,15 @@ const routes = [
|
|||
"icon": "el-icon-fold",
|
||||
},
|
||||
"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){
|
||||
// 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 => {
|
||||
return node.meta.perms ? node.meta.perms.filter(item=>userInfo.perms.indexOf(item)>-1).length > 0 : true
|
||||
})
|
||||
});
|
||||
// let menu = [...userMenu, ...apiMenu]
|
||||
var menuRouter = filterAsyncRouter(userMenu)
|
||||
menuRouter = flatAsyncRoutes(menuRouter)
|
||||
var menuRouter = filterAsyncRouter(userMenu);
|
||||
menuRouter = flatAsyncRoutes(menuRouter);
|
||||
menuRouter.forEach(item => {
|
||||
router.addRoute("layout", item)
|
||||
})
|
||||
routes_404_r = router.addRoute(routes_404)
|
||||
if (to.matched.length == 0) {
|
||||
});
|
||||
routes_404_r = router.addRoute(routes_404);
|
||||
debugger;
|
||||
if (to.matched.length ==0||permissions[0]==='superuser') {
|
||||
router.push(to.fullPath);
|
||||
}
|
||||
isGetRouter = true;
|
||||
|
|
|
@ -147,7 +147,7 @@ tool.objCopy = function (obj) {
|
|||
|
||||
/* 日期格式化 */
|
||||
tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') {
|
||||
date = new Date(date)
|
||||
date = new Date(date);
|
||||
var o = {
|
||||
"M+" : date.getMonth()+1, //月份
|
||||
"d+" : date.getDate(), //日
|
||||
|
@ -155,14 +155,21 @@ tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') {
|
|||
"m+" : date.getMinutes(), //分
|
||||
"s+" : date.getSeconds(), //秒
|
||||
"q+" : Math.floor((date.getMonth()+3)/3), //季度
|
||||
"S" : date.getMilliseconds() //毫秒
|
||||
"S" : date.getMilliseconds(), //毫秒
|
||||
"W" : date.getDay(), //毫秒
|
||||
};
|
||||
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)));
|
||||
var weeks = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
|
||||
|
||||
if(fmt==='week'){
|
||||
fmt =weeks[o.w];
|
||||
}else{
|
||||
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;
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<div class="header-left-bg">曲阳金隅智慧安全</div>
|
||||
<div class="header-right-action">
|
||||
<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">17:59:52</span>
|
||||
<span class="action-time">{{ currentTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -831,6 +831,8 @@
|
|||
LBType: '1',
|
||||
userMarker: {},
|
||||
todayDate:'',
|
||||
currentDay:'',
|
||||
currentTime:'',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -841,7 +843,12 @@
|
|||
},
|
||||
mounted() {
|
||||
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({
|
||||
mapType: jsmap.JSMapType.MAP_3D,
|
||||
container: 'mapContainer',
|
||||
|
@ -1016,6 +1023,10 @@
|
|||
setInterval(function () {}, 3000)
|
||||
},
|
||||
methods: {
|
||||
showTime(){
|
||||
this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss');
|
||||
this.currentDay = this.$TOOL.dateFormat(new Date(), 'yyyy年MM月dd日')
|
||||
},
|
||||
getWarningTotal(){
|
||||
let that = this;
|
||||
that.$API.ecm.event.cateAgg.req(that.cateAggForm).then(res=>{
|
||||
|
|
|
@ -159,7 +159,7 @@ export default {
|
|||
try {
|
||||
var res1 = await this.$API.auth.info.get();
|
||||
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({
|
||||
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>
|
||||
<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"
|
||||
: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="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>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"></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"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
@selection-change="selectionChange"
|
||||
stripe
|
||||
@resetQuery="resetQuery"
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
|
||||
<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>
|
||||
<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="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>
|
||||
<script>
|
||||
import saveDialog from "./visit_form.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
|
||||
},
|
||||
});
|
||||
},
|
||||
<script>
|
||||
import saveDialog from "./visit_form.vue";
|
||||
import detialDialog from "./visit_detial.vue";
|
||||
|
||||
|
||||
//查看
|
||||
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>
|
||||
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: "已完成",
|
||||
},
|
||||
act_states: {
|
||||
0: "草稿中",//p
|
||||
1: "进行中",//p
|
||||
|
||||
2: "被退回",//d
|
||||
3: "被撤回",//d
|
||||
|
||||
4: "已完成",//s
|
||||
5: "已关闭",//d
|
||||
},
|
||||
};
|
||||
},
|
||||
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
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
//查看
|
||||
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
|
||||
stripe
|
||||
style="width: 100%;"
|
||||
height="500"
|
||||
height="400"
|
||||
highlight-current-row
|
||||
>
|
||||
<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>
|
||||
</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>
|
||||
</el-card>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<el-form ref="Form" :model="addForm" label-width="100px" label-position="right">
|
||||
<el-form-item label="处理人">
|
||||
<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 label="加签原因">
|
||||
<el-input type="textarea" :rows="3" v-model="addForm.suggestion" placeholder="加签原因"/>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<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="工作流名称" 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">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.view_permission_check">是</span>
|
||||
|
@ -46,8 +47,8 @@
|
|||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="addForm.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标识" prop="code">
|
||||
<el-input v-model="addForm.code" clearable></el-input>
|
||||
<el-form-item label="标识" prop="key">
|
||||
<el-input v-model="addForm.key" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="流水前缀">
|
||||
<el-input v-model="addForm.sn_prefix" clearable></el-input>
|
||||
|
@ -141,32 +142,34 @@
|
|||
this.type = 'add';
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
submitHandle() {
|
||||
submitHandle() {
|
||||
let that = this;
|
||||
debugger;
|
||||
console.log(that.addForm.view_permission_check);
|
||||
this.$refs.addForm.validate((valid) => {
|
||||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
let res = null;
|
||||
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();
|
||||
}
|
||||
that.submit();
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
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) {
|
||||
this.type = 'edit';
|
||||
|
|
Loading…
Reference in New Issue