|
@@ -307,7 +307,7 @@
|
|
|
>撤回</el-button
|
|
>撤回</el-button
|
|
|
>
|
|
>
|
|
|
<el-button
|
|
<el-button
|
|
|
- v-if="eqOrg(r.row)"
|
|
|
|
|
|
|
+ v-if="showEditBtn(r.row)"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
|
icon="el-icon-edit-outline"
|
|
icon="el-icon-edit-outline"
|
|
@@ -316,6 +316,14 @@
|
|
|
>编辑</el-button
|
|
>编辑</el-button
|
|
|
>
|
|
>
|
|
|
<el-button
|
|
<el-button
|
|
|
|
|
+ v-if="!showEditBtn(r.row)"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-edit-outline"
|
|
|
|
|
+ @click="onDetail(r.row.id)"
|
|
|
|
|
+ >详情</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
v-if="showDelete(r.row)"
|
|
v-if="showDelete(r.row)"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
@@ -344,6 +352,11 @@
|
|
|
:orgTypeOptions="orgTypeOptions"
|
|
:orgTypeOptions="orgTypeOptions"
|
|
|
:ruleTypeOptions="dict.type.rule_type"
|
|
:ruleTypeOptions="dict.type.rule_type"
|
|
|
></dialog-edit>
|
|
></dialog-edit>
|
|
|
|
|
+ <dialog-detail
|
|
|
|
|
+ ref="detailDialog"
|
|
|
|
|
+ :orgTypeOptions="orgTypeOptions"
|
|
|
|
|
+ :ruleTypeOptions="dict.type.rule_type"
|
|
|
|
|
+ ></dialog-detail>
|
|
|
<DialogDistribute ref="dialogDistribute" @select="sel"></DialogDistribute>
|
|
<DialogDistribute ref="dialogDistribute" @select="sel"></DialogDistribute>
|
|
|
<DialogThreeState ref="DialogThreeState"> </DialogThreeState>
|
|
<DialogThreeState ref="DialogThreeState"> </DialogThreeState>
|
|
|
</div>
|
|
</div>
|
|
@@ -354,6 +367,7 @@ import DialogDistribute from "@/views/resumption/plan/distribute.vue";
|
|
|
import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
|
|
import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
|
|
|
import { mapState, mapMutations, mapGetters } from "vuex";
|
|
import { mapState, mapMutations, mapGetters } from "vuex";
|
|
|
import DialogEdit from "./dialog.edit";
|
|
import DialogEdit from "./dialog.edit";
|
|
|
|
|
+import DialogDetail from "./dialog.detail";
|
|
|
import * as api from "@/api/resumption/plan";
|
|
import * as api from "@/api/resumption/plan";
|
|
|
import { statusOptions, getLabel } from "./../../commonOption";
|
|
import { statusOptions, getLabel } from "./../../commonOption";
|
|
|
import { allRole } from "@/api/system/role";
|
|
import { allRole } from "@/api/system/role";
|
|
@@ -373,6 +387,7 @@ export default {
|
|
|
OrgTree,
|
|
OrgTree,
|
|
|
DialogDistribute,
|
|
DialogDistribute,
|
|
|
DialogThreeState,
|
|
DialogThreeState,
|
|
|
|
|
+ DialogDetail
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
const { params, query } = this.$route;
|
|
const { params, query } = this.$route;
|
|
@@ -423,46 +438,32 @@ export default {
|
|
|
watch: {},
|
|
watch: {},
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters(["orgId", "orgName"]),
|
|
...mapGetters(["orgId", "orgName"]),
|
|
|
- orgTypeOptions(){
|
|
|
|
|
- if(!this.dict || !this.dict.type.sys_org_type==null) {
|
|
|
|
|
- return []
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return this.dict.type.sys_org_type.filter(t=>!["1","2","7","8"].includes(t.value))
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ orgTypeOptions() {
|
|
|
|
|
+ if (!this.dict || !this.dict.type.sys_org_type == null) {
|
|
|
|
|
+ return [];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return this.dict.type.sys_org_type.filter(
|
|
|
|
|
+ (t) => !["1", "2", "7", "8"].includes(t.value)
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
...mapMutations([]),
|
|
...mapMutations([]),
|
|
|
- //判断是否跟当前用户同机构
|
|
|
|
|
- eqOrg(row) {
|
|
|
|
|
|
|
+ //是否显示编辑按钮
|
|
|
|
|
+ showEditBtn(row) {
|
|
|
|
|
+ if (row == null || row == undefined) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //只能编辑所属机构是自己的
|
|
|
|
|
+ return row.planOfOrgId == this.orgId;
|
|
|
// console.log(row.planOfOrgId,"row.planOfOrgId");
|
|
// console.log(row.planOfOrgId,"row.planOfOrgId");
|
|
|
// console.log(this.orgId,"this.orgId");
|
|
// console.log(this.orgId,"this.orgId");
|
|
|
- if (
|
|
|
|
|
- row != null &&
|
|
|
|
|
- row != undefined &&
|
|
|
|
|
- (row.planCreateOrgId == this.orgId ||
|
|
|
|
|
- (row.planOfOrgType == 3 && row.planOfOrgId == this.orgId))
|
|
|
|
|
- ) {
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- return false;
|
|
|
|
|
},
|
|
},
|
|
|
- // eqOrg2(row) {
|
|
|
|
|
- // // console.log(row.planCreateOrgId,"row.planCreateOrgId");
|
|
|
|
|
- // // console.log(this.orgId,"this.orgId");
|
|
|
|
|
- // if (
|
|
|
|
|
- // row != null &&
|
|
|
|
|
- // row != undefined &&
|
|
|
|
|
- // row.planCreateOrgId == this.orgId &&
|
|
|
|
|
- // row.planOfOrgId == this.orgId
|
|
|
|
|
- // ) {
|
|
|
|
|
- // return true;
|
|
|
|
|
- // }
|
|
|
|
|
- // return false;
|
|
|
|
|
- // },
|
|
|
|
|
- showPublish(row) {
|
|
|
|
|
|
|
+ showPublish(row) {
|
|
|
//有父计划且父计划不是使用中状态,不能下发
|
|
//有父计划且父计划不是使用中状态,不能下发
|
|
|
- if (row.parentStatus != 1 && row.parentId>0) {
|
|
|
|
|
|
|
+ if (row.parentStatus != 1 && row.parentId > 0) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
//可以下发:本机构创建+状态为草稿、停用的计划
|
|
//可以下发:本机构创建+状态为草稿、停用的计划
|
|
@@ -486,7 +487,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
showDelete(row) {
|
|
showDelete(row) {
|
|
|
//本机构创建的计划,才能删除
|
|
//本机构创建的计划,才能删除
|
|
|
- return row.planCreateOrgId == this.orgId && row.planOfOrgId==this.orgId;
|
|
|
|
|
|
|
+ return row.planCreateOrgId == this.orgId && row.planOfOrgId == this.orgId;
|
|
|
},
|
|
},
|
|
|
showWithDraw(row) {
|
|
showWithDraw(row) {
|
|
|
//本机构创建是自己+状态为使用中
|
|
//本机构创建是自己+状态为使用中
|
|
@@ -707,6 +708,9 @@ export default {
|
|
|
onEdit(id, other = {}) {
|
|
onEdit(id, other = {}) {
|
|
|
this.$refs.editDialog.show(id, other);
|
|
this.$refs.editDialog.show(id, other);
|
|
|
},
|
|
},
|
|
|
|
|
+ onDetail(id) {
|
|
|
|
|
+ this.$refs.detailDialog.show(id);
|
|
|
|
|
+ },
|
|
|
async onDel(row) {
|
|
async onDel(row) {
|
|
|
let msg = "";
|
|
let msg = "";
|
|
|
if (row.planStatus == 0) {
|
|
if (row.planStatus == 0) {
|