Merge branch 'main' of http://47.115.223.229:8888/yangjun/panshi_vue_new
This commit is contained in:
commit
edb522a422
|
|
@ -44,11 +44,60 @@ export const columns: BasicColumn[] = [
|
||||||
// return text;
|
// return text;
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
|
// {
|
||||||
|
// title: '地区类型',
|
||||||
|
// align: "center",
|
||||||
|
// dataIndex: 'regionType'
|
||||||
|
// },
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
//列表数据
|
||||||
|
export const columnsJx: BasicColumn[] = [
|
||||||
{
|
{
|
||||||
title: '地区类型',
|
title: '电话号',
|
||||||
align: "center",
|
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() {
|
function handleAdd() {
|
||||||
registerModal.value.disableSubmit = false;
|
registerModal.value.disableSubmit = false;
|
||||||
registerModal.value.add();
|
registerModal.value.add({regionType:'城区'});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@
|
||||||
import { ref, reactive, watch } from 'vue';
|
import { ref, reactive, watch } from 'vue';
|
||||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
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 { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './AnalysisRule.api';
|
||||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
import AnalysisRuleModal from './components/AnalysisRuleModal.vue'
|
import AnalysisRuleModal from './components/AnalysisRuleModal.vue'
|
||||||
|
|
@ -129,7 +129,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
tableProps: {
|
tableProps: {
|
||||||
title: 'bl_analysis_rule',
|
title: 'bl_analysis_rule',
|
||||||
api: list,
|
api: list,
|
||||||
columns,
|
columns: columnsJx,
|
||||||
canResize: false,
|
canResize: false,
|
||||||
useSearchForm: false,
|
useSearchForm: false,
|
||||||
actionColumn: {
|
actionColumn: {
|
||||||
|
|
@ -181,7 +181,7 @@ function handleSuperQuery(params) {
|
||||||
*/
|
*/
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
registerModal.value.disableSubmit = false;
|
registerModal.value.disableSubmit = false;
|
||||||
registerModal.value.add();
|
registerModal.value.add({regionType:'郊县'});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -23,18 +23,18 @@
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="热力公司" v-bind="validateInfos.companyId" id="AnalysisRuleForm-companyId"
|
<a-form-item label="热力公司" v-bind="validateInfos.companyId" id="AnalysisRuleForm-companyId"
|
||||||
name="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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="锅炉房" v-bind="validateInfos.sourceId" id="AnalysisRuleForm-sourceId" name="sourceId">
|
<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-form-item>
|
||||||
</a-col>
|
</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"
|
<a-form-item label="换热站" v-bind="validateInfos.stationId" id="AnalysisRuleForm-stationId"
|
||||||
name="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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
style="width: 100%" allow-clear />
|
style="width: 100%" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24" hidden>
|
||||||
<a-form-item label="地区类型" v-bind="validateInfos.regionType" id="AnalysisRuleForm-regionType"
|
<a-form-item label="地区类型" v-bind="validateInfos.regionType" id="AnalysisRuleForm-regionType"
|
||||||
name="regionType">
|
name="regionType">
|
||||||
<a-input v-model:value="formData.regionType" placeholder="请输入地区类型" allow-clear></a-input>
|
<a-input v-model:value="formData.regionType" placeholder="请输入地区类型" allow-clear></a-input>
|
||||||
|
|
@ -79,9 +79,9 @@ const formData = reactive<Record<string, any>>({
|
||||||
sim: '',
|
sim: '',
|
||||||
code: '',
|
code: '',
|
||||||
remarks: '',
|
remarks: '',
|
||||||
companyId: undefined,
|
companyId: '',
|
||||||
sourceId: undefined,
|
sourceId: '',
|
||||||
stationId: undefined,
|
stationId: '',
|
||||||
createDate: '',
|
createDate: '',
|
||||||
regionType: '',
|
regionType: '',
|
||||||
conpanyName: '',
|
conpanyName: '',
|
||||||
|
|
@ -94,7 +94,7 @@ const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||||
const confirmLoading = ref<boolean>(false);
|
const confirmLoading = ref<boolean>(false);
|
||||||
//表单验证
|
//表单验证
|
||||||
const validatorRules = reactive({
|
const validatorRules = reactive({
|
||||||
regionType: [{ required: true, message: '请输入地区类型!' },],
|
// regionType: [{ required: true, message: '请输入地区类型!' },],
|
||||||
});
|
});
|
||||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||||
|
|
||||||
|
|
@ -114,8 +114,8 @@ const disabled = computed(() => {
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
function add() {
|
function add(record) {
|
||||||
edit({});
|
edit(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,11 @@
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
function add() {
|
function add(record) {
|
||||||
title.value = '新增';
|
title.value = '新增';
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
registerForm.value.add();
|
registerForm.value.add(record);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ export const columns: BasicColumn[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
// 高级查询数据
|
// 高级查询数据
|
||||||
export const superQuerySchema = {
|
export const superQuerySchema = {
|
||||||
sn: {title: 'SN',order: 0,view: 'text', type: 'string',},
|
sn: {title: 'SN',order: 0,view: 'text', type: 'string',},
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,12 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="热力公司" v-bind="validateInfos.companyCompanyId" id="BlWaterFlowConfigForm-companyCompanyId" name="companyCompanyId">
|
<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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="锅炉房" v-bind="validateInfos.sourceSourceId" id="BlWaterFlowConfigForm-sourceSourceId" name="sourceSourceId">
|
<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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :span="24" hidden>
|
<!-- <a-col :span="24" hidden>
|
||||||
|
|
@ -57,9 +57,9 @@
|
||||||
id: '',
|
id: '',
|
||||||
sn: '',
|
sn: '',
|
||||||
occurtime: '',
|
occurtime: '',
|
||||||
companyCompanyId: undefined,
|
companyCompanyId: '',
|
||||||
sourceSourceId: undefined,
|
sourceSourceId: '',
|
||||||
stationStationId: undefined,
|
stationStationId: '',
|
||||||
regionType: '',
|
regionType: '',
|
||||||
});
|
});
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
|
|
@ -98,6 +98,7 @@
|
||||||
* 编辑
|
* 编辑
|
||||||
*/
|
*/
|
||||||
function edit(record) {
|
function edit(record) {
|
||||||
|
console.log("🚀 ~ edit ~ record:", record)
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
resetFields();
|
resetFields();
|
||||||
const tmpData = {};
|
const tmpData = {};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue