导出模板修改
This commit is contained in:
@@ -139,10 +139,9 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '行政等级',
|
title: '区域等级',
|
||||||
dataIndex: 'regionLevel',
|
dataIndex: 'regionLevel',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '条目',
|
title: '条目',
|
||||||
|
|||||||
@@ -10,11 +10,10 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
<a-form-item label="测点名称:">
|
<a-form-item label="测点名称:">
|
||||||
<a-select v-model:value.trim="where.place" allowClear showSearch>
|
<a-select v-model:value="where.place" allowClear showSearch>
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="(item, index) in palceOptions"
|
v-for="(item) in palceOptions"
|
||||||
:value="item.value"
|
:key="item.value"
|
||||||
:key="index"
|
|
||||||
>{{ item.label }}</a-select-option
|
>{{ item.label }}</a-select-option
|
||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -22,11 +21,10 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
<a-form-item label="路段:">
|
<a-form-item label="路段:">
|
||||||
<a-select v-model:value.trim="where.road" allowClear showSearch>
|
<a-select v-model:value="where.road" allowClear showSearch>
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="(item, index) in roadOptions"
|
v-for="(item) in roadOptions"
|
||||||
:value="item.value"
|
:key="item.value"
|
||||||
:key="index"
|
|
||||||
>{{ item.label }}</a-select-option
|
>{{ item.label }}</a-select-option
|
||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -34,11 +32,10 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
<a-form-item label="城区">
|
<a-form-item label="城区">
|
||||||
<a-select v-model:value.trim="where.area" allowClear showSearch>
|
<a-select v-model:value="where.area" allowClear showSearch>
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="(item, index) in areaOptions"
|
v-for="(item) in areaOptions"
|
||||||
:value="item.value"
|
:key="item.value"
|
||||||
:key="index"
|
|
||||||
>{{ item.label }}</a-select-option
|
>{{ item.label }}</a-select-option
|
||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -379,6 +376,15 @@
|
|||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :md="12" :sm="24">
|
||||||
|
<a-form-item label="备注" name="remark">
|
||||||
|
<a-input
|
||||||
|
v-model:value="form.remark"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
allow-clear
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@@ -643,6 +649,16 @@ export default {
|
|||||||
dataIndex: "soundInstrumentCode",
|
dataIndex: "soundInstrumentCode",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "区域等级",
|
||||||
|
dataIndex: "regionLevel",
|
||||||
|
sorter: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "备注",
|
||||||
|
dataIndex: "remark",
|
||||||
|
sorter: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "创建人",
|
title: "创建人",
|
||||||
dataIndex: "username",
|
dataIndex: "username",
|
||||||
|
|||||||
@@ -9,12 +9,22 @@
|
|||||||
>
|
>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
<a-form-item label="测点名称:">
|
<a-form-item label="区域等级:">
|
||||||
<a-select v-model:value.trim="where.place" allowClear showSearch>
|
<a-select v-model:value="where.regionLevel" allowClear showSearch>
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="(item, index) in palceOptions"
|
v-for="(item) in regionLevelOptions"
|
||||||
:value="item.value"
|
:key="item.value"
|
||||||
:key="index"
|
>{{ item.label }}</a-select-option
|
||||||
|
>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
|
<a-form-item label="测点名称:">
|
||||||
|
<a-select v-model:value="where.place" allowClear showSearch>
|
||||||
|
<a-select-option
|
||||||
|
v-for="(item) in palceOptions"
|
||||||
|
:key="item.value"
|
||||||
>{{ item.label }}</a-select-option
|
>{{ item.label }}</a-select-option
|
||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -22,11 +32,10 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
<a-form-item label="路段:">
|
<a-form-item label="路段:">
|
||||||
<a-select v-model:value.trim="where.road" allowClear showSearch>
|
<a-select v-model:value="where.road" allowClear showSearch>
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="(item, index) in roadOptions"
|
v-for="(item) in roadOptions"
|
||||||
:value="item.value"
|
:key="item.value"
|
||||||
:key="index"
|
|
||||||
>{{ item.label }}</a-select-option
|
>{{ item.label }}</a-select-option
|
||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -34,11 +43,10 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
<a-form-item label="城区">
|
<a-form-item label="城区">
|
||||||
<a-select v-model:value.trim="where.area" allowClear showSearch>
|
<a-select v-model:value="where.area" allowClear showSearch>
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="(item, index) in areaOptions"
|
v-for="(item) in areaOptions"
|
||||||
:value="item.value"
|
:key="item.value"
|
||||||
:key="index"
|
|
||||||
>{{ item.label }}</a-select-option
|
>{{ item.label }}</a-select-option
|
||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -266,6 +274,16 @@ export default {
|
|||||||
title: "声校准仪器编号",
|
title: "声校准仪器编号",
|
||||||
dataIndex: "soundInstrumentCode",
|
dataIndex: "soundInstrumentCode",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "区域等级",
|
||||||
|
dataIndex: "regionLevel",
|
||||||
|
sorter: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "备注",
|
||||||
|
dataIndex: "remark",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "创建人",
|
title: "创建人",
|
||||||
@@ -276,6 +294,7 @@ export default {
|
|||||||
palceOptions: [],
|
palceOptions: [],
|
||||||
areaOptions: [],
|
areaOptions: [],
|
||||||
roadOptions: [],
|
roadOptions: [],
|
||||||
|
regionLevelOptions: [],
|
||||||
// 表格搜索条件
|
// 表格搜索条件
|
||||||
where: {
|
where: {
|
||||||
checked: 1,
|
checked: 1,
|
||||||
@@ -314,6 +333,14 @@ export default {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
getColumnOptions("region_level").then((res) => {
|
||||||
|
this.regionLevelOptions = res.data.data.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item,
|
||||||
|
value: item,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/* 刷新表格 */
|
/* 刷新表格 */
|
||||||
reload() {
|
reload() {
|
||||||
@@ -332,6 +359,11 @@ export default {
|
|||||||
},
|
},
|
||||||
exportFile() {
|
exportFile() {
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{
|
||||||
|
title: "行政区划代码",
|
||||||
|
dataIndex: "regionCode",
|
||||||
|
sorter: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "监测年度",
|
title: "监测年度",
|
||||||
dataIndex: "monitorYear",
|
dataIndex: "monitorYear",
|
||||||
@@ -391,6 +423,11 @@ export default {
|
|||||||
title: "测点参照物",
|
title: "测点参照物",
|
||||||
dataIndex: "refObj",
|
dataIndex: "refObj",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "路段覆盖人口(万人)",
|
||||||
|
dataIndex: "people",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "月",
|
title: "月",
|
||||||
@@ -495,16 +532,22 @@ export default {
|
|||||||
dataIndex: "soundInstrumentCode",
|
dataIndex: "soundInstrumentCode",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "区域等级",
|
||||||
|
dataIndex: "regionLevel",
|
||||||
|
sorter: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "备注",
|
||||||
|
dataIndex: "remark",
|
||||||
|
sorter: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
const arr = [];
|
const arr = [];
|
||||||
const th = columns.map((item) => item.title);
|
const th = columns.map((item) => item.title);
|
||||||
th.unshift("行政区划代码");
|
|
||||||
th.push("备注");
|
|
||||||
arr.push(th);
|
arr.push(th);
|
||||||
this.data.forEach((d) => {
|
this.data.forEach((d) => {
|
||||||
const td = columns.map((item) => d[item.dataIndex]);
|
const td = columns.map((item) => d[item.dataIndex]);
|
||||||
td.unshift("")
|
|
||||||
// td.push("备注")
|
|
||||||
arr.push(td);
|
arr.push(td);
|
||||||
});
|
});
|
||||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||||
|
|||||||
Reference in New Issue
Block a user