This commit is contained in:
13684185576
2025-07-21 21:28:27 +08:00
parent 70b122071c
commit 11ec0b2d13
476 changed files with 125535 additions and 164 deletions

View File

@ -10,7 +10,7 @@
</el-icon>
<span>新增</span>
</el-button>
<el-button type="primary" @click="deletList(null)" :disabled="ids.length == 0" typeof="danger">
<el-button type="primary" @click="deletList(null)" :disabled="ids.length == 0" typeof="danger">
<el-icon>
<CirclePlus />
</el-icon>
@ -23,33 +23,28 @@
</div>
<div class="tabBox">
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData"
>
<template #qclx="{ row }">
<dict-tag :value="row.qclx" :options="D_BZ_QCLX" :tag="false"/>
</template>
<template #qcjb="{ row }">
<dict-tag :options="D_BZ_QCDJ" :value="row.qcjb" :tag="false" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-button @click="addEditForm('eidt',row)" size="small">编辑</el-button>
<el-button @click="deletList(row.id)" type="danger" size="small">删除</el-button>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="tableHeight" :pageConfiger="{...pageData.pageConfiger,total: pageData.total}" />
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
<template #qclx="{ row }">
<dict-tag :value="row.qclx" :options="D_BZ_QCLX" :tag="false" />
</template>
<template #qcjb="{ row }">
<dict-tag :options="D_BZ_QCDJ" :value="row.qcjb" :tag="false" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-button @click="addEditForm('eidt', row)" size="small">编辑</el-button>
<el-button @click="deletList(row.id)" type="danger" size="small">删除</el-button>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="tableHeight"
:pageConfiger="{ ...pageData.pageConfiger, total: pageData.total }" />
</div>
</div>
</div>
<!-- 新增 -->
<EditAddForm ref="editInfo" @updateDate="getList" :dic="{D_BZ_QCLX,D_BZ_QCDJ,D_BZ_JCZLX}"></EditAddForm>
<EditAddForm ref="editInfo" @updateDate="getList" :dic="{ D_BZ_QCLX, D_BZ_QCDJ, D_BZ_JCZLX }"></EditAddForm>
</template>
<script setup>
@ -57,7 +52,7 @@ import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import EditAddForm from "./editAddForm.vue";
import {qcSelectQcList,qcDeleteQc} from "@/api/lzjcz/index.js";
import { qcSelectQcList, qcDeleteQc } from "@/api/lzjcz/index.js";
import {
ref,
reactive,
@ -70,9 +65,9 @@ import {
} from "vue";
const { proxy } = getCurrentInstance();
const {
D_BZ_QCLX,D_BZ_QCDJ,D_BZ_JCZLX
D_BZ_QCLX, D_BZ_QCDJ, D_BZ_JCZLX
} = proxy.$dict(
"D_BZ_QCLX","D_BZ_QCDJ","D_BZ_JCZLX"
"D_BZ_QCLX", "D_BZ_QCDJ", "D_BZ_JCZLX"
);
const addEditDialog = ref();
const searchConfiger = reactive([
@ -87,7 +82,7 @@ const searchConfiger = reactive([
prop: "qclx",
placeholder: "请选择圈层类型",
label: "圈层类型",
options:D_BZ_QCLX
options: D_BZ_QCLX
},
]);
const pageData = reactive({
@ -96,19 +91,19 @@ const pageData = reactive({
tableConfiger: {
loading: false,
rowHieght: 61,
showSelectType:'checkBox',
showSelectType: 'checkBox',
},
total: 0,
pageConfiger: {
pageSize: 10,
pageNum: 1
pageCurrent: 1
}, //分页
controlsWidth: 210, //操作栏宽度
tableColumn: [
{ label: "所属部门", prop: "ssbm"},
{ label: "圈层名称", prop: "qcmc"},
{ label: "圈层类型", prop: "qclx", showSolt:true },
{ label: "圈层等级", prop: "qcjb" ,showSolt:true}
{ label: "所属部门", prop: "ssbm" },
{ label: "圈层名称", prop: "qcmc" },
{ label: "圈层类型", prop: "qclx", showSolt: true },
{ label: "圈层等级", prop: "qcjb", showSolt: true }
]
});
@ -127,11 +122,11 @@ onMounted(() => {
});
// 搜索
const onSearch = (val)=>{
listQuery.value = {...listQuery.value,...val}
if(val.cz) listQuery.value.ssbmdm = '';
const onSearch = (val) => {
listQuery.value = { ...listQuery.value, ...val }
if (val.cz) listQuery.value.ssbmdm = '';
delete listQuery.value.cz;
getList()
getList()
}
@ -151,11 +146,11 @@ const changeSize = (val) => {
const getList = () => {
let params = { ...listQuery.value, ...pageData.pageConfiger };
pageData.tableConfiger.loading = true;
qcSelectQcList(params).then(res=>{
pageData.tableData=res.records
pageData.total=res.total
}).finally(()=>{
pageData.tableConfiger.loading=false
qcSelectQcList(params).then(res => {
pageData.tableData = res.records
pageData.total = res.total
}).finally(() => {
pageData.tableConfiger.loading = false
})
};
@ -182,31 +177,31 @@ const tabHeightFn = () => {
};
};
// 多选
const ids=ref([])
const chooseData = (val)=>{
if(!val) return false;
const ids = ref([])
const chooseData = (val) => {
if (!val) return false;
console.log(val);
if(val instanceof Array) ids.value = val.map(v=>{ return v.id })
console.log(ids.value );
if (val instanceof Array) ids.value = val.map(v => { return v.id })
console.log(ids.value);
}
//批量删除
const deletList = (id) => {
proxy.$confirm("确定要删除", "警告", {type: "warning"}).then(() => {
proxy.$confirm("确定要删除", "警告", { type: "warning" }).then(() => {
let IDS = id ? [id] : ids.value
qcDeleteQc(IDS).then(() => {
proxy.$message({ type: "success",message: "删除成功"});
getList()
});
}).catch(() => {
proxy.$message.info("已取消");
qcDeleteQc(IDS).then(() => {
proxy.$message({ type: "success", message: "删除成功" });
getList()
});
}).catch(() => {
proxy.$message.info("已取消");
});
};
// 新增编辑表单
const editInfo=ref()
const addEditForm = (type,row)=>{
nextTick(()=>{
editInfo.value.init(type,row)
const editInfo = ref()
const addEditForm = (type, row) => {
nextTick(() => {
editInfo.value.init(type, row)
})
}
onUnmounted(() => {
@ -217,13 +212,16 @@ onUnmounted(() => {
<style lang="scss" scoped>
@import "~@/assets/css/layout.scss";
@import "~@/assets/css/element-plus.scss";
.main-box {
display: flex;
.tableCnt {
flex: 1;
margin-left: 10px;
}
}
.tag {
padding: 2px 6px;
margin: 0 1px;

View File

@ -302,7 +302,7 @@ const props = {
emitPath: false
};
const formGzy = ref({
pageNum: 1,
pageCurrent: 1,
pageSize: 20,
isChild: 1
});