Commit 1c064af9 by xue_wengang

导出功能、菜单修改

parent 25db100f
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</div> </div>
<!--文本域--> <!--文本域-->
<el-input <el-input
style="height: 100px" style="minheight: 100px"
type="textarea" type="textarea"
:autosize="autosize" :autosize="autosize"
:rows="item.rows ? item.rows : 10" :rows="item.rows ? item.rows : 10"
...@@ -1802,8 +1802,6 @@ export default { ...@@ -1802,8 +1802,6 @@ export default {
}, },
getDialogSeleted(label) { getDialogSeleted(label) {
debugger; debugger;
// this.unitname = label
// console.log('sadasdasdasdasdasda',label);
this.$emit("getDialogSeletesd", label); this.$emit("getDialogSeletesd", label);
}, },
changeAJLB(label) { changeAJLB(label) {
......
...@@ -325,7 +325,7 @@ export default { ...@@ -325,7 +325,7 @@ export default {
var self = this; var self = this;
let tHeader = []; let tHeader = [];
let filterVal = []; let filterVal = [];
let header = "合成研判"; let header = "研判产品";
let params = new FormData(); let params = new FormData();
params.append("rows", "5000"); params.append("rows", "5000");
params.append("page", this.cxFormData.page); params.append("page", this.cxFormData.page);
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
ref="rightContent" ref="rightContent"
> >
<template #listOperation="scope"> <template #listOperation="scope">
<span class="hbyps" @click="exportExcel(scope.scope)">导出</span>
<span class="hbyps" @click="getFh(scope.scope)">返回</span> <span class="hbyps" @click="getFh(scope.scope)">返回</span>
<span class="hbyps" @click="getYdfx(scope.scope)">功能效能分析</span> <span class="hbyps" @click="getYdfx(scope.scope)">功能效能分析</span>
</template> </template>
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
<div style="margin: 10px 0 0 20px"> <div style="margin: 10px 0 0 20px">
<span style="font-size: 16px"> {{ gnYdfx }}</span> <span style="font-size: 16px"> {{ gnYdfx }}</span>
</div> </div>
<div style="margin: 20px;height: 374px;overflow-y: scroll;"> <div style="margin: 20px; height: 374px; overflow-y: scroll">
<el-table :data="fxlist" border style="width: 100%"> <el-table :data="fxlist" border style="width: 100%">
<el-table-column <el-table-column
v-for="(columnTitle, index) in tableData" v-for="(columnTitle, index) in tableData"
...@@ -105,6 +106,8 @@ ...@@ -105,6 +106,8 @@
<script> <script>
import rightContent from "@c/ptCxForm_components.vue"; import rightContent from "@c/ptCxForm_components.vue";
import { getGnyxFxjg } from "@/api/fzjc.js"; import { getGnyxFxjg } from "@/api/fzjc.js";
import { get, post, postform } from "@/utils/http.js";
import qs from "qs";
export default { export default {
name: "queryGnxnpg", name: "queryGnxnpg",
components: { components: {
...@@ -144,6 +147,7 @@ export default { ...@@ -144,6 +147,7 @@ export default {
limit: 10, limit: 10,
page: 1, page: 1,
functionName: "", functionName: "",
functionNum: "",
fwsjKssj: "", fwsjKssj: "",
fwsjJssj: "", fwsjJssj: "",
}, },
...@@ -242,6 +246,65 @@ export default { ...@@ -242,6 +246,65 @@ export default {
this.$store.commit("user/SET_Header", this.header); this.$store.commit("user/SET_Header", this.header);
}, },
methods: { methods: {
exportExcel(scope) {
var self = this;
let tHeader = [];
let filterVal = [];
let header = "效能评估";
let params = {
limit: 5000,
page: 1,
functionName: this.cxFormData.functionName,
functionNum: this.cxFormData.functionNum,
fwsjKssj: this.cxFormData.fwsjKssj,
fwsjJssj: this.cxFormData.fwsjJssj,
};
self.cxDefaultFormThead.forEach((val) => {
tHeader.push(val.label);
filterVal.push(val.prop);
});
let loading = this.$loading({
lock: true,
text: "正在导出...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
post(`${this.$baseUrl.alyIP}${this.cxUrl}`, qs.stringify(params)).then(
(res) => {
debugger;
if (res.code === 200) {
require.ensure([], () => {
const { export_json_to_excel } = require("@/utils/Export2Excel");
const list = res.data.rows || res.data;
const data = self.formatJson(filterVal, list);
export_json_to_excel(tHeader, data, header);
});
loading.close();
}
}
);
},
formatJson(filterVal, jsonData) {
let arr = [];
jsonData.map((v) => {
let arr1 = [];
filterVal.map((j) => {
if (j.indexOf(",") != -1) {
let arr = j.split(",");
let data = "";
for (let i = 0; i <= arr.length - 1; i++) {
data += arr[i].split(":")[0] + ":" + v[arr[i].split(":")[1]];
}
arr1.push(data);
} else {
arr1.push(v[j]);
}
});
arr.push(arr1);
});
return arr;
},
toInfor(scope) { toInfor(scope) {
debugger; debugger;
this.cxFormData.functionNum = scope.functionNum; this.cxFormData.functionNum = scope.functionNum;
......
...@@ -168,6 +168,7 @@ export default { ...@@ -168,6 +168,7 @@ export default {
}); });
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
loading.close();
} }
}); });
}, },
...@@ -186,6 +187,7 @@ export default { ...@@ -186,6 +187,7 @@ export default {
}); });
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
loading.close();
} }
}); });
}, },
......
...@@ -181,6 +181,7 @@ export default { ...@@ -181,6 +181,7 @@ export default {
}); });
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
loading.close();
} }
}); });
}, },
...@@ -199,6 +200,7 @@ export default { ...@@ -199,6 +200,7 @@ export default {
}); });
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
loading.close();
} }
}); });
}, },
......
...@@ -159,6 +159,7 @@ export default { ...@@ -159,6 +159,7 @@ export default {
}); });
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
loading.close();
} }
}); });
}, },
...@@ -179,6 +180,7 @@ export default { ...@@ -179,6 +180,7 @@ export default {
}); });
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
loading.close();
} }
}); });
}, },
......
...@@ -414,15 +414,15 @@ export default { ...@@ -414,15 +414,15 @@ export default {
index: "qjgnsyrz", index: "qjgnsyrz",
className: "iconfont icongongnengfuwu", className: "iconfont icongongnengfuwu",
hasChildren: false, hasChildren: false,
}, }
{ // {
id: "queryZdXsbk", // id: "queryZdXsbk",
label: "阵地布控模型管理", // label: "阵地布控模型管理",
newAuth: "M01", // newAuth: "M01",
index: "queryZdXsbk", // index: "queryZdXsbk",
className: "iconfont icongongnengfuwu", // className: "iconfont icongongnengfuwu",
hasChildren: false, // hasChildren: false,
}, // },
], ],
selectArr: [], selectArr: [],
revokeVisiable: false, revokeVisiable: false,
......
...@@ -421,14 +421,14 @@ export default { ...@@ -421,14 +421,14 @@ export default {
className: "iconfont iconrizhi", className: "iconfont iconrizhi",
disabled: false, disabled: false,
}, },
{ // {
id: "qgasjxxcx", // id: "qgasjxxcx",
label: "部资源查询", // label: "部资源查询",
index: "qgasjxxcx", // index: "qgasjxxcx",
auth: "M0101", // auth: "M0101",
className: "iconfont iconrizhi", // className: "iconfont iconrizhi",
disabled: false, // disabled: false,
}, // },
], ],
}, },
], ],
...@@ -936,7 +936,7 @@ export default { ...@@ -936,7 +936,7 @@ export default {
margin-right: 16px; margin-right: 16px;
cursor: pointer; cursor: pointer;
} }
/deep/.el-upload-list__item { ::v-deep.el-upload-list__item {
width: 350px; width: 350px;
} }
.hbyps { .hbyps {
......
...@@ -288,49 +288,49 @@ export default { ...@@ -288,49 +288,49 @@ export default {
className: "iconfont icongongnengfuwu", className: "iconfont icongongnengfuwu",
hasChildren: false, hasChildren: false,
}, },
{ // {
id: "wlfq", // id: "wlfq",
label: "标识号研判", // label: "标识号研判",
newAuth: "M03", // newAuth: "M03",
index: "6", // index: "6",
className: "iconfont icongongnengfuwu", // className: "iconfont icongongnengfuwu",
hasChildren: true, // hasChildren: true,
children: [ // children: [
{ // {
id: "wlfq", // id: "wlfq",
label: "网络贩枪", // label: "网络贩枪",
newAuth: "M301", // newAuth: "M301",
index: "wlfq", // index: "wlfq",
className: "iconfont icongongnengfuwu", // className: "iconfont icongongnengfuwu",
hasChildren: false, // hasChildren: false,
}, // },
{ // {
id: "wlfqkd", // id: "wlfqkd",
label: "网络贩枪快递", // label: "网络贩枪快递",
newAuth: "M302", // newAuth: "M302",
index: "wlfqkd", // index: "wlfqkd",
className: "iconfont icongongnengfuwu", // className: "iconfont icongongnengfuwu",
hasChildren: false, // hasChildren: false,
}, // },
{ // {
id: "kydhfx", // id: "kydhfx",
label: "客运带货分析", // label: "客运带货分析",
newAuth: "M303", // newAuth: "M303",
index: "kydhfx", // index: "kydhfx",
className: "iconfont icongongnengfuwu", // className: "iconfont icongongnengfuwu",
hasChildren: false, // hasChildren: false,
}, // },
{ // {
id: "qzlb", // id: "qzlb",
label: "群组列表", // label: "群组列表",
newAuth: "M303", // newAuth: "M303",
index: "qzlb", // index: "qzlb",
className: "iconfont icongongnengfuwu", // className: "iconfont icongongnengfuwu",
hasChildren: false, // hasChildren: false,
}, // },
], // ],
}, // },
], ],
}; };
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment