|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-row :gutter="10">
|
|
|
- <el-col :span="4" :xs="24">
|
|
|
+ <!-- <el-col :span="4" :xs="24">
|
|
|
<org-tree
|
|
|
v-model="queryParams.orgId"
|
|
|
@click="clicktreenode"
|
|
|
@@ -16,11 +16,14 @@
|
|
|
:renderContent="renderContent"
|
|
|
>
|
|
|
</org-tree>
|
|
|
- </el-col>
|
|
|
- <el-col :span="20" :xs="24">
|
|
|
- <div class="main-right-box">
|
|
|
+ </el-col> -->
|
|
|
+ <el-col :span="24" :xs="24">
|
|
|
+ <div class="main-right-box">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div class="main-search-box" v-show="showSearch && rule">
|
|
|
+ <div v-if="rule" style="padding-bottom:10px;font-weight: 700;">
|
|
|
+ {{rule.name}}
|
|
|
+ </div>
|
|
|
<el-form
|
|
|
:model="queryParams"
|
|
|
ref="search"
|
|
|
@@ -53,7 +56,7 @@
|
|
|
icon="el-icon-search"
|
|
|
size="mini"
|
|
|
@click="refresh"
|
|
|
- v-hasPermi="['resumption:ruleManager']"
|
|
|
+ v-hasPermi="['resumption:rule:contentmanage']"
|
|
|
>搜索</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
@@ -69,8 +72,8 @@
|
|
|
icon="el-icon-plus"
|
|
|
@click="onAddItem()"
|
|
|
:disabled="rule ? false : true"
|
|
|
- v-hasPermi="['resumption:ruleManager:add']"
|
|
|
- v-if="rule && rule.orgId == orgId && rule.ruleStatus == 0"
|
|
|
+ v-hasPermi="['resumption:rule:contentmanage']"
|
|
|
+ v-if="rule && rule.orgId == orgId && rule.status == 0"
|
|
|
>新增履职项</el-button
|
|
|
>
|
|
|
<!-- <el-button
|
|
|
@@ -193,7 +196,7 @@
|
|
|
header-align="center"
|
|
|
label="操作"
|
|
|
width="150"
|
|
|
- v-if="rule && rule.orgId == orgId && rule.ruleStatus == 0"
|
|
|
+ v-if="rule && rule.orgId == orgId && rule.status == 0"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
@@ -201,7 +204,7 @@
|
|
|
size="mini"
|
|
|
icon="el-icon-edit-outline"
|
|
|
@click="onEditItem(scope.row.id)"
|
|
|
- v-hasPermi="['resumption:ruleManager:edit']"
|
|
|
+ v-hasPermi="['resumption:rule:contentmanage']"
|
|
|
>编辑</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
@@ -210,7 +213,7 @@
|
|
|
slot="reference"
|
|
|
icon="el-icon-delete"
|
|
|
@click="deldata(scope.row.id)"
|
|
|
- v-hasPermi="['resumption:ruleManager:remove']"
|
|
|
+ v-hasPermi="['resumption:rule:contentmanage']"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
|
@@ -239,6 +242,8 @@
|
|
|
import OrgTree from "@/components/orgTree";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import { page, treeData, del } from "@/api/resumption/ruleManager.js";
|
|
|
+import { get as getRule } from "@/api/resumption/rule.js";
|
|
|
+import { getLabel } from "./../../commonOption";
|
|
|
import DialogEdit from "./dialog.editItem.vue";
|
|
|
|
|
|
export default {
|
|
|
@@ -311,10 +316,24 @@ export default {
|
|
|
// await this.getassetlist();
|
|
|
},
|
|
|
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ let id = this.$route.params.id;
|
|
|
+ if (!id) {
|
|
|
+ this.$tab.closePageAndPushPrev();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ getRule(id).then((r) => {
|
|
|
+ this.rule = r.data;
|
|
|
+ // this.$tab.setPageTitle(r.data.name);
|
|
|
+ });
|
|
|
+ this.queryParams.ruleId = id;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
|
|
|
methods: {
|
|
|
treeData,
|
|
|
+ getLabel,
|
|
|
dakai() {
|
|
|
this.expandAll = !this.expandAll;
|
|
|
this.fresh = false;
|
|
|
@@ -346,7 +365,7 @@ export default {
|
|
|
this.tableData = data.rows;
|
|
|
this.total = Number.parseInt(data.total);
|
|
|
this.loading = false;
|
|
|
- },
|
|
|
+ },
|
|
|
clicktreenode(data, node) {
|
|
|
this.tableData = [];
|
|
|
this.rule = null;
|
|
|
@@ -359,7 +378,7 @@ export default {
|
|
|
this.queryParams.ruleId = data.id;
|
|
|
this.rule = data;
|
|
|
this.rule.orgId = node.parent.data.id;
|
|
|
- if (this.rule.ruleStatus != 0) {
|
|
|
+ if (this.rule.status != 0) {
|
|
|
this.$message.info("履职内容库已禁用,无法编辑履职项、履职内容");
|
|
|
}
|
|
|
this.refresh();
|
|
|
@@ -417,7 +436,7 @@ export default {
|
|
|
onSelect() {
|
|
|
this.$refs.DialogSelect.show();
|
|
|
},
|
|
|
- onSuccess(isAdd) {
|
|
|
+ onSuccess(isAdd) {
|
|
|
if (isAdd) {
|
|
|
this.queryParams.pageNum = 1;
|
|
|
}
|