修改bug
This commit is contained in:
parent
b2a9d385a8
commit
6a7b1fd6b2
|
|
@ -44,11 +44,60 @@ export const columns: BasicColumn[] = [
|
|||
// return text;
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: '地区类型',
|
||||
// align: "center",
|
||||
// dataIndex: 'regionType'
|
||||
// },
|
||||
];
|
||||
|
||||
|
||||
//列表数据
|
||||
export const columnsJx: BasicColumn[] = [
|
||||
{
|
||||
title: '地区类型',
|
||||
title: '电话号',
|
||||
align: "center",
|
||||
dataIndex: 'regionType'
|
||||
dataIndex: 'sim'
|
||||
},
|
||||
{
|
||||
title: '规则代码',
|
||||
align: "center",
|
||||
dataIndex: 'code'
|
||||
},
|
||||
{
|
||||
title: '规则描述',
|
||||
align: "center",
|
||||
dataIndex: 'remarks'
|
||||
},
|
||||
{
|
||||
title: '热力公司',
|
||||
align: "center",
|
||||
dataIndex: 'companyId_dictText'
|
||||
},
|
||||
{
|
||||
title: '锅炉房',
|
||||
align: "center",
|
||||
dataIndex: 'sourceId_dictText'
|
||||
},
|
||||
// {
|
||||
// title: '换热站',
|
||||
// align: "center",
|
||||
// dataIndex: 'stationId_dictText'
|
||||
// },
|
||||
// {
|
||||
// title: '创建时间',
|
||||
// align: "center",
|
||||
// dataIndex: 'createDate',
|
||||
// customRender:({text}) =>{
|
||||
// text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
// return text;
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: '地区类型',
|
||||
// align: "center",
|
||||
// dataIndex: 'regionType'
|
||||
// },
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ function handleSuperQuery(params) {
|
|||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
registerModal.value.add({regionType:'城区'});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
import { ref, reactive, watch } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './AnalysisRule.data';
|
||||
import { columnsJx, superQuerySchema } from './AnalysisRule.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './AnalysisRule.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import AnalysisRuleModal from './components/AnalysisRuleModal.vue'
|
||||
|
|
@ -129,7 +129,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
tableProps: {
|
||||
title: 'bl_analysis_rule',
|
||||
api: list,
|
||||
columns,
|
||||
columns: columnsJx,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
|
|
@ -181,7 +181,7 @@ function handleSuperQuery(params) {
|
|||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
registerModal.value.add({regionType:'郊县'});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -23,18 +23,18 @@
|
|||
<a-col :span="24">
|
||||
<a-form-item label="热力公司" v-bind="validateInfos.companyId" id="AnalysisRuleForm-companyId"
|
||||
name="companyId">
|
||||
<a-input v-model:value="formData.conpanyName" placeholder="请输入热力公司" allow-clear></a-input>
|
||||
<j-dict-select-tag v-model:value="formData.companyId" :dictCode="`bl_thermalcompany,company_name,id,region_type = '${formData.regionType}'`" placeholder="请选择热力公司" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="锅炉房" v-bind="validateInfos.sourceId" id="AnalysisRuleForm-sourceId" name="sourceId">
|
||||
<a-input v-model:value="formData.sourceName" placeholder="请输入锅炉房" allow-clear></a-input>
|
||||
<j-dict-select-tag v-model:value="formData.sourceId" :dictCode="`bl_heatsource,source_name,id,company_id = '${formData.companyId}'`" placeholder="请选择锅炉房" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="24" v-show="formData.regionType=='城区'">
|
||||
<a-form-item label="换热站" v-bind="validateInfos.stationId" id="AnalysisRuleForm-stationId"
|
||||
name="stationId">
|
||||
<a-input v-model:value="formData.stationName" placeholder="请输入换热站" allow-clear></a-input>
|
||||
<j-dict-select-tag v-model:value="formData.stationId" :dictCode="`bl_heatsourcestation,station_name,id,source_id = '${formData.sourceId || -1}'`" placeholder="请选择换热站名称" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
|
|
@ -79,9 +79,9 @@ const formData = reactive<Record<string, any>>({
|
|||
sim: '',
|
||||
code: '',
|
||||
remarks: '',
|
||||
companyId: undefined,
|
||||
sourceId: undefined,
|
||||
stationId: undefined,
|
||||
companyId: '',
|
||||
sourceId: '',
|
||||
stationId: '',
|
||||
createDate: '',
|
||||
regionType: '',
|
||||
conpanyName: '',
|
||||
|
|
@ -94,7 +94,7 @@ const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
|||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
regionType: [{ required: true, message: '请输入地区类型!' },],
|
||||
// regionType: [{ required: true, message: '请输入地区类型!' },],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
|
|
@ -114,8 +114,8 @@ const disabled = computed(() => {
|
|||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
function add(record) {
|
||||
edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@
|
|||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
function add(record) {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
registerForm.value.add(record);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
];
|
||||
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
sn: {title: 'SN',order: 0,view: 'text', type: 'string',},
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@
|
|||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="热力公司" v-bind="validateInfos.companyCompanyId" id="BlWaterFlowConfigForm-companyCompanyId" name="companyCompanyId">
|
||||
<j-dict-select-tag v-model:value="formData.companyCompanyId" :dictCode="`bl_thermalcompany,company_name,id,region_type = '${formData.regionType || -1}'`" placeholder="请选择热力公司" allow-clear />
|
||||
<j-dict-select-tag v-model:value="formData.companyCompanyId" :dictCode="`bl_thermalcompany,company_name,id,region_type = '${formData.regionType}'`" placeholder="请选择热力公司" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="锅炉房" v-bind="validateInfos.sourceSourceId" id="BlWaterFlowConfigForm-sourceSourceId" name="sourceSourceId">
|
||||
<j-dict-select-tag v-model:value="formData.sourceSourceId" :dictCode="`bl_heatsource,source_name,id,company_id = '${formData.companyCompanyId || -1}'`" placeholder="请选择锅炉房" allow-clear />
|
||||
<j-dict-select-tag v-model:value="formData.sourceSourceId" :dictCode="`bl_heatsource,source_name,id,company_id = '${formData.companyCompanyId}'`" placeholder="请选择锅炉房" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="24" hidden>
|
||||
|
|
@ -57,9 +57,9 @@
|
|||
id: '',
|
||||
sn: '',
|
||||
occurtime: '',
|
||||
companyCompanyId: undefined,
|
||||
sourceSourceId: undefined,
|
||||
stationStationId: undefined,
|
||||
companyCompanyId: '',
|
||||
sourceSourceId: '',
|
||||
stationStationId: '',
|
||||
regionType: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
|
|
@ -98,6 +98,7 @@
|
|||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
console.log("🚀 ~ edit ~ record:", record)
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
|
|
|
|||
Loading…
Reference in New Issue