|
|
@@ -292,9 +292,9 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="备注" prop="remark">
|
|
|
- <el-input v-model="form.remark" placeholder="请输入备注"/>
|
|
|
- </el-form-item>
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
+ <el-input v-model="form.remark" placeholder="请输入备注"/>
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-col :span="14">
|
|
|
@@ -313,14 +313,23 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {listPlan, getPlan, delPlan, addPlan, updatePlan, listPlanRole, roleList, publishPlan} from "@/api/core/edu/plan";
|
|
|
+import {
|
|
|
+ listPlan,
|
|
|
+ getPlan,
|
|
|
+ delPlan,
|
|
|
+ addPlan,
|
|
|
+ updatePlan,
|
|
|
+ listPlanRole,
|
|
|
+ roleList,
|
|
|
+ publishPlan
|
|
|
+} from "@/api/core/edu/plan";
|
|
|
import OrgTree from "@/components/orgTree";
|
|
|
import {deptTreeSelect} from "@/api/system/public";
|
|
|
import {formatTime} from "@/utils/ruoyi";
|
|
|
|
|
|
export default {
|
|
|
name: "Plan",
|
|
|
- dicts: ['plan_cycle', 'sys_org_type', 'plan_status','edu_plan_cycle'],
|
|
|
+ dicts: ['plan_cycle', 'sys_org_type', 'plan_status', 'edu_plan_cycle'],
|
|
|
components: {OrgTree},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -396,6 +405,7 @@ export default {
|
|
|
},
|
|
|
//初始化所有角色数据
|
|
|
initRoleList(query) {
|
|
|
+ this.form.planRoleId=[];
|
|
|
roleList(query).then(response => {
|
|
|
this.roleList = response.data;
|
|
|
});
|
|
|
@@ -427,14 +437,15 @@ export default {
|
|
|
return row.belongOrgId === this.$store.getters.orgId
|
|
|
},
|
|
|
checkCanDel(row) {
|
|
|
- return row.belongOrgId === this.$store.getters.orgId || row.createByTopOrg === 0
|
|
|
+ //计划创建机构为当前机构且不是顶级机构创建的计划才显示“删除”按钮
|
|
|
+ return row.belongOrgId == this.$store.getters.orgId && row.createByTopOrg == 0
|
|
|
},
|
|
|
//省联社下发的计划不显示“删除”按钮
|
|
|
checkCreateByTopOrg(row) {
|
|
|
return row.createByTopOrg !== 1
|
|
|
},
|
|
|
- execOrgTypeChanged(row){
|
|
|
- console.log("this.form.execOrgType",this.form.execOrgType);
|
|
|
+ execOrgTypeChanged(row) {
|
|
|
+ console.log("this.form.execOrgType", this.form.execOrgType);
|
|
|
this.initRoleList(this.form.execOrgType);
|
|
|
},
|
|
|
/** 查询机构树数据 */
|
|
|
@@ -510,16 +521,7 @@ export default {
|
|
|
this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
- /** 新增按钮操作 */
|
|
|
- handlePublish(row) {
|
|
|
- if (row.id != null) {
|
|
|
- publishPlan(row.id).then(response => {
|
|
|
- this.$modal.msgSuccess("下发成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
this.initRoleList();
|
|
|
@@ -571,6 +573,18 @@ export default {
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
+ /** 下发计划 */
|
|
|
+ handlePublish(row) {
|
|
|
+ if (row.id != null) {
|
|
|
+ this.$modal.confirm('是否确认下发该计划?').then(function () {
|
|
|
+ return publishPlan(row.id);
|
|
|
+ }).then(() => {
|
|
|
+ this.$modal.msgSuccess("计划下发成功");
|
|
|
+ this.getList();
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
this.download('system/plan/export', {
|