优化打印
This commit is contained in:
parent
4be4bf155f
commit
2ccf8d4aa0
@ -179,3 +179,35 @@ export function getmonthst(data?: Object) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//查询月室内质控小结
|
||||||
|
export function getmonthpj(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/qcstat/getmonthpj',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//保存月室内质控小结
|
||||||
|
export function savemonthpj(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/qcstat/savemonthpj',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//查询月失控情况总结
|
||||||
|
export function getmonthskzj(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/qcstat/getmonthskzj',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//保存月失控情况总结
|
||||||
|
export function savemonthskzj(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/qcstat/savemonthskzj',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -125,6 +125,7 @@ aside {
|
|||||||
.app-container {
|
.app-container {
|
||||||
padding: 10px 10px 0 10px;
|
padding: 10px 10px 0 10px;
|
||||||
height: calc(100vh - 5.25rem);
|
height: calc(100vh - 5.25rem);
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.components-container {
|
.components-container {
|
||||||
|
|||||||
@ -47,7 +47,8 @@ const getYqConfig = () => {
|
|||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
instrOptions.value = res.data.map((item: any) => ({
|
instrOptions.value = res.data.map((item: any) => ({
|
||||||
yq: item.yq.trim(),
|
yq: item.yq.trim(),
|
||||||
yqmc: item.yqmc
|
yqmc: item.yqmc,
|
||||||
|
lisgroupid: item.lisgroup
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -71,9 +71,10 @@
|
|||||||
<el-button type="warning" :size="aotuSize" plain @click="sendSampleHandle">清单打印</el-button>
|
<el-button type="warning" :size="aotuSize" plain @click="sendSampleHandle">清单打印</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-select v-model="printName" placeholder="打印机设置" @visible-change="visibleChange" @change="changePrinter">
|
<el-button type="warning" :size="aotuSize" plain @click="changePrinter">打印机设置</el-button>
|
||||||
|
<!-- <el-select v-model="printName" placeholder="打印机设置" @visible-change="visibleChange" @change="changePrinter">
|
||||||
<el-option v-for="item in printerList" :key="item.name" :label="item.name" :value="item.name" />
|
<el-option v-for="item in printerList" :key="item.name" :label="item.name" :value="item.name" />
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -609,7 +610,20 @@ const visibleChange = (visible: boolean) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const changePrinter = (value: string) => {
|
const changePrinter = (value: string) => {
|
||||||
printStore.setDefaultPrinter(value);
|
// printStore.setDefaultPrinter(value);
|
||||||
|
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = 'lisbarprint://setup';
|
||||||
|
link.style.display = 'none';
|
||||||
|
document.body.appendChild(link);
|
||||||
|
|
||||||
|
// 模拟点击
|
||||||
|
link.click();
|
||||||
|
|
||||||
|
// 移除创建的标签(清理DOM)
|
||||||
|
document.body.removeChild(link);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const timeDate = () => {
|
const timeDate = () => {
|
||||||
@ -752,7 +766,7 @@ const selectStatusRows = () => {
|
|||||||
|
|
||||||
// 打印pdf
|
// 打印pdf
|
||||||
const printPdf = () => {
|
const printPdf = () => {
|
||||||
if (!printName.value) return ElMessage.warning("未设置打印机,请先设置打印机!");
|
// if (!printName.value) return ElMessage.warning("未设置打印机,请先设置打印机!");
|
||||||
const selections = tableRef.value.allSelection()
|
const selections = tableRef.value.allSelection()
|
||||||
if (selections.length <= 0) return ElMessage.warning('请选择数据!')
|
if (selections.length <= 0) return ElMessage.warning('请选择数据!')
|
||||||
ElMessageBox.confirm(`确定打印选中的数据吗?`, "提示", {
|
ElMessageBox.confirm(`确定打印选中的数据吗?`, "提示", {
|
||||||
@ -769,8 +783,18 @@ const printPdf = () => {
|
|||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
done();
|
done();
|
||||||
|
// HiprintPrinter.silentPrint(res.data, printName.value);
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = `lisbarprint://${res.data}`;
|
||||||
|
link.style.display = 'none';
|
||||||
|
document.body.appendChild(link);
|
||||||
|
|
||||||
|
// 模拟点击
|
||||||
|
link.click();
|
||||||
|
|
||||||
|
// 移除创建的标签(清理DOM)
|
||||||
|
document.body.removeChild(link);
|
||||||
getList()
|
getList()
|
||||||
HiprintPrinter.silentPrint(res.data, printName.value);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" inline class="demo-form-inline">
|
<el-form :model="queryParams" inline class="demo-form-inline">
|
||||||
<el-form-item label="仪器:">
|
<el-form-item label="仪器:">
|
||||||
<YQSelectTable v-model:data="queryParams.yq" style="width: 150px;" />
|
<SelectTable v-model:data="queryParams.yq" :tableData="instrOptions" style="width:200px"
|
||||||
|
@get-data-value="getDataValue" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="质控月份:">
|
<el-form-item label="质控月份:">
|
||||||
<el-date-picker v-model="queryParams.zkrq" type="month" placeholder="请选择检查时间" value-format="YYYY-MM" />
|
<el-date-picker v-model="queryParams.zkrq" type="month" placeholder="请选择检查时间" value-format="YYYY-MM" />
|
||||||
@ -32,14 +33,14 @@
|
|||||||
<div class="title">{{ formatDict(userStore.sysLoginParam.loginYLJG, 'HOS') }}</div>
|
<div class="title">{{ formatDict(userStore.sysLoginParam.loginYLJG, 'HOS') }}</div>
|
||||||
<div class="content">室内质控数据统计表</div>
|
<div class="content">室内质控数据统计表</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div> 专业组:<span></span></div>
|
<div> 专业组:<span>{{ lisgroup }}</span></div>
|
||||||
<div> 仪器:<span>{{ queryParams.yq }}</span> </div>
|
<div> 仪器:<span>{{ yqmc }}</span> </div>
|
||||||
<div> 浓度: <span></span></div>
|
<div> 浓度: <span>{{ ld }}</span></div>
|
||||||
<div> 质控品号:<span>{{ queryParams.zkph }}</span> </div>
|
<div> 质控品号:<span>{{ queryParams.zkph }}</span> </div>
|
||||||
<div> 质控月份:<span>{{ queryParams.zkrq }}</span> </div>
|
<div> 质控月份:<span>{{ queryParams.zkrq }}</span> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<el-table :data="tableData" height="100%" border highlightCurrentRow>
|
<el-table :data="tableData" height="100%" border highlight-current-row v-loading="loading">
|
||||||
<el-table-column label="质控项目" prop="xmdh" align="center" />
|
<el-table-column label="质控项目" prop="xmdh" align="center" />
|
||||||
<el-table-column label="测定数" prop="cnt" align="center" />
|
<el-table-column label="测定数" prop="cnt" align="center" />
|
||||||
<el-table-column label="失控数" prop="badcnt" align="center" />
|
<el-table-column label="失控数" prop="badcnt" align="center" />
|
||||||
@ -71,7 +72,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog v-model="dialogVisible" :title="title" width="30%">
|
<el-dialog v-model="dialogVisible" :title="title" width="30%" :close-on-click-modal="false" :draggable="true">
|
||||||
<el-input v-model="inputValue" type="textarea" :rows="10" placeholder="请输入内容" />
|
<el-input v-model="inputValue" type="textarea" :rows="10" placeholder="请输入内容" />
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
@ -87,8 +88,9 @@
|
|||||||
import { getDictData, formatDict } from '@/hooks'
|
import { getDictData, formatDict } from '@/hooks'
|
||||||
import { useCommonStore } from '@/store/modules/commonStore';
|
import { useCommonStore } from '@/store/modules/commonStore';
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue'
|
import { getmonthst, getmonthpj, savemonthpj, getmonthskzj, savemonthskzj } from '@/api/liswork/qualityControl/index'
|
||||||
import { getmonthst } from '@/api/liswork/qualityControl/index'
|
import { getComDicts } from "@/api/liswork/dict/ComDict";
|
||||||
|
import { getGroupInstrdList } from "@/api/liswork/work/LisWork";
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const mbStore = useCommonStore();
|
const mbStore = useCommonStore();
|
||||||
@ -100,7 +102,10 @@ const queryParams = reactive({
|
|||||||
zkph: '1',
|
zkph: '1',
|
||||||
zkpph: ''
|
zkpph: ''
|
||||||
})
|
})
|
||||||
|
const loading = ref(false)
|
||||||
|
const lisgroup = ref('')
|
||||||
|
const yqmc = ref('')
|
||||||
|
const ld = ref('')
|
||||||
const inputValue = ref('')
|
const inputValue = ref('')
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
@ -112,30 +117,91 @@ const viewHandle = () => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
const skHandle = () => {
|
const skHandle = () => {
|
||||||
|
getmonthskzj(queryParams).then((res) => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
title.value = '失控总结'
|
title.value = '失控总结'
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
const byHandle = () => {
|
const byHandle = () => {
|
||||||
|
getmonthpj(queryParams).then((res) => {
|
||||||
|
|
||||||
|
});
|
||||||
title.value = '本月总结'
|
title.value = '本月总结'
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
const subHandle = () => {
|
const subHandle = () => {
|
||||||
inputValue.value = ''
|
if (title.value == '失控总结') {
|
||||||
|
savemonthskzj({
|
||||||
|
...queryParams,
|
||||||
|
skzj: inputValue.value
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (title.value == '本月总结') {
|
||||||
|
savemonthpj({
|
||||||
|
...queryParams,
|
||||||
|
monthpj: inputValue.value
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
dialogVisible.value = false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
inputValue.value = ''
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getList = () => {
|
const getDataValue = (val) => {
|
||||||
getmonthst(queryParams).then((res) => {
|
yqmc.value = val.label
|
||||||
tableData.value = res.data || []
|
lisgroup.value = instrGroupOptions.value.find(item => item.zddh == val.lisgroupid)?.zdmc || val.lisgroupid
|
||||||
|
}
|
||||||
|
|
||||||
|
const instrGroupOptions = ref([])
|
||||||
|
// 部门
|
||||||
|
const getInstrGroupOptions = () => {
|
||||||
|
getComDicts({ zdlb: 'GROUP' }).then((res) => {
|
||||||
|
instrGroupOptions.value = res.data
|
||||||
|
lisgroup.value = res.data.find(item => item.zddh == mbStore.defaultConfig.lisgroupid)?.zdmc || mbStore.defaultConfig.lisgroupid
|
||||||
|
getYqConfig()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const instrOptions = ref([])
|
||||||
|
// 仪器
|
||||||
|
const getYqConfig = () => {
|
||||||
|
getGroupInstrdList().then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
instrOptions.value = res.data.map((item) => ({
|
||||||
|
value: item.yq.trim(),
|
||||||
|
label: item.yqmc,
|
||||||
|
lisgroupid: item.lisgroup
|
||||||
|
}))
|
||||||
|
yqmc.value = instrOptions.value.find(item => item.value == queryParams.yq)?.label || queryParams.yq
|
||||||
|
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
getList()
|
const getList = () => {
|
||||||
|
loading.value = true
|
||||||
|
getmonthst(queryParams).then((res) => {
|
||||||
|
loading.value = false
|
||||||
|
tableData.value = res.data || []
|
||||||
|
ld.value = res.data[0]?.ld || ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
getDictData('HOS')
|
getDictData('HOS')
|
||||||
|
getInstrGroupOptions()
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -160,10 +226,13 @@ onMounted(() => {
|
|||||||
|
|
||||||
span {
|
span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 5px 10px;
|
padding: 0 10px;
|
||||||
border-bottom: 1px solid #000;
|
border-bottom: 1px solid #000;
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
height: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -207,6 +207,30 @@ const getEcharts = () => {
|
|||||||
itemStyle: { shadowColor: color[index], shadowBlur: index === 0 ? 10 : 0 },
|
itemStyle: { shadowColor: color[index], shadowBlur: index === 0 ? 10 : 0 },
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
formatter: function (params) {
|
||||||
|
// params:当前鼠标指向的数据点信息
|
||||||
|
const [dataItem] = params;
|
||||||
|
const levelName = dataItem.seriesName; // 水平1/水平2...
|
||||||
|
const targetValue = '23'; // 靶值
|
||||||
|
|
||||||
|
return `
|
||||||
|
<div style="padding: 8px; border: 1px solid #ccc; border-radius: 4px; min-width: 200px;">
|
||||||
|
<div style="margin-bottom: 4px;"><strong>日期区间:</strong>${queryParams.st}</div>
|
||||||
|
<div style="margin-bottom: 4px;"><strong>仪器:</strong>${yqmc.value || '未选择'}</div>
|
||||||
|
<div style="margin-bottom: 4px;"><strong>${levelName} 靶值:</strong>${targetValue}</div>
|
||||||
|
<div><strong>点位:</strong>${dataItem.name} <strong>SD值:</strong>${dataItem.value}</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
},
|
||||||
|
axisPointer: {
|
||||||
|
type: 'cross',
|
||||||
|
label: {
|
||||||
|
backgroundColor: '#6a7985'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
boundaryGap: true,
|
boundaryGap: true,
|
||||||
data: xAxisData,
|
data: xAxisData,
|
||||||
@ -281,6 +305,38 @@ const getEcharts = () => {
|
|||||||
textStyle: { color: '#000', fontSize: 12 },
|
textStyle: { color: '#000', fontSize: 12 },
|
||||||
data: legendData,
|
data: legendData,
|
||||||
},
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
formatter: function (params) {
|
||||||
|
// 单图模式下params是所有水平的同点位数据
|
||||||
|
let tooltipHtml = `
|
||||||
|
<div style="padding: 8px; border: 1px solid #ccc; border-radius: 4px; min-width: 200px;">
|
||||||
|
<div style="margin-bottom: 6px;"><strong>日期区间:</strong>${queryParams.st} </div>
|
||||||
|
<div style="margin-bottom: 6px;"><strong>仪器:</strong>${yqmc.value || '未选择'}</div>
|
||||||
|
<div style="font-weight: bold; margin-bottom: 4px;">点位 ${params[0].name} 数据:</div>
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 遍历每个水平的点位数据,展示靶值和SD值
|
||||||
|
params.forEach(item => {
|
||||||
|
const targetValue = '23'
|
||||||
|
tooltipHtml += `
|
||||||
|
<div style="margin-bottom: 2px;">
|
||||||
|
<strong>${item.seriesName}:</strong>
|
||||||
|
靶值 ${targetValue} SD值 ${item.value}
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
});
|
||||||
|
|
||||||
|
tooltipHtml += `</div>`;
|
||||||
|
return tooltipHtml;
|
||||||
|
},
|
||||||
|
axisPointer: {
|
||||||
|
type: 'cross',
|
||||||
|
label: {
|
||||||
|
backgroundColor: '#6a7985'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
boundaryGap: true,
|
boundaryGap: true,
|
||||||
data: xAxisData,
|
data: xAxisData,
|
||||||
|
|||||||
@ -67,11 +67,11 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" :size="aotuSize" plain>清单打印</el-button>
|
<el-button type="warning" :size="aotuSize" plain>清单打印</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<!-- <el-col :span="4">
|
||||||
<el-select v-model="printName" placeholder="打印机设置" @visible-change="visibleChange" @change="changePrinter">
|
<el-select v-model="printName" placeholder="打印机设置" @visible-change="visibleChange" @change="changePrinter">
|
||||||
<el-option v-for="item in printerList" :key="item.name" :label="item.name" :value="item.name" />
|
<el-option v-for="item in printerList" :key="item.name" :label="item.name" :value="item.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :loading="loading"
|
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :loading="loading"
|
||||||
@ -670,7 +670,7 @@ const selectStatusRows = () => {
|
|||||||
|
|
||||||
// 打印pdf
|
// 打印pdf
|
||||||
const printPdf = () => {
|
const printPdf = () => {
|
||||||
if (!printName.value) return ElMessage.warning("未设置打印机,请先设置打印机!");
|
// if (!printName.value) return ElMessage.warning("未设置打印机,请先设置打印机!");
|
||||||
if (sqhs.value.length <= 0) return ElMessage.warning('请选择数据!')
|
if (sqhs.value.length <= 0) return ElMessage.warning('请选择数据!')
|
||||||
ElMessageBox.confirm(`确定打印选中的数据吗?`, "提示", {
|
ElMessageBox.confirm(`确定打印选中的数据吗?`, "提示", {
|
||||||
confirmButtonText: "确认",
|
confirmButtonText: "确认",
|
||||||
|
|||||||
@ -3,31 +3,16 @@
|
|||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||||
<el-form-item label="字典名称" prop="dictType">
|
<el-form-item label="字典名称" prop="dictType">
|
||||||
<el-select v-model="queryParams.dictType" style="width: 200px">
|
<el-select v-model="queryParams.dictType" style="width: 200px">
|
||||||
<el-option
|
<el-option v-for="item in typeOptions" :key="item.dictId" :label="item.dictName" :value="item.dictType" />
|
||||||
v-for="item in typeOptions"
|
|
||||||
:key="item.dictId"
|
|
||||||
:label="item.dictName"
|
|
||||||
:value="item.dictType"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字典标签" prop="dictLabel">
|
<el-form-item label="字典标签" prop="dictLabel">
|
||||||
<el-input
|
<el-input v-model="queryParams.dictLabel" placeholder="请输入字典标签" clearable style="width: 200px"
|
||||||
v-model="queryParams.dictLabel"
|
@keyup.enter="handleQuery" />
|
||||||
placeholder="请输入字典标签"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="数据状态" clearable style="width: 200px">
|
<el-select v-model="queryParams.status" placeholder="数据状态" clearable style="width: 200px">
|
||||||
<el-option
|
<el-option v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
v-for="dict in sys_normal_disable"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -38,50 +23,22 @@
|
|||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:dict:add']">新增</el-button>
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Plus"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['system:dict:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
||||||
type="success"
|
v-hasPermi="['system:dict:edit']">修改</el-button>
|
||||||
plain
|
|
||||||
icon="Edit"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['system:dict:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
||||||
type="danger"
|
v-hasPermi="['system:dict:remove']">删除</el-button>
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['system:dict:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||||
type="warning"
|
v-hasPermi="['system:dict:export']">导出</el-button>
|
||||||
plain
|
|
||||||
icon="Download"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['system:dict:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="warning" plain icon="Close" @click="handleClose">关闭</el-button>
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="Close"
|
|
||||||
@click="handleClose"
|
|
||||||
>关闭</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -91,8 +48,11 @@
|
|||||||
<el-table-column label="字典编码" align="center" prop="dictCode" />
|
<el-table-column label="字典编码" align="center" prop="dictCode" />
|
||||||
<el-table-column label="字典标签" align="center" prop="dictLabel">
|
<el-table-column label="字典标签" align="center" prop="dictLabel">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="(scope.row.listClass == '' || scope.row.listClass == 'default') && (scope.row.cssClass == '' || scope.row.cssClass == null)">{{ scope.row.dictLabel }}</span>
|
<span
|
||||||
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass" :class="scope.row.cssClass">{{ scope.row.dictLabel }}</el-tag>
|
v-if="(scope.row.listClass == '' || scope.row.listClass == 'default') && (scope.row.cssClass == '' || scope.row.cssClass == null)">{{
|
||||||
|
scope.row.dictLabel }}</span>
|
||||||
|
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass"
|
||||||
|
:class="scope.row.cssClass">{{ scope.row.dictLabel }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="字典键值" align="center" prop="dictValue" />
|
<el-table-column label="字典键值" align="center" prop="dictValue" />
|
||||||
@ -110,19 +70,16 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:dict:edit']">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dict:remove']">删除</el-button>
|
v-hasPermi="['system:dict:edit']">修改</el-button>
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:dict:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||||
v-show="total > 0"
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
:total="total"
|
|
||||||
v-model:page="queryParams.pageNum"
|
|
||||||
v-model:limit="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||||
@ -144,21 +101,14 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="回显样式" prop="listClass">
|
<el-form-item label="回显样式" prop="listClass">
|
||||||
<el-select v-model="form.listClass">
|
<el-select v-model="form.listClass">
|
||||||
<el-option
|
<el-option v-for="item in listClassOptions" :key="item.value" :label="item.label + '(' + item.value + ')'"
|
||||||
v-for="item in listClassOptions"
|
:value="item.value"></el-option>
|
||||||
:key="item.value"
|
|
||||||
:label="item.label + '(' + item.value + ')'"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio
|
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
|
||||||
v-for="dict in sys_normal_disable"
|
}}</el-radio>
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.value"
|
|
||||||
>{{ dict.label }}</el-radio>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
@ -273,7 +223,7 @@ function handleQuery() {
|
|||||||
}
|
}
|
||||||
/** 返回按钮操作 */
|
/** 返回按钮操作 */
|
||||||
function handleClose() {
|
function handleClose() {
|
||||||
const obj = { path: "/system/dict" };
|
const obj = { path: "/systeminfo/dict" };
|
||||||
proxy.$tab.closeOpenPage(obj);
|
proxy.$tab.closeOpenPage(obj);
|
||||||
}
|
}
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
@ -330,13 +280,13 @@ function submitForm() {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
const dictCodes = row.dictCode || ids.value;
|
const dictCodes = row.dictCode || ids.value;
|
||||||
proxy.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() {
|
proxy.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function () {
|
||||||
return delData(dictCodes);
|
return delData(dictCodes);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
getList();
|
getList();
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
useDictStore().removeDict(queryParams.value.dictType);
|
useDictStore().removeDict(queryParams.value.dictType);
|
||||||
}).catch(() => {});
|
}).catch(() => { });
|
||||||
}
|
}
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user