|
|
@@ -121,7 +121,7 @@
|
|
|
v-if="columns[5].visible"
|
|
|
></el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
- <template slot-scope="r" v-if="orgId==r.row.orgId">
|
|
|
+ <template slot-scope="r" v-if="orgId == r.row.orgId">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
@@ -130,12 +130,16 @@
|
|
|
v-hasPermi="['safetycheck:rule:edit']"
|
|
|
>编辑</el-button
|
|
|
>
|
|
|
- <el-popconfirm
|
|
|
- title="确定删除检查内容库定义?"
|
|
|
- @confirm="onDel(r.row.id)"
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ slot="reference"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="onDel(r.row.id)"
|
|
|
+ v-if="orgId == r.row.orgId"
|
|
|
+ v-hasPermi="['safetycheck:rule:remove']"
|
|
|
+ >删除</el-button
|
|
|
>
|
|
|
- <el-button type="text" size="small" slot="reference" icon="el-icon-delete" v-hasPermi="['safetycheck:rule:remove']">删除</el-button>
|
|
|
- </el-popconfirm>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -160,11 +164,11 @@
|
|
|
|
|
|
<script>
|
|
|
import OrgTree from "@/components/orgTree";
|
|
|
-import { mapGetters} from "vuex";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
import DialogEdit from "./dialog.edit";
|
|
|
import * as api from "@/api/safetycheck/rule";
|
|
|
import { getLabel } from "./../../commonOption";
|
|
|
-import {wholeTreeByType} from "@/api/system/org.js"
|
|
|
+import { wholeTreeByType } from "@/api/system/org.js";
|
|
|
export default {
|
|
|
name: "safetycheckruletype",
|
|
|
dicts: ["sys_org_type", "plan_status"],
|
|
|
@@ -190,7 +194,7 @@ export default {
|
|
|
name: null,
|
|
|
type: null,
|
|
|
orgType: null,
|
|
|
- checkSub:true,
|
|
|
+ checkSub: true,
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
|
|
|
@@ -211,11 +215,11 @@ export default {
|
|
|
props: {},
|
|
|
watch: {},
|
|
|
computed: {
|
|
|
- ...mapGetters(['orgId']),
|
|
|
+ ...mapGetters(["orgId"]),
|
|
|
},
|
|
|
methods: {
|
|
|
getLabel,
|
|
|
- orgTree(){
|
|
|
+ orgTree() {
|
|
|
return wholeTreeByType(3);
|
|
|
},
|
|
|
refresh() {
|
|
|
@@ -246,10 +250,16 @@ export default {
|
|
|
onEdit(id, other = {}) {
|
|
|
this.$refs.editDialog.show(id, other);
|
|
|
},
|
|
|
- async onDel(id) {
|
|
|
- await api.remove(id);
|
|
|
- this.$message.info("删除成功");
|
|
|
- this.getList();
|
|
|
+ onDel(id) {
|
|
|
+ this.$modal
|
|
|
+ .confirm("确定删除检查内容库定义?")
|
|
|
+ .then(() => {
|
|
|
+ return api.remove(id);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$message.info("删除成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|