This commit is contained in:
曹前明 2022-07-18 11:16:39 +08:00
commit 7a7e8d7066
5 changed files with 325 additions and 226 deletions

View File

@ -262,15 +262,6 @@ export default {
return await http.post(this.url,data); return await http.post(this.url,data);
} }
}, },
/*update: {
name: "更新岗位",
req: async function(id, data){
return await http.put(
`${config.API_URL}/system/post_role/${id}/`,
data
);
}
},*/
delete: { delete: {
name: "删除岗位", name: "删除岗位",
req: async function(id){ req: async function(id){

View File

@ -34,6 +34,7 @@ const routes = [
"title": "首页", "title": "首页",
"icon": "el-icon-home-filled", "icon": "el-icon-home-filled",
"type": "menu", "type": "menu",
"perms": ["home"]
}, },
"children": [ "children": [
{ {
@ -43,6 +44,7 @@ const routes = [
"title": "控制台", "title": "控制台",
"icon": "el-icon-monitor", "icon": "el-icon-monitor",
"affix": true, "affix": true,
"perms": ["dashboard"]
}, },
"component": "home" "component": "home"
}, },
@ -52,7 +54,8 @@ const routes = [
"meta": { "meta": {
"title": "驾驶舱", "title": "驾驶舱",
"icon": "el-icon-position", "icon": "el-icon-position",
"fullpage": true "fullpage": true,
"perms": ["bigScreen"]
}, },
"component": "bigScreen" "component": "bigScreen"
}, },
@ -61,7 +64,8 @@ const routes = [
"path": "/usercenter", "path": "/usercenter",
"meta": { "meta": {
"title": "帐号信息", "title": "帐号信息",
"icon": "el-icon-user" "icon": "el-icon-user",
"perms": ["userCenter"]
}, },
"component": "userCenter" "component": "userCenter"
} }
@ -74,6 +78,7 @@ const routes = [
"title": "事件", "title": "事件",
"icon": "el-icon-goods-filled", "icon": "el-icon-goods-filled",
"type": "menu", "type": "menu",
"perms": ["ecm"]
}, },
"children": [ "children": [
{ {
@ -114,6 +119,7 @@ const routes = [
"meta": { "meta": {
"title": "我的事件", "title": "我的事件",
"icon": "el-icon-document-remove", "icon": "el-icon-document-remove",
"perms": ["myevent"]
}, },
"component": "ecm/myevent" "component": "ecm/myevent"
}, },
@ -123,6 +129,7 @@ const routes = [
"meta": { "meta": {
"title": "提醒配置", "title": "提醒配置",
"icon": "el-icon-setting", "icon": "el-icon-setting",
"perms": ["notify_setting"]
}, },
"component": "ecm/notify_setting" "component": "ecm/notify_setting"
}, },
@ -133,6 +140,7 @@ const routes = [
"meta": { "meta": {
"title": "算法配置", "title": "算法配置",
"icon": "el-icon-setting", "icon": "el-icon-setting",
"perms": ["algo"]
}, },
"component": "ecm/algo" "component": "ecm/algo"
} }
@ -144,7 +152,8 @@ const routes = [
"meta": { "meta": {
"title": "工单", "title": "工单",
"icon": "el-icon-circle-check-filled", "icon": "el-icon-circle-check-filled",
"type": "menu" "type": "menu",
"perms": ["wf"]
}, },
"children": [ "children": [
{ {
@ -153,6 +162,7 @@ const routes = [
"meta": { "meta": {
"title": "工作流", "title": "工作流",
"icon": "el-icon-guide", "icon": "el-icon-guide",
"perms": ["workflow"]
}, },
"component": "wf/workflow" "component": "wf/workflow"
}, },
@ -173,6 +183,7 @@ const routes = [
"meta": { "meta": {
"title": "全部工单", "title": "全部工单",
"icon": "el-icon-folder", "icon": "el-icon-folder",
"perms": ["allwork"]
}, },
"component": "wf/allwork" "component": "wf/allwork"
@ -183,7 +194,7 @@ const routes = [
"meta": { "meta": {
"title": "我创建的", "title": "我创建的",
"icon": "el-icon-folder-add", "icon": "el-icon-folder-add",
"perms": ["ownerwork"]
}, },
"component": "wf/ownerwork" "component": "wf/ownerwork"
} }
@ -195,7 +206,7 @@ const routes = [
"meta": { "meta": {
"title": "待办工单", "title": "待办工单",
"icon": "el-icon-folder-opened", "icon": "el-icon-folder-opened",
"perms": ["duyt"]
}, },
"component": "wf/dutywork" "component": "wf/dutywork"
}, },
@ -205,7 +216,7 @@ const routes = [
"meta": { "meta": {
"title": "我处理的", "title": "我处理的",
"icon": "el-icon-expand", "icon": "el-icon-expand",
"perms": ["worked"]
}, },
"component": "wf/worked" "component": "wf/worked"
}, },
@ -215,7 +226,7 @@ const routes = [
"meta": { "meta": {
"title": "抄送我的", "title": "抄送我的",
"icon": "el-icon-edit-pen", "icon": "el-icon-edit-pen",
"perms": ["ccwork"]
}, },
"component": "wf/ccwork" "component": "wf/ccwork"
}, },
@ -240,7 +251,8 @@ const routes = [
"meta": { "meta": {
"title": "作业", "title": "作业",
"icon": "el-icon-list", "icon": "el-icon-list",
"type": "menu" "type": "menu",
"perms": ["opm"]
}, },
"children": [ "children": [
{ {
@ -249,6 +261,7 @@ const routes = [
"meta": { "meta": {
"title": "作业列表", "title": "作业列表",
"icon": "el-icon-tickets", "icon": "el-icon-tickets",
"perms": ["operation"]
}, },
"component": "opm/operation" "component": "opm/operation"
}, },
@ -258,6 +271,7 @@ const routes = [
"meta": { "meta": {
"title": "许可证分类", "title": "许可证分类",
"icon": "el-icon-ticket", "icon": "el-icon-ticket",
"perms": ["oplcate"]
}, },
"component": "opm/oplcate" "component": "opm/oplcate"
}, },
@ -369,7 +383,8 @@ const routes = [
"meta": { "meta": {
"title": "相关方", "title": "相关方",
"icon": "el-icon-avatar", "icon": "el-icon-avatar",
"type": "menu" "type": "menu",
"perms": ["rpm"]
}, },
"children": [ "children": [
{ {
@ -378,6 +393,7 @@ const routes = [
"meta": { "meta": {
"title": "相关方列表", "title": "相关方列表",
"icon": "el-icon-tickets", "icon": "el-icon-tickets",
"perms": ["rparty"]
}, },
"component": "rpm/rparty" "component": "rpm/rparty"
}, },
@ -387,6 +403,7 @@ const routes = [
"meta": { "meta": {
"title": "相关方人员", "title": "相关方人员",
"icon": "el-icon-user", "icon": "el-icon-user",
"perms": ["remployee"]
}, },
"component": "rpm/remployee" "component": "rpm/remployee"
}, },
@ -396,6 +413,7 @@ const routes = [
"meta": { "meta": {
"title": "人员证书", "title": "人员证书",
"icon": "el-icon-postcard", "icon": "el-icon-postcard",
"perms": ["rcertificate"]
}, },
"component": "rpm/rcertificate" "component": "rpm/rcertificate"
}, },
@ -405,6 +423,7 @@ const routes = [
"meta": { "meta": {
"title": "资料库", "title": "资料库",
"icon": "el-icon-shopping-bag", "icon": "el-icon-shopping-bag",
"perms": ["rfile"]
}, },
"component": "rpm/rfile" "component": "rpm/rfile"
}, },
@ -414,6 +433,7 @@ const routes = [
"meta": { "meta": {
"title": "入厂项目", "title": "入厂项目",
"icon": "el-icon-calendar", "icon": "el-icon-calendar",
"perms": ["rpj"]
}, },
"component": "rpm/rpj" "component": "rpm/rpj"
}, },
@ -436,7 +456,8 @@ const routes = [
"meta": { "meta": {
"title": "访客", "title": "访客",
"icon": "el-icon-user-filled", "icon": "el-icon-user-filled",
"type": "menu" "type": "menu",
"perms": ["vm"]
}, },
"children": [ "children": [
{ {
@ -445,6 +466,7 @@ const routes = [
"meta": { "meta": {
"title": "来访项目", "title": "来访项目",
"icon": "el-icon-tickets", "icon": "el-icon-tickets",
"perms": ["visit"]
}, },
"component": "vm/visit" "component": "vm/visit"
}, },
@ -454,6 +476,7 @@ const routes = [
"meta": { "meta": {
"title": "来访人员", "title": "来访人员",
"icon": "el-icon-user", "icon": "el-icon-user",
"perms": ["visitor"]
}, },
"component": "vm/visitor" "component": "vm/visitor"
},{ },{
@ -486,7 +509,8 @@ const routes = [
"meta": { "meta": {
"title": "区域", "title": "区域",
"icon": "el-icon-location-filled", "icon": "el-icon-location-filled",
"type": "menu" "type": "menu",
"perms": ["am"]
}, },
"children": [ "children": [
{ {
@ -495,6 +519,7 @@ const routes = [
"meta": { "meta": {
"title": "区域列表", "title": "区域列表",
"icon": "el-icon-tickets", "icon": "el-icon-tickets",
"perms": ["area"]
}, },
"component": "am/area" "component": "am/area"
}, },
@ -504,6 +529,7 @@ const routes = [
"meta": { "meta": {
"title": "门禁通道", "title": "门禁通道",
"icon": "el-icon-phone", "icon": "el-icon-phone",
"perms": ["eqm"]
}, },
"component": "am/em1" "component": "am/em1"
}, },
@ -513,6 +539,7 @@ const routes = [
"meta": { "meta": {
"title": "视频通道", "title": "视频通道",
"icon": "el-icon-video-camera", "icon": "el-icon-video-camera",
"perms": ["monitor"]
}, },
"component": "am/monitor" "component": "am/monitor"
}, },
@ -522,6 +549,7 @@ const routes = [
"meta": { "meta": {
"title": "喇叭通道", "title": "喇叭通道",
"icon": "el-icon-mic", "icon": "el-icon-mic",
"perms": ["audio"]
}, },
"component": "am/audio" "component": "am/audio"
},{ },{
@ -530,6 +558,7 @@ const routes = [
"meta": { "meta": {
"title": "定位标签", "title": "定位标签",
"icon": "el-icon-map-location", "icon": "el-icon-map-location",
"perms": ["blt"]
}, },
"component": "am/blt" "component": "am/blt"
}, },
@ -541,7 +570,8 @@ const routes = [
"meta": { "meta": {
"title": "人事", "title": "人事",
"icon": "el-icon-platform", "icon": "el-icon-platform",
"type": "menu" "type": "menu",
"perms": ["hrm"]
}, },
"children": [ "children": [
@ -551,6 +581,7 @@ const routes = [
"meta": { "meta": {
"title": "企业员工", "title": "企业员工",
"icon": "el-icon-user", "icon": "el-icon-user",
"perms": ["employee"]
}, },
"component": "hrm/employee" "component": "hrm/employee"
} }
@ -561,6 +592,7 @@ const routes = [
"meta": { "meta": {
"title": "证书列表", "title": "证书列表",
"icon": "el-icon-tickets", "icon": "el-icon-tickets",
"perms": ["certificates"]
}, },
"component": "hrm/certificates" "component": "hrm/certificates"
} }
@ -571,7 +603,8 @@ const routes = [
"meta": { "meta": {
"title": "相关证书", "title": "相关证书",
"icon": "el-icon-menu", "icon": "el-icon-menu",
"hidden": true "hidden": true,
"perms": ["certificates"]
}, },
"component": "hrm/certificate" "component": "hrm/certificate"
}, },
@ -584,7 +617,8 @@ const routes = [
"meta": { "meta": {
"title": "系统", "title": "系统",
"icon": "el-icon-tools", "icon": "el-icon-tools",
"type": "menu" "type": "menu",
"perms": ["sys"]
}, },
"children": [ "children": [
{ {
@ -593,7 +627,8 @@ const routes = [
"meta": { "meta": {
"title": "账户管理", "title": "账户管理",
"icon": "el-icon-user", "icon": "el-icon-user",
"type": "menu" "type": "menu",
"perms": ["user"]
}, },
"component": "sys/user" "component": "sys/user"
}, },
@ -603,7 +638,8 @@ const routes = [
"meta": { "meta": {
"title": "部门管理", "title": "部门管理",
"icon": "sc-icon-organization", "icon": "sc-icon-organization",
"type": "menu" "type": "menu",
"perms": ["dept"]
}, },
"component": "sys/dept" "component": "sys/dept"
}, },
@ -613,7 +649,8 @@ const routes = [
"meta": { "meta": {
"title": "岗位管理", "title": "岗位管理",
"icon": "el-icon-postcard", "icon": "el-icon-postcard",
"type": "menu" "type": "menu",
"perms": ["post"]
}, },
"component": "sys/post" "component": "sys/post"
}, },
@ -623,7 +660,8 @@ const routes = [
"meta": { "meta": {
"title": "角色管理", "title": "角色管理",
"icon": "el-icon-notebook", "icon": "el-icon-notebook",
"type": "menu" "type": "menu",
"perms": ["role"]
}, },
"component": "sys/role" "component": "sys/role"
}, },
@ -633,7 +671,8 @@ const routes = [
"meta": { "meta": {
"title": "字典管理", "title": "字典管理",
"icon": "el-icon-document", "icon": "el-icon-document",
"type": "menu" "type": "menu",
"perms": ["dict"]
}, },
"component": "sys/dict" "component": "sys/dict"
}, },
@ -643,7 +682,8 @@ const routes = [
"meta": { "meta": {
"title": "计划任务", "title": "计划任务",
"icon": "el-icon-alarm-clock", "icon": "el-icon-alarm-clock",
"type": "menu" "type": "menu",
"perms": ["task"]
}, },
"component": "sys/task" "component": "sys/task"
} }

View File

@ -1,199 +1,259 @@
<template> <template>
<el-container> <el-container>
<el-aside width="40%"> <el-aside width="40%">
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<div style="margin-right: 20px">岗位列表</div> <div style="margin-right: 20px">岗位列表</div>
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button> <el-button
</div> type="primary"
</el-header> icon="el-icon-plus"
<el-main class="nopadding"> @click="add"
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick" ></el-button>
:hidePagination="true"> </div>
<!-- <el-table-column type="selection" width="50"></el-table-column> --> </el-header>
<el-table-column label="" type="index"></el-table-column> <el-main class="nopadding">
<el-table-column label="名称" prop="name" width="120"></el-table-column> <scTable
<el-table-column label="标识" prop="code" width="60"></el-table-column> ref="table"
<el-table-column label="最短在岗(h)" prop="min_hour" width="100"></el-table-column> :apiObj="apiObj"
<el-table-column label="最长在岗(h)" prop="max_hour" width="100"></el-table-column> row-key="id"
<el-table-column label="操作" fixed="right" align="right"> stripe
<template #default="scope"> highlightCurrentRow
<el-button type="warning" link size="small" @click="table_edit(scope.row)">编辑 @row-click="rowClick"
</el-button> :hidePagination="true"
</template> >
</el-table-column> <!-- <el-table-column type="selection" width="50"></el-table-column> -->
</scTable> <el-table-column label="" type="index"></el-table-column>
</el-main> <el-table-column
</el-container> label="名称"
</el-aside> prop="name"
<el-container> width="120"
<el-header> ></el-table-column>
<div class="left-panel"> <el-table-column
<div style="margin-right: 20px">岗位权限</div> label="标识"
<el-button type="primary" icon="el-icon-plus" @click="addPostRole"></el-button> prop="code"
<el-button type="danger" plain icon="el-icon-delete" @click="delPostRole"></el-button> width="60"
</div> ></el-table-column>
</el-header> <el-table-column
<el-main class="nopadding"> label="最短在岗(h)"
<scTable ref="table2" :apiObj="apiObj2" row-key="id" stripe :hidePagination="true"> prop="min_hour"
<!-- <el-table-column type="selection" width="50"></el-table-column> --> width="100"
<el-table-column label="" type="index"></el-table-column> ></el-table-column>
<el-table-column label="所属岗位" prop="post" min-width="80"> <el-table-column
<template #default="scope">{{scope.row.post_.name}}</template> label="最长在岗(h)"
</el-table-column> prop="max_hour"
<el-table-column label="拥有角色" prop="role" min-width="80"> width="100"
<template #default="scope">{{scope.row.role_.name}}</template> ></el-table-column>
</el-table-column> <el-table-column label="操作" fixed="right" align="right">
<el-table-column label="权限范围" prop="data_range" min-width="80"> <template #default="scope">
<template #default="scope">{{options[scope.row.data_range]}}</template> <el-button
</el-table-column> type="warning"
<el-table-column label="操作" fixed="right" align="right"> link
<template #default="scope"> size="small"
<el-button type="warning" link size="small" @click="postRoleEdit(scope.row)">编辑 @click="table_edit(scope.row)"
</el-button> >编辑
<el-button type="warning" link size="small" @click="postRoleDel(scope.row)">删除 </el-button>
</el-button> </template>
</template> </el-table-column>
</el-table-column> </scTable>
</scTable> </el-main>
</el-main> </el-container>
</el-container> </el-aside>
</el-container> <el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" <el-header>
@closed="dialog.save=false"></save-dialog> <div class="left-panel">
<save-role-dialog v-if="dialog.roleSave" ref="saveRoleDialog" @success="handleSaveRoleSuccess" <div style="margin-right: 20px">岗位权限</div>
@closed="dialog.roleSave=false"></save-role-dialog> <el-button
type="primary"
icon="el-icon-plus"
@click="addPostRole"
></el-button>
<el-button
type="danger"
plain
icon="el-icon-delete"
@click="delPostRole"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table2"
:apiObj="apiObj2"
row-key="id"
stripe
:hidePagination="true"
>
<!-- <el-table-column type="selection" width="50"></el-table-column> -->
<el-table-column label="" type="index"></el-table-column>
<el-table-column label="所属岗位" prop="post" min-width="80">
<template #default="scope">{{ scope.row.post_.name }}</template>
</el-table-column>
<el-table-column label="拥有角色" prop="role" min-width="80">
<template #default="scope">{{ scope.row.role_.name }}</template>
</el-table-column>
<el-table-column label="权限范围" prop="data_range" min-width="80">
<template #default="scope">{{
options[scope.row.data_range]
}}</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="right">
<template #default="scope">
<el-button
type="warning"
link
size="small"
@click="postRoleDel(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</el-container>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
<save-role-dialog
v-if="dialog.roleSave"
ref="saveRoleDialog"
@success="handleSaveRoleSuccess"
@closed="dialog.roleSave = false"
></save-role-dialog>
</template> </template>
<script> <script>
import saveDialog from './post_form.vue' import saveDialog from "./post_form.vue";
import saveRoleDialog from './post_role_form.vue' import saveRoleDialog from "./post_role_form.vue";
export default { export default {
name: 'listSon', name: "listSon",
components: { components: {
saveDialog, saveDialog,
saveRoleDialog, saveRoleDialog,
}, },
data() { data() {
return { return {
apiObj: this.$API.system.post.list, apiObj: this.$API.system.post.list,
apiObj2: this.$API.system.postrole.list, apiObj2: this.$API.system.postrole.list,
dialog: { dialog: {
save: false, save: false,
roleSave: false, roleSave: false,
}, },
selection: [], selection: [],
postId:'', postId: "",
options: { options: {
10: "全部", 10: "全部",
20: "自定义", 20: "自定义",
30: "同级及以下", 30: "同级及以下",
40: "本级及以下", 40: "本级及以下",
50: "本级", 50: "本级",
60: "仅本人" 60: "仅本人",
}, },
} };
}, },
methods: { methods: {
rowClick(row) { rowClick(row) {
let params = { let params = {
post: row.id post: row.id,
}; };
this.postId = row.id; this.apiObj2 = this.$API.system.postrole.list;
this.$refs.table2.reload(params) this.postId = row.id;
}, this.$refs.table2.reload(params);
// },
add() { //
this.dialog.save = true; add() {
this.$nextTick(() => { this.dialog.save = true;
this.$refs.saveDialog.open() this.$nextTick(() => {
}) this.$refs.saveDialog.open();
}, });
// },
table_edit(row) { //
this.dialog.save = true; table_edit(row) {
this.$nextTick(() => { this.dialog.save = true;
this.$refs.saveDialog.open('edit').setData(row) this.$nextTick(() => {
}) this.$refs.saveDialog.open("edit").setData(row);
}, });
// },
async batch_del() { //
var confirmRes = await this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?`, '提示', { async batch_del() {
type: 'warning', var confirmRes = await this.$confirm(
confirmButtonText: '删除', `确定删除选中的 ${this.selection.length} 项吗?`,
confirmButtonClass: 'el-button--danger' "提示",
}).catch(() => { {
}) type: "warning",
confirmButtonText: "删除",
confirmButtonClass: "el-button--danger",
}
).catch(() => {});
if (!confirmRes) { if (!confirmRes) {
return false return false;
} }
var ids = this.selection.map(v => v.id) var ids = this.selection.map((v) => v.id);
this.$refs.table.removeKeys(ids) this.$refs.table.removeKeys(ids);
this.$message.success("操作成功") this.$message.success("操作成功");
},
//
handleSaveSuccess(data, mode) {
//
if (mode == "add") {
this.$refs.table.unshiftRow(data);
} else if (mode == "edit") {
this.$refs.table.updateKey(data);
}
}, //
// // this.$refs.table.refresh()
handleSaveSuccess(data, mode) { },
// //
if (mode == 'add') { handleSaveRoleSuccess() {
this.$refs.table.unshiftRow(data) this.$refs.table2.refresh();
} else if (mode == 'edit') { },
this.$refs.table.updateKey(data) addPostRole() {
} this.dialog.roleSave = true;
this.$nextTick(() => {
// this.$refs.saveRoleDialog.open("add").setData({ postId: this.postId });
// this.$refs.table.refresh() });
}, },
// postRoleEdit(row) {
handleSaveRoleSuccess() { this.dialog.roleSave = true;
this.$refs.table2.refresh() this.$nextTick(() => {
}, this.$refs.saveRoleDialog.open("edit").setData(row);
addPostRole(){ });
this.dialog.roleSave = true; },
this.$nextTick(() => { delPostRole() {},
this.$refs.saveRoleDialog.open("add").setData({postId:this.postId}) closed() {
}) this.dialog.save = false;
}, this.dialog.roleSave = false;
postRoleEdit(row){ this.postId = "";
this.dialog.roleSave = true; this.$refs.table2.refresh();
this.$nextTick(() => { },
this.$refs.saveRoleDialog.open("edit").setData(row) postRoleDel(row) {
}) this.$confirm(`确定删除选中的岗位关系吗?`, "提示", {
}, type: "warning",
delPostRole(){ })
.then(() => {
}, this.$API.system.postrole.delete.req(row.id).then((res) => {
closed(){ if (res.err_msg) {
this.dialog.save = false; this.$message.error(res.err_msg);
this.dialog.roleSave = false; } else {
this.postId = ''; const loading = this.$loading();
this.$refs.table2.refresh(); this.$refs.table2.refresh();
}, loading.close();
postRoleDel(row){ this.$message.success("操作成功");
this.$confirm(`确定删除选中的岗位关系吗?`, '提示', { }
type: 'warning' });
}).then(() => { })
this.$API.system.postrole.delete.req(row.id).then(res=>{ .catch(() => {});
if(res.err_msg){ },
this.$message.error(res.err_msg) },
}else{ };
const loading = this.$loading();
this.$refs.table2.refresh();
loading.close();
this.$message.success("操作成功")
}
})
}).catch(() => {
})
},
}
}
</script> </script>
<style> <style>

View File

@ -133,6 +133,7 @@ export default {
}, },
// //
async submit() { async submit() {
var valid = await this.$refs.form.validate().catch(() => {}); var valid = await this.$refs.form.validate().catch(() => {});
if (!valid) { if (!valid) {
return false; return false;
@ -140,11 +141,9 @@ export default {
this.isSaveing = true; this.isSaveing = true;
try { try {
let res; let res;
if (this.mode === "add") {
res = await this.$API.system.postrole.create.req(this.form); res = await this.$API.system.postrole.create.req(this.form);
} else if (this.mode === "edit") {
res = await this.$API.system.postrole.update.req(this.form.id, this.form);
}
this.isSaveing = false; this.isSaveing = false;
this.$emit("success", this.form, this.mode); this.$emit("success", this.form, this.mode);
this.visible = false; this.visible = false;

View File

@ -46,10 +46,10 @@
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='rparty'"> <el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='rparty'">
<el-descriptions title="来访信息" :column="3"> <el-descriptions title="来访信息" :column="3">
<el-descriptions-item label="工单流水号:"> <el-descriptions-item label="工单流水号:">
<!--{{ticketDetail.sn }}--> {{ticketDetail.sn }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="相关方:"> <el-descriptions-item label="相关方:">
<!--{{rpjDetail.name }}--> {{rpjDetail.name }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="入厂项目:"> <el-descriptions-item label="入厂项目:">
<!--{{rpjDetail.company }}--> <!--{{rpjDetail.company }}-->
@ -194,9 +194,16 @@
this.ticketId = this.$route.query.id; this.ticketId = this.$route.query.id;
this.type = this.$route.query.type; this.type = this.$route.query.type;
this.projectId = this.$route.query.projectId; this.projectId = this.$route.query.projectId;
this.cateType = this.$route.query.catetype;
if(this.cateType==='visit'){
this.getVisit();
}else if(this.cateType==='rparty'){
this.getVisit();
}
this.getticketItem(); this.getticketItem();
this.getVisit();
this.getBtns(); this.getBtns();
this.getRpj();
}, },
methods: { methods: {
@ -222,7 +229,9 @@
// //
getRpj(){ getRpj(){
this.$API.rpmrpj.item.req(this.projectId).then((res) => {
this.rpjDetail = res;
});
}, },
//-start //-start
addNode(){ addNode(){