Merge branch 'master' of http://yun.pashanhoo.com:9090/bdc/bdcjg-web
Showing
21 changed files
with
1164 additions
and
1118 deletions
| ... | @@ -3,47 +3,47 @@ | ... | @@ -3,47 +3,47 @@ |
| 3 | </template> | 3 | </template> |
| 4 | 4 | ||
| 5 | <script> | 5 | <script> |
| 6 | import Chart from "./Chart"; | 6 | import Chart from "./Chart"; |
| 7 | import work from "@/api/work"; | 7 | import work from "@/api/work"; |
| 8 | export default { | 8 | export default { |
| 9 | data() { | 9 | data () { |
| 10 | return { | 10 | return { |
| 11 | cdata: { | 11 | cdata: { |
| 12 | category: [], | 12 | category: [], |
| 13 | lineData: [], | 13 | lineData: [], |
| 14 | barData: [], | 14 | barData: [], |
| 15 | }, | 15 | }, |
| 16 | }; | 16 | }; |
| 17 | }, | 17 | }, |
| 18 | components: { | 18 | components: { |
| 19 | Chart, | 19 | Chart, |
| 20 | }, | 20 | }, |
| 21 | mounted() { | 21 | mounted () { |
| 22 | window.addEventListener("resize", () => { | 22 | window.addEventListener("resize", () => { |
| 23 | this.submitViews(); | ||
| 24 | }); | ||
| 23 | this.submitViews(); | 25 | this.submitViews(); |
| 24 | }); | ||
| 25 | this.submitViews(); | ||
| 26 | }, | ||
| 27 | methods: { | ||
| 28 | async submitViews() { | ||
| 29 | try { | ||
| 30 | let { result: res } = await work.submitViews("A20"); | ||
| 31 | this.cdata.category = []; | ||
| 32 | this.cdata.barData = []; | ||
| 33 | this.cdata.lineData = []; | ||
| 34 | res.map((item) => { | ||
| 35 | return ( | ||
| 36 | this.cdata.category.push(item.areaName), | ||
| 37 | this.cdata.barData.push(item.successCount), | ||
| 38 | this.cdata.lineData.push(item.failureCount) | ||
| 39 | ); | ||
| 40 | }); | ||
| 41 | } catch (error) { | ||
| 42 | // this.$refs.msg.messageShow(); | ||
| 43 | } | ||
| 44 | }, | 26 | }, |
| 45 | }, | 27 | methods: { |
| 46 | }; | 28 | async submitViews () { |
| 29 | try { | ||
| 30 | let { result: res } = await work.submitViews("A20"); | ||
| 31 | this.cdata.category = []; | ||
| 32 | this.cdata.barData = []; | ||
| 33 | this.cdata.lineData = []; | ||
| 34 | res.map((item) => { | ||
| 35 | return ( | ||
| 36 | this.cdata.category.push(item.areaName), | ||
| 37 | this.cdata.barData.push(item.successCount), | ||
| 38 | this.cdata.lineData.push(item.failureCount) | ||
| 39 | ); | ||
| 40 | }); | ||
| 41 | } catch (error) { | ||
| 42 | // this.$refs.msg.messageShow(); | ||
| 43 | } | ||
| 44 | }, | ||
| 45 | }, | ||
| 46 | }; | ||
| 47 | </script> | 47 | </script> |
| 48 | 48 | ||
| 49 | <style lang="scss" scoped></style> | 49 | <style lang="scss" scoped></style> | ... | ... |
| ... | @@ -7,257 +7,254 @@ | ... | @@ -7,257 +7,254 @@ |
| 7 | ref="centreLeft2ChartRef" | 7 | ref="centreLeft2ChartRef" |
| 8 | width="100%" | 8 | width="100%" |
| 9 | height="100%" | 9 | height="100%" |
| 10 | :options="options" | 10 | :options="options"></Echart> |
| 11 | ></Echart> | ||
| 12 | </template> | 11 | </template> |
| 13 | 12 | ||
| 14 | <script> | 13 | <script> |
| 15 | import Echart from "@/common/echart"; | 14 | import Echart from "@/common/echart"; |
| 16 | import { mapGetters } from "vuex"; | 15 | import { mapGetters } from "vuex"; |
| 17 | export default { | 16 | export default { |
| 18 | data() { | 17 | data () { |
| 19 | return { | 18 | return { |
| 20 | options: {}, | 19 | options: {}, |
| 21 | max: "100", //最大value值 | 20 | max: "100", //最大value值 |
| 22 | min: "1", // 最小value值 | 21 | min: "1", // 最小value值 |
| 23 | key: 0, | 22 | key: 0, |
| 24 | mapjson: "", | 23 | mapjson: "", |
| 25 | }; | 24 | }; |
| 26 | }, | ||
| 27 | components: { | ||
| 28 | Echart, | ||
| 29 | }, | ||
| 30 | created() {}, | ||
| 31 | props: { | ||
| 32 | cdata: { | ||
| 33 | type: Array, | ||
| 34 | default: () => [], | ||
| 35 | }, | 25 | }, |
| 36 | }, | 26 | components: { |
| 37 | mounted() { | 27 | Echart, |
| 28 | }, | ||
| 29 | created () { }, | ||
| 30 | props: { | ||
| 31 | cdata: { | ||
| 32 | type: Array, | ||
| 33 | default: () => [], | ||
| 34 | }, | ||
| 35 | }, | ||
| 36 | mounted () { | ||
| 38 | 37 | ||
| 39 | window.addEventListener("resize", () => { | 38 | window.addEventListener("resize", () => { |
| 40 | this.key++; | 39 | this.key++; |
| 41 | }); | 40 | }); |
| 42 | this.getDistrictcode(); | 41 | this.getDistrictcode(); |
| 43 | }, | 42 | }, |
| 44 | watch: { | 43 | watch: { |
| 45 | cdata: { | 44 | cdata: { |
| 46 | handler(newData) { | 45 | handler (newData) { |
| 47 | let _this = this; | 46 | let _this = this; |
| 48 | // 设置点的位置(经纬度) | 47 | // 设置点的位置(经纬度) |
| 49 | const geoCoordMap = { | 48 | const geoCoordMap = { |
| 50 | 汉台区: [107.03187, 33.06774, 20], | 49 | 汉台区: [107.03187, 33.06774, 20], |
| 51 | 南郑区: [106.94024, 33.00299, 20], | 50 | 南郑区: [106.94024, 33.00299, 20], |
| 52 | 城固县: [107.33367, 33.15661, 20], | 51 | 城固县: [107.33367, 33.15661, 20], |
| 53 | 洋县: [107.545837, 33.222739, 20], | 52 | 洋县: [107.545837, 33.222739, 20], |
| 54 | 西乡县: [107.76867, 32.98411, 20], | 53 | 西乡县: [107.76867, 32.98411, 20], |
| 55 | 镇巴县: [107.89648, 32.53487, 20], | 54 | 镇巴县: [107.89648, 32.53487, 20], |
| 56 | 勉县: [106.673221, 33.153553, 20], | 55 | 勉县: [106.673221, 33.153553, 20], |
| 57 | 留坝县: [106.92233, 33.61606, 20], | 56 | 留坝县: [106.92233, 33.61606, 20], |
| 58 | 佛坪县: [107.98974, 33.52496, 20], | 57 | 佛坪县: [107.98974, 33.52496, 20], |
| 59 | 宁强县: [106.25958, 32.82881, 20], | 58 | 宁强县: [106.25958, 32.82881, 20], |
| 60 | 略阳县: [106.15399, 33.33009, 20], | 59 | 略阳县: [106.15399, 33.33009, 20], |
| 61 | }; | 60 | }; |
| 62 | this.options = { | 61 | this.options = { |
| 63 | showLegendSymbol: true, | 62 | showLegendSymbol: true, |
| 64 | tooltip: { | 63 | tooltip: { |
| 65 | trigger: "item", | 64 | trigger: "item", |
| 66 | textStyle: { | 65 | textStyle: { |
| 67 | fontSize: 14, | 66 | fontSize: 14, |
| 68 | lineHeight: 22, | 67 | lineHeight: 22, |
| 69 | }, | 68 | }, |
| 70 | position: (point) => { | 69 | position: (point) => { |
| 71 | // 固定在顶部 | 70 | // 固定在顶部 |
| 72 | return [point[0] + 50, point[1] - 20]; | 71 | return [point[0] + 50, point[1] - 20]; |
| 73 | }, | 72 | }, |
| 74 | // 如果需要自定义 tooltip样式,需要使用formatter | 73 | // 如果需要自定义 tooltip样式,需要使用formatter |
| 75 | formatter: (params) => { | 74 | formatter: (params) => { |
| 76 | return `<div style="">${params.name}:${ | 75 | return `<div style="">${params.name}:${params.value + "个" |
| 77 | params.value + "个" | 76 | }</div>`; |
| 78 | }</div>`; | 77 | }, |
| 79 | }, | ||
| 80 | }, | ||
| 81 | visualMap: { | ||
| 82 | min: 0, | ||
| 83 | max: _this.max, | ||
| 84 | bottom: "13%", | ||
| 85 | left: 50, | ||
| 86 | splitNumber: 6, | ||
| 87 | seriesIndex: [0], | ||
| 88 | itemWidth: 20, // 每个图元的宽度 | ||
| 89 | itemGap: 2, // 每两个图元之间的间隔距离,单位为px | ||
| 90 | pieces: [ | ||
| 91 | // 自定义每一段的范围,以及每一段的文字 | ||
| 92 | { gte: 100, label: "100以上", color: "#035cf5" }, // 不指定 max,表示 max 为无限大(Infinity)。 | ||
| 93 | { gte: 50, lte: 6000, label: "20-100", color: "#3375e4" }, | ||
| 94 | { gte: 20, lte: 2000, label: "1-200", color: "#6797ef" }, | ||
| 95 | { gte: 1, lte: 1000, label: "1-20", color: "#96b5ef" }, | ||
| 96 | ], | ||
| 97 | textStyle: { | ||
| 98 | color: "#737373", | ||
| 99 | }, | 78 | }, |
| 100 | }, | 79 | visualMap: { |
| 101 | geo: { | 80 | min: 0, |
| 102 | aspectScale: 1, //长宽比 | 81 | max: _this.max, |
| 103 | zoom: 1.1, | 82 | bottom: "13%", |
| 104 | mapType: "", // 自定义扩展图表类型 | 83 | left: 50, |
| 105 | top: "15%", | 84 | splitNumber: 6, |
| 106 | left: "10%", | 85 | seriesIndex: [0], |
| 107 | map: "汉中市", | 86 | itemWidth: 20, // 每个图元的宽度 |
| 108 | itemStyle: { | 87 | itemGap: 2, // 每两个图元之间的间隔距离,单位为px |
| 109 | normal: { | 88 | pieces: [ |
| 110 | //阴影 | 89 | // 自定义每一段的范围,以及每一段的文字 |
| 111 | areaColor: "#5689FD ", | 90 | { gte: 100, label: "100以上", color: "#035cf5" }, // 不指定 max,表示 max 为无限大(Infinity)。 |
| 112 | shadowColor: "#21371d", | 91 | { gte: 50, lte: 6000, label: "20-100", color: "#3375e4" }, |
| 113 | borderWidth: 0, | 92 | { gte: 20, lte: 2000, label: "1-200", color: "#6797ef" }, |
| 114 | shadowOffsetX: 2, | 93 | { gte: 1, lte: 1000, label: "1-20", color: "#96b5ef" }, |
| 115 | shadowOffsetY: 25, | 94 | ], |
| 95 | textStyle: { | ||
| 96 | color: "#737373", | ||
| 116 | }, | 97 | }, |
| 117 | }, | 98 | }, |
| 118 | }, | 99 | geo: { |
| 119 | series: [ | ||
| 120 | { | ||
| 121 | type: "map", | ||
| 122 | aspectScale: 1, //长宽比 | 100 | aspectScale: 1, //长宽比 |
| 123 | zoom: 1.1, | 101 | zoom: 1.1, |
| 124 | mapType: "汉中市", // 自定义扩展图表类型 | 102 | mapType: "", // 自定义扩展图表类型 |
| 125 | top: "15%", | 103 | top: "15%", |
| 126 | left: "10%", | 104 | left: "10%", |
| 105 | map: "汉中市", | ||
| 127 | itemStyle: { | 106 | itemStyle: { |
| 128 | normal: { | 107 | normal: { |
| 129 | areaColor: "rgba(19,54,162,.5)", | 108 | //阴影 |
| 130 | borderColor: "rgba(0,242,252,.5)", | 109 | areaColor: "#5689FD ", |
| 131 | borderWidth: 2, | 110 | shadowColor: "#21371d", |
| 132 | shadowBlur: 1, | 111 | borderWidth: 0, |
| 133 | borderColor: "rgb(155, 200, 200)", | 112 | shadowOffsetX: 2, |
| 134 | shadowColor: "#44f2fc", | 113 | shadowOffsetY: 25, |
| 135 | }, | 114 | }, |
| 136 | }, | 115 | }, |
| 137 | label: { | 116 | }, |
| 138 | formatter: (params) => { | 117 | series: [ |
| 139 | return `${params.name}\n${params.value + "个"}`; | 118 | { |
| 140 | }, | 119 | type: "map", |
| 141 | show: true, | 120 | aspectScale: 1, //长宽比 |
| 142 | position: "insideRight", | 121 | zoom: 1.1, |
| 143 | textStyle: { | 122 | mapType: "汉中市", // 自定义扩展图表类型 |
| 144 | fontSize: 14, | 123 | top: "15%", |
| 145 | color: "#efefef", | 124 | left: "10%", |
| 125 | itemStyle: { | ||
| 126 | normal: { | ||
| 127 | areaColor: "rgba(19,54,162,.5)", | ||
| 128 | borderColor: "rgba(0,242,252,.5)", | ||
| 129 | borderWidth: 2, | ||
| 130 | shadowBlur: 1, | ||
| 131 | borderColor: "rgb(155, 200, 200)", | ||
| 132 | shadowColor: "#44f2fc", | ||
| 133 | }, | ||
| 146 | }, | 134 | }, |
| 147 | emphasis: { | 135 | label: { |
| 136 | formatter: (params) => { | ||
| 137 | return `${params.name}\n${params.value + "个"}`; | ||
| 138 | }, | ||
| 139 | show: true, | ||
| 140 | position: "insideRight", | ||
| 148 | textStyle: { | 141 | textStyle: { |
| 149 | color: "#fff", | 142 | fontSize: 14, |
| 143 | color: "#efefef", | ||
| 144 | }, | ||
| 145 | emphasis: { | ||
| 146 | textStyle: { | ||
| 147 | color: "#fff", | ||
| 148 | }, | ||
| 150 | }, | 149 | }, |
| 151 | }, | 150 | }, |
| 151 | data: newData, | ||
| 152 | }, | 152 | }, |
| 153 | data: newData, | 153 | ], |
| 154 | }, | 154 | }; |
| 155 | ], | 155 | // 重新选择区域 |
| 156 | }; | 156 | this.handleMapRandomSelect(); |
| 157 | // 重新选择区域 | 157 | }, |
| 158 | this.handleMapRandomSelect(); | ||
| 159 | }, | ||
| 160 | 158 | ||
| 161 | immediate: true, | 159 | immediate: true, |
| 162 | deep: true, | 160 | deep: true, |
| 163 | }, | 161 | }, |
| 164 | }, | ||
| 165 | computed: { | ||
| 166 | ...mapGetters(["sidebar", "dicData"]), | ||
| 167 | logoName() { | ||
| 168 | return ( | ||
| 169 | this.dicData["sysCode"] && | ||
| 170 | this.dicData["sysCode"].filter((item) => item.DCODE == "areaMap") | ||
| 171 | ); | ||
| 172 | }, | ||
| 173 | }, | ||
| 174 | methods: { | ||
| 175 | // 根据行政区代码匹配行政区 | ||
| 176 | getDistrictcode() { | ||
| 177 | console.log("this.logoName.DNAME", this.logoName.DNAME); | ||
| 178 | if ((this.logoName.DNAME = "map610700")) { | ||
| 179 | this.mapjson = "hanzhong"; | ||
| 180 | require(`@/common/map/${this.mapjson}.js`); | ||
| 181 | } | ||
| 182 | }, | 162 | }, |
| 183 | // 开启定时器 | 163 | computed: { |
| 184 | startInterval() { | 164 | ...mapGetters(["sidebar", "dicData"]), |
| 185 | const _self = this; | 165 | logoName () { |
| 186 | // 应通过接口获取配置时间,暂时写死5s | 166 | return ( |
| 187 | const time = 2000; | 167 | this.dicData["sysCode"].filter((item) => { return item.DCODE == "areaMap" }) |
| 188 | if (this.intervalId !== null) { | 168 | ); |
| 189 | clearInterval(this.intervalId); | 169 | }, |
| 190 | } | ||
| 191 | this.intervalId = setInterval(() => { | ||
| 192 | this.$refs.centreLeft2ChartRef && _self.reSelectMapRandomArea(); | ||
| 193 | }, time); | ||
| 194 | }, | 170 | }, |
| 195 | // 重新随机选中地图区域 | 171 | methods: { |
| 196 | reSelectMapRandomArea() { | 172 | // 根据行政区代码匹配行政区 |
| 197 | const length = 9; | 173 | getDistrictcode () { |
| 198 | this.$nextTick(() => { | 174 | this.mapjson = "" |
| 199 | try { | 175 | if (this.logoName[0].DNAME) { |
| 200 | const map = this.$refs.centreLeft2ChartRef.chart; | 176 | this.mapjson = this.logoName[0].DNAME; |
| 201 | let index = Math.floor(Math.random() * length); | 177 | require(`@/common/map/${this.mapjson}.js`); |
| 202 | while (index === this.preSelectMapIndex || index >= length) { | ||
| 203 | index = Math.floor(Math.random() * length); | ||
| 204 | } | ||
| 205 | map.dispatchAction({ | ||
| 206 | type: "mapUnSelect", | ||
| 207 | seriesIndex: 0, | ||
| 208 | dataIndex: this.preSelectMapIndex, | ||
| 209 | }); | ||
| 210 | map.dispatchAction({ | ||
| 211 | type: "showTip", | ||
| 212 | seriesIndex: 0, | ||
| 213 | dataIndex: index, | ||
| 214 | }); | ||
| 215 | map.dispatchAction({ | ||
| 216 | type: "mapSelect", | ||
| 217 | seriesIndex: 0, | ||
| 218 | dataIndex: index, | ||
| 219 | }); | ||
| 220 | this.preSelectMapIndex = index; | ||
| 221 | } catch (error) { | ||
| 222 | console.log(error); | ||
| 223 | } | 178 | } |
| 224 | }); | 179 | }, |
| 225 | }, | 180 | // 开启定时器 |
| 226 | handleMapRandomSelect() { | 181 | startInterval () { |
| 227 | this.$nextTick(() => { | 182 | const _self = this; |
| 228 | try { | 183 | // 应通过接口获取配置时间,暂时写死5s |
| 229 | const map = this.$refs.centreLeft2ChartRef.chart; | 184 | const time = 2000; |
| 230 | const _self = this; | 185 | if (this.intervalId !== null) { |
| 231 | setTimeout(() => { | 186 | clearInterval(this.intervalId); |
| 232 | _self.reSelectMapRandomArea(); | 187 | } |
| 233 | }, 0); | 188 | this.intervalId = setInterval(() => { |
| 234 | // 移入区域,清除定时器、取消之前选中并选中当前 | 189 | this.$refs.centreLeft2ChartRef && _self.reSelectMapRandomArea(); |
| 235 | map.on("mouseover", function (params) { | 190 | }, time); |
| 236 | clearInterval(_self.intervalId); | 191 | }, |
| 192 | // 重新随机选中地图区域 | ||
| 193 | reSelectMapRandomArea () { | ||
| 194 | const length = 9; | ||
| 195 | this.$nextTick(() => { | ||
| 196 | try { | ||
| 197 | const map = this.$refs.centreLeft2ChartRef.chart; | ||
| 198 | let index = Math.floor(Math.random() * length); | ||
| 199 | while (index === this.preSelectMapIndex || index >= length) { | ||
| 200 | index = Math.floor(Math.random() * length); | ||
| 201 | } | ||
| 237 | map.dispatchAction({ | 202 | map.dispatchAction({ |
| 238 | type: "mapUnSelect", | 203 | type: "mapUnSelect", |
| 239 | seriesIndex: 0, | 204 | seriesIndex: 0, |
| 240 | dataIndex: _self.preSelectMapIndex, | 205 | dataIndex: this.preSelectMapIndex, |
| 206 | }); | ||
| 207 | map.dispatchAction({ | ||
| 208 | type: "showTip", | ||
| 209 | seriesIndex: 0, | ||
| 210 | dataIndex: index, | ||
| 241 | }); | 211 | }); |
| 242 | map.dispatchAction({ | 212 | map.dispatchAction({ |
| 243 | type: "mapSelect", | 213 | type: "mapSelect", |
| 244 | seriesIndex: 0, | 214 | seriesIndex: 0, |
| 245 | dataIndex: params.dataIndex, | 215 | dataIndex: index, |
| 246 | }); | 216 | }); |
| 247 | _self.preSelectMapIndex = params.dataIndex; | 217 | this.preSelectMapIndex = index; |
| 248 | }); | 218 | } catch (error) { |
| 249 | // 移出区域重新随机选中地图区域,并开启定时器 | 219 | console.log(error); |
| 250 | map.on("globalout", function () { | 220 | } |
| 251 | _self.reSelectMapRandomArea(); | 221 | }); |
| 252 | _self.startInterval(); | 222 | }, |
| 253 | }); | 223 | handleMapRandomSelect () { |
| 254 | this.startInterval(); | 224 | this.$nextTick(() => { |
| 255 | } catch (error) { | 225 | try { |
| 256 | console.log(error); | 226 | const map = this.$refs.centreLeft2ChartRef.chart; |
| 257 | } | 227 | const _self = this; |
| 258 | }); | 228 | setTimeout(() => { |
| 229 | _self.reSelectMapRandomArea(); | ||
| 230 | }, 0); | ||
| 231 | // 移入区域,清除定时器、取消之前选中并选中当前 | ||
| 232 | map.on("mouseover", function (params) { | ||
| 233 | clearInterval(_self.intervalId); | ||
| 234 | map.dispatchAction({ | ||
| 235 | type: "mapUnSelect", | ||
| 236 | seriesIndex: 0, | ||
| 237 | dataIndex: _self.preSelectMapIndex, | ||
| 238 | }); | ||
| 239 | map.dispatchAction({ | ||
| 240 | type: "mapSelect", | ||
| 241 | seriesIndex: 0, | ||
| 242 | dataIndex: params.dataIndex, | ||
| 243 | }); | ||
| 244 | _self.preSelectMapIndex = params.dataIndex; | ||
| 245 | }); | ||
| 246 | // 移出区域重新随机选中地图区域,并开启定时器 | ||
| 247 | map.on("globalout", function () { | ||
| 248 | _self.reSelectMapRandomArea(); | ||
| 249 | _self.startInterval(); | ||
| 250 | }); | ||
| 251 | this.startInterval(); | ||
| 252 | } catch (error) { | ||
| 253 | console.log(error); | ||
| 254 | } | ||
| 255 | }); | ||
| 256 | }, | ||
| 259 | }, | 257 | }, |
| 260 | }, | 258 | }; |
| 261 | }; | ||
| 262 | </script> | 259 | </script> |
| 263 | <style></style> | 260 | <style></style> | ... | ... |
| ... | @@ -2,6 +2,7 @@ | ... | @@ -2,6 +2,7 @@ |
| 2 | <div> | 2 | <div> |
| 3 | <i class="el-icon-s-management icon" :title="title" @click="openDialog" /> | 3 | <i class="el-icon-s-management icon" :title="title" @click="openDialog" /> |
| 4 | <el-dialog | 4 | <el-dialog |
| 5 | class="configuration" | ||
| 5 | :key="key" | 6 | :key="key" |
| 6 | :title="title" | 7 | :title="title" |
| 7 | :inner-dialog="true" | 8 | :inner-dialog="true" |
| ... | @@ -9,8 +10,7 @@ | ... | @@ -9,8 +10,7 @@ |
| 9 | width="600px" | 10 | width="600px" |
| 10 | :close-on-click-modal="false" | 11 | :close-on-click-modal="false" |
| 11 | append-to-body | 12 | append-to-body |
| 12 | @cancel="cancel" | 13 | @cancel="cancel"> |
| 13 | > | ||
| 14 | <vue-json-editor | 14 | <vue-json-editor |
| 15 | id="minejson" | 15 | id="minejson" |
| 16 | v-model="resultInfo" | 16 | v-model="resultInfo" |
| ... | @@ -18,15 +18,13 @@ | ... | @@ -18,15 +18,13 @@ |
| 18 | lang="zh" | 18 | lang="zh" |
| 19 | @json-change="onJsonChange" | 19 | @json-change="onJsonChange" |
| 20 | @json-save="onJsonSave" | 20 | @json-save="onJsonSave" |
| 21 | @has-error="onError" | 21 | @has-error="onError" /> |
| 22 | /> | ||
| 23 | <el-tooltip | 22 | <el-tooltip |
| 24 | content="全屏缩放" | 23 | content="全屏缩放" |
| 25 | effect="dark" | 24 | effect="dark" |
| 26 | placement="bottom" | 25 | placement="bottom" |
| 27 | fullscreen | 26 | fullscreen |
| 28 | class="fullScreen" | 27 | class="fullScreen"> |
| 29 | > | ||
| 30 | <i class="el-icon-full-screen" @click="enLarge" /> | 28 | <i class="el-icon-full-screen" @click="enLarge" /> |
| 31 | </el-tooltip> | 29 | </el-tooltip> |
| 32 | <template slot="footer"> | 30 | <template slot="footer"> |
| ... | @@ -34,142 +32,156 @@ | ... | @@ -34,142 +32,156 @@ |
| 34 | <el-button | 32 | <el-button |
| 35 | type="primary" | 33 | type="primary" |
| 36 | class="confirmBtn" | 34 | class="confirmBtn" |
| 37 | @click="onJsonSave" | 35 | @click="onJsonSave">保存</el-button> |
| 38 | >保存</el-button> | ||
| 39 | <el-button | 36 | <el-button |
| 40 | type="primary" | 37 | type="primary" |
| 41 | class="cancelBtn" | 38 | class="cancelBtn" |
| 42 | @click="cancel" | 39 | @click="cancel">关闭</el-button> |
| 43 | >关闭</el-button> | ||
| 44 | </div> | 40 | </div> |
| 45 | </template> | 41 | </template> |
| 46 | </el-dialog> | 42 | </el-dialog> |
| 47 | </div> | 43 | </div> |
| 48 | </template> | 44 | </template> |
| 49 | <script> | 45 | <script> |
| 50 | import vueJsonEditor from 'vue-json-editor' | 46 | import vueJsonEditor from 'vue-json-editor' |
| 51 | export default { | 47 | export default { |
| 52 | components: { | 48 | components: { |
| 53 | vueJsonEditor | 49 | vueJsonEditor |
| 54 | }, | ||
| 55 | props: { | ||
| 56 | title: { | ||
| 57 | type: String, | ||
| 58 | default: '配置参数' | ||
| 59 | }, | 50 | }, |
| 60 | resultInfos: { | 51 | props: { |
| 61 | type: String, | 52 | title: { |
| 62 | default: '' | 53 | type: String, |
| 63 | } | 54 | default: '配置参数' |
| 64 | }, | ||
| 65 | data() { | ||
| 66 | return { | ||
| 67 | activeNames: [], | ||
| 68 | resultInfo: {}, | ||
| 69 | tmpResultInfo: {}, | ||
| 70 | dialogVisible: false, | ||
| 71 | hasJsonFlag: true, | ||
| 72 | key: 0, | ||
| 73 | isEnlarge: false | ||
| 74 | } | ||
| 75 | }, | ||
| 76 | watch: { | ||
| 77 | resultInfos: { | ||
| 78 | handler: function(val) { | ||
| 79 | ++this.key | ||
| 80 | this.resultInfo = | ||
| 81 | this.resultInfos === '' ? {} : JSON.parse(this.resultInfos) | ||
| 82 | this.tmpResultInfo = this.resultInfo | ||
| 83 | }, | 55 | }, |
| 84 | deep: true, | 56 | resultInfos: { |
| 85 | immediate: true | 57 | type: String, |
| 86 | } | 58 | default: '' |
| 87 | }, | ||
| 88 | |||
| 89 | mounted() { | ||
| 90 | this.resultInfo = | ||
| 91 | this.resultInfos === '' ? {} : JSON.parse(this.resultInfos) | ||
| 92 | }, | ||
| 93 | |||
| 94 | methods: { | ||
| 95 | onJsonChange(value) { | ||
| 96 | // 只有在格式正确的时候进入此事件 | ||
| 97 | this.hasJsonFlag = true | ||
| 98 | }, | ||
| 99 | onJsonSave() { | ||
| 100 | const value = this.resultInfo | ||
| 101 | console.log(this.resultInfo, 'resultInfo') | ||
| 102 | if (this.hasJsonFlag === false) { | ||
| 103 | this.$message.error({ message: 'json格式验证失败', showClose: true }) | ||
| 104 | // alert("json验证失败") | ||
| 105 | return false | ||
| 106 | } else { | ||
| 107 | this.dialogVisible = false | ||
| 108 | this.$emit('getJsonString', JSON.stringify(value)) | ||
| 109 | return true | ||
| 110 | } | 59 | } |
| 111 | }, | 60 | }, |
| 112 | onError(value) { | 61 | data () { |
| 113 | this.hasJsonFlag = false | 62 | return { |
| 63 | activeNames: [], | ||
| 64 | resultInfo: {}, | ||
| 65 | tmpResultInfo: {}, | ||
| 66 | dialogVisible: false, | ||
| 67 | hasJsonFlag: true, | ||
| 68 | key: 0, | ||
| 69 | isEnlarge: false | ||
| 70 | } | ||
| 114 | }, | 71 | }, |
| 115 | openDialog() { | 72 | watch: { |
| 116 | this.dialogVisible = true | 73 | resultInfos: { |
| 74 | handler: function (val) { | ||
| 75 | ++this.key | ||
| 76 | this.resultInfo = | ||
| 77 | this.resultInfos === '' ? {} : JSON.parse(this.resultInfos) | ||
| 78 | this.tmpResultInfo = this.resultInfo | ||
| 79 | }, | ||
| 80 | deep: true, | ||
| 81 | immediate: true | ||
| 82 | } | ||
| 117 | }, | 83 | }, |
| 118 | cancel() { | 84 | |
| 119 | console.log(this.tmpResultInfo, 'tmpResultInfo') | 85 | mounted () { |
| 120 | this.resultInfo = this.tmpResultInfo | 86 | this.resultInfo = |
| 121 | this.dialogVisible = false | 87 | this.resultInfos === '' ? {} : JSON.parse(this.resultInfos) |
| 122 | }, | 88 | }, |
| 123 | // 放大 | 89 | |
| 124 | enLarge() { | 90 | methods: { |
| 125 | const fullarea = document.getElementById('minejson') | 91 | onJsonChange (value) { |
| 126 | if (fullarea.requestFullscreen) { | 92 | // 只有在格式正确的时候进入此事件 |
| 127 | fullarea.requestFullscreen() | 93 | this.hasJsonFlag = true |
| 128 | } else if (fullarea.webkitRequestFullScreen) { | 94 | }, |
| 129 | fullarea.webkitRequestFullScreen() // webkit内核(chrome、safari、Opera等) | 95 | onJsonSave () { |
| 130 | } else if (fullarea.mozRequestFullScreen) { | 96 | const value = this.resultInfo |
| 131 | fullarea.mozRequestFullScreen() // moz内核(firefox) | 97 | console.log(this.resultInfo, 'resultInfo') |
| 132 | } else if (fullarea.msRequestFullscreen) { | 98 | if (this.hasJsonFlag === false) { |
| 133 | fullarea.msRequestFullscreen() // IE11、edge | 99 | this.$message.error({ message: 'json格式验证失败', showClose: true }) |
| 100 | // alert("json验证失败") | ||
| 101 | return false | ||
| 102 | } else { | ||
| 103 | this.dialogVisible = false | ||
| 104 | this.$emit('getJsonString', JSON.stringify(value)) | ||
| 105 | return true | ||
| 106 | } | ||
| 107 | }, | ||
| 108 | onError (value) { | ||
| 109 | this.hasJsonFlag = false | ||
| 110 | }, | ||
| 111 | openDialog () { | ||
| 112 | this.dialogVisible = true | ||
| 113 | }, | ||
| 114 | cancel () { | ||
| 115 | console.log(this.tmpResultInfo, 'tmpResultInfo') | ||
| 116 | this.resultInfo = this.tmpResultInfo | ||
| 117 | this.dialogVisible = false | ||
| 118 | }, | ||
| 119 | // 放大 | ||
| 120 | enLarge () { | ||
| 121 | const fullarea = document.getElementById('minejson') | ||
| 122 | if (fullarea.requestFullscreen) { | ||
| 123 | fullarea.requestFullscreen() | ||
| 124 | } else if (fullarea.webkitRequestFullScreen) { | ||
| 125 | fullarea.webkitRequestFullScreen() // webkit内核(chrome、safari、Opera等) | ||
| 126 | } else if (fullarea.mozRequestFullScreen) { | ||
| 127 | fullarea.mozRequestFullScreen() // moz内核(firefox) | ||
| 128 | } else if (fullarea.msRequestFullscreen) { | ||
| 129 | fullarea.msRequestFullscreen() // IE11、edge | ||
| 130 | } | ||
| 131 | this.isEnlarge = true | ||
| 134 | } | 132 | } |
| 135 | this.isEnlarge = true | ||
| 136 | } | 133 | } |
| 137 | } | 134 | } |
| 138 | } | ||
| 139 | </script> | 135 | </script> |
| 140 | 136 | ||
| 141 | <style scoped lang="scss"> | 137 | <style scoped lang="scss"> |
| 142 | /* jsoneditor右上角默认有一个链接,加css去掉了 */ | 138 | /* jsoneditor右上角默认有一个链接,加css去掉了 */ |
| 143 | .icon { | 139 | .icon { |
| 144 | color: #349af3; | 140 | color: #349af3; |
| 145 | } | 141 | } |
| 146 | /deep/ .jsoneditor-vue { | 142 | /deep/ .jsoneditor-vue { |
| 147 | height: 100%; | 143 | height: 100%; |
| 148 | } | 144 | } |
| 149 | .fullScreen { | 145 | .fullScreen { |
| 150 | position: absolute; | 146 | position: absolute; |
| 151 | right: 5%; | 147 | right: 5%; |
| 152 | top: 22%; | 148 | top: 20%; |
| 153 | cursor: pointer; | 149 | cursor: pointer; |
| 154 | color: #fff; | 150 | color: #fff; |
| 155 | } | 151 | } |
| 156 | /deep/ .jsoneditor-modes { | 152 | /deep/ .jsoneditor-modes { |
| 157 | display: none !important; | 153 | display: none !important; |
| 158 | } | 154 | } |
| 159 | .jsoneditor-poweredBy { | 155 | /deep/.jsoneditor-poweredBy { |
| 160 | display: none !important; | 156 | display: none !important; |
| 161 | } | 157 | } |
| 162 | .jsoneditor-menu { | 158 | .jsoneditor-menu { |
| 163 | background-color: #9c9e9f !important; | 159 | background-color: #9c9e9f !important; |
| 164 | border-bottom: 1px solid #9c9e9f !important; | 160 | border-bottom: 1px solid #9c9e9f !important; |
| 165 | } | 161 | } |
| 166 | .jsoneditor { | 162 | .jsoneditor { |
| 167 | border: 1px solid #9c9e9f !important; | 163 | border: 1px solid #9c9e9f !important; |
| 168 | } | 164 | } |
| 169 | .el-collapse { | 165 | .el-collapse { |
| 170 | border: 0; | 166 | border: 0; |
| 171 | } | 167 | } |
| 172 | .el-collapse-item__header { | 168 | .el-collapse-item__header { |
| 173 | height: 44px; | 169 | height: 44px; |
| 174 | } | 170 | } |
| 171 | .configuration { | ||
| 172 | color: white; | ||
| 173 | margin-top: 6vh; | ||
| 174 | /deep/.el-dialog { | ||
| 175 | background-color: #031a46 !important; | ||
| 176 | border: 1px solid #5f82c7; | ||
| 177 | .el-dialog__header { | ||
| 178 | .el-dialog__title { | ||
| 179 | color: white !important; | ||
| 180 | } | ||
| 181 | .el-dialog__headerbtn { | ||
| 182 | top: 20px; | ||
| 183 | } | ||
| 184 | } | ||
| 185 | } | ||
| 186 | } | ||
| 175 | </style> | 187 | </style> | ... | ... |
| ... | @@ -524,4 +524,45 @@ tr:hover { | ... | @@ -524,4 +524,45 @@ tr:hover { |
| 524 | .el-select-dropdown__item.hover, | 524 | .el-select-dropdown__item.hover, |
| 525 | .el-select-dropdown__item:hover { | 525 | .el-select-dropdown__item:hover { |
| 526 | background-color: transparent !important; | 526 | background-color: transparent !important; |
| 527 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 527 | } | ||
| 528 | |||
| 529 | // 提示框 | ||
| 530 | .el-message-box { | ||
| 531 | background-color: #031a46; | ||
| 532 | border: 1px solid #5f82c7; | ||
| 533 | |||
| 534 | .el-message-box__title{ | ||
| 535 | color: white; | ||
| 536 | } | ||
| 537 | .el-message-box__content{ | ||
| 538 | color: white; | ||
| 539 | } | ||
| 540 | } | ||
| 541 | // 上级菜单 | ||
| 542 | .el-cascader__dropdown { | ||
| 543 | background-color: #031a46; | ||
| 544 | border: 1px solid #5f82c7; | ||
| 545 | |||
| 546 | } | ||
| 547 | .el-cascader-menu{ | ||
| 548 | color: white; | ||
| 549 | } | ||
| 550 | .el-radio | ||
| 551 | { | ||
| 552 | .el-cascader-menu:hover{ | ||
| 553 | color: white; | ||
| 554 | } | ||
| 555 | } | ||
| 556 | .el-cascader-node:not(.is-disabled):hover, .el-cascader-node:not(.is-disabled):focus { | ||
| 557 | background: #F5F7FA; | ||
| 558 | background-image: initial; | ||
| 559 | background-position-x: initial; | ||
| 560 | background-position-y: initial; | ||
| 561 | background-size: initial; | ||
| 562 | background-repeat-x: initial; | ||
| 563 | background-repeat-y: initial; | ||
| 564 | background-attachment: initial; | ||
| 565 | background-origin: initial; | ||
| 566 | background-clip: initial; | ||
| 567 | background-color: rgb(80, 142, 235); | ||
| 568 | } | ... | ... |
| ... | @@ -21,4 +21,4 @@ export default function filterAsyncRouter (routers) { | ... | @@ -21,4 +21,4 @@ export default function filterAsyncRouter (routers) { |
| 21 | } | 21 | } |
| 22 | function loadView (view) { | 22 | function loadView (view) { |
| 23 | return r => require.ensure([], () => r(require(`@/views${view}.vue`))) | 23 | return r => require.ensure([], () => r(require(`@/views${view}.vue`))) |
| 24 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 24 | } | ... | ... |
| ... | @@ -11,74 +11,74 @@ | ... | @@ -11,74 +11,74 @@ |
| 11 | </template> | 11 | </template> |
| 12 | 12 | ||
| 13 | <script> | 13 | <script> |
| 14 | import maps from "@/components/Echart/Map"; | 14 | import maps from "@/components/Echart/Map"; |
| 15 | import brokenline from "@/components/Echart/Brokenline"; | 15 | import brokenline from "@/components/Echart/Brokenline"; |
| 16 | export default { | 16 | export default { |
| 17 | data () { | 17 | data () { |
| 18 | return {}; | 18 | return {}; |
| 19 | }, | 19 | }, |
| 20 | components: { maps, brokenline }, | 20 | components: { maps, brokenline }, |
| 21 | mounted () { }, | 21 | mounted () { }, |
| 22 | beforeDestroy () { }, | 22 | beforeDestroy () { }, |
| 23 | methods: {}, | 23 | methods: {}, |
| 24 | }; | 24 | }; |
| 25 | </script> | 25 | </script> |
| 26 | 26 | ||
| 27 | <style lang="scss" scoped> | 27 | <style lang="scss" scoped> |
| 28 | .centercard { | 28 | .centercard { |
| 29 | width: 44%; | 29 | width: 44%; |
| 30 | height: calc(100vh - 114px); | 30 | height: calc(100vh - 114px); |
| 31 | box-sizing: border-box; | 31 | box-sizing: border-box; |
| 32 | padding: 0 .0521rem; | 32 | padding: 0 0.0521rem; |
| 33 | display: flex; | 33 | display: flex; |
| 34 | flex-direction: column; | 34 | flex-direction: column; |
| 35 | 35 | ||
| 36 | .card1 { | 36 | .card1 { |
| 37 | width: 100%; | 37 | width: 100%; |
| 38 | background: url("~@/image/mapcenter.png") no-repeat; | 38 | background: url("~@/image/mapcenter.png") no-repeat; |
| 39 | background-size: 100% 100%; | 39 | background-size: 100% 100%; |
| 40 | position: relative; | 40 | position: relative; |
| 41 | height: 64%; | 41 | height: 64%; |
| 42 | 42 | ||
| 43 | .title { | 43 | .title { |
| 44 | position: absolute; | 44 | position: absolute; |
| 45 | font-weight: bold; | 45 | font-weight: bold; |
| 46 | color: #02D9FD; | 46 | color: #02d9fd; |
| 47 | line-height: .1354rem; | 47 | line-height: 0.1354rem; |
| 48 | font-size: .1146rem; | 48 | font-size: 0.1146rem; |
| 49 | position: absolute; | 49 | position: absolute; |
| 50 | left: 0; | 50 | left: 0; |
| 51 | right: 0; | 51 | right: 0; |
| 52 | top: .0365rem; | 52 | top: 0.0365rem; |
| 53 | text-align: right; | 53 | text-align: right; |
| 54 | padding-right: 15%; | 54 | padding-right: 15%; |
| 55 | } | ||
| 55 | } | 56 | } |
| 56 | } | ||
| 57 | |||
| 58 | .card2 { | ||
| 59 | width: 100%; | ||
| 60 | background: url("~@/image/sjqs.png") no-repeat; | ||
| 61 | background-size: 100% 100%; | ||
| 62 | position: relative; | ||
| 63 | flex: 1; | ||
| 64 | 57 | ||
| 65 | .title { | 58 | .card2 { |
| 66 | position: absolute; | ||
| 67 | font-weight: bold; | ||
| 68 | color: #02D9FD; | ||
| 69 | line-height: .1354rem; | ||
| 70 | font-size: .1146rem; | ||
| 71 | position: absolute; | ||
| 72 | left: 0; | ||
| 73 | right: 0; | ||
| 74 | top: .0365rem; | ||
| 75 | text-align: center; | ||
| 76 | margin-bottom: .0521rem; | ||
| 77 | } | ||
| 78 | .brokenline { | ||
| 79 | margin: auto; | ||
| 80 | width: 100%; | 59 | width: 100%; |
| 60 | background: url("~@/image/sjqs.png") no-repeat; | ||
| 61 | background-size: 100% 100%; | ||
| 62 | position: relative; | ||
| 63 | flex: 1; | ||
| 64 | |||
| 65 | .title { | ||
| 66 | position: absolute; | ||
| 67 | font-weight: bold; | ||
| 68 | color: #02d9fd; | ||
| 69 | line-height: 0.1354rem; | ||
| 70 | font-size: 0.1146rem; | ||
| 71 | position: absolute; | ||
| 72 | left: 0; | ||
| 73 | right: 0; | ||
| 74 | top: 0.0365rem; | ||
| 75 | text-align: center; | ||
| 76 | margin-bottom: 0.0521rem; | ||
| 77 | } | ||
| 78 | .brokenline { | ||
| 79 | margin: auto; | ||
| 80 | width: 100%; | ||
| 81 | } | ||
| 81 | } | 82 | } |
| 82 | } | 83 | } |
| 83 | } | ||
| 84 | </style> | 84 | </style> | ... | ... |
| ... | @@ -13,59 +13,57 @@ | ... | @@ -13,59 +13,57 @@ |
| 13 | <dv-decoration-5 | 13 | <dv-decoration-5 |
| 14 | :dur="1" | 14 | :dur="1" |
| 15 | class="dv-dec-5" | 15 | class="dv-dec-5" |
| 16 | :color="decorationColor" | 16 | :color="decorationColor" /> |
| 17 | /> | ||
| 18 | </div> | 17 | </div> |
| 19 | <dv-decoration-8 | 18 | <dv-decoration-8 |
| 20 | class="dv-dec-8" | 19 | class="dv-dec-8" |
| 21 | :reverse="true" | 20 | :reverse="true" |
| 22 | :color="decorationColor" | 21 | :color="decorationColor" /> |
| 23 | /> | ||
| 24 | </div> | 22 | </div> |
| 25 | <dv-decoration-10 class="dv-dec-10-s" /> | 23 | <dv-decoration-10 class="dv-dec-10-s" /> |
| 26 | </div> | 24 | </div> |
| 27 | </div> | 25 | </div> |
| 28 | <screencontent v-show="isshow"/> | 26 | <screencontent v-show="isshow" /> |
| 29 | </div> | 27 | </div> |
| 30 | </div> | 28 | </div> |
| 31 | </div> | 29 | </div> |
| 32 | </template> | 30 | </template> |
| 33 | <script> | 31 | <script> |
| 34 | import drawMixin from "@/utils/drawMixin"; | 32 | import drawMixin from "@/utils/drawMixin"; |
| 35 | import screencontent from "./screencontent"; | 33 | import screencontent from "./screencontent"; |
| 36 | export default { | 34 | export default { |
| 37 | mixins: [drawMixin], | 35 | mixins: [drawMixin], |
| 38 | data() { | 36 | data () { |
| 39 | return { | 37 | return { |
| 40 | isshow:true, | 38 | isshow: true, |
| 41 | loading: true, | 39 | loading: true, |
| 42 | decorationColor: ["#568aea", "#568aea"], | 40 | decorationColor: ["#568aea", "#568aea"], |
| 43 | }; | 41 | }; |
| 44 | }, | 42 | }, |
| 45 | components: { | 43 | components: { |
| 46 | screencontent, | 44 | screencontent, |
| 47 | }, | 45 | }, |
| 48 | mounted() { | 46 | mounted () { |
| 49 | 47 | ||
| 50 | // this.timeFn(); | 48 | // this.timeFn(); |
| 51 | this.cancelLoading(); | 49 | this.cancelLoading(); |
| 52 | }, | 50 | }, |
| 53 | beforeDestroy() { | 51 | beforeDestroy () { |
| 54 | clearInterval(this.timing); | 52 | clearInterval(this.timing); |
| 55 | }, | 53 | }, |
| 56 | methods: { | 54 | methods: { |
| 57 | cancelLoading() { | 55 | cancelLoading () { |
| 58 | setTimeout(() => { | 56 | setTimeout(() => { |
| 59 | this.loading = false; | 57 | this.loading = false; |
| 60 | }, 500); | 58 | }, 500); |
| 59 | }, | ||
| 60 | }, | ||
| 61 | computed: { | ||
| 62 | ...mapGetters(["products"]), | ||
| 61 | }, | 63 | }, |
| 62 | }, | 64 | }; |
| 63 | computed: { | ||
| 64 | ...mapGetters(["products"]), | ||
| 65 | }, | ||
| 66 | }; | ||
| 67 | </script> | 65 | </script> |
| 68 | 66 | ||
| 69 | <style scoped lang="scss"> | 67 | <style scoped lang="scss"> |
| 70 | @import "./index.scss"; | 68 | @import "./index.scss"; |
| 71 | </style> | 69 | </style> | ... | ... |
| ... | @@ -55,206 +55,197 @@ | ... | @@ -55,206 +55,197 @@ |
| 55 | 55 | ||
| 56 | <script> | 56 | <script> |
| 57 | 57 | ||
| 58 | import columnar from "@/components/Echart/Columnar"; | 58 | import columnar from "@/components/Echart/Columnar"; |
| 59 | import work from "@/api/work"; | 59 | import work from "@/api/work"; |
| 60 | export default { | 60 | export default { |
| 61 | data () { | 61 | data () { |
| 62 | return { | 62 | return { |
| 63 | // 日均接入量 | 63 | // 日均接入量 |
| 64 | qxerrer: "", | 64 | qxerrer: "", |
| 65 | qxsuccess: "", | 65 | qxsuccess: "", |
| 66 | sterrer: "", | 66 | sterrer: "", |
| 67 | stsuccess: "", | 67 | stsuccess: "", |
| 68 | qxjrl: "", | 68 | qxjrl: "", |
| 69 | stjrl: "", | 69 | stjrl: "", |
| 70 | qxcgl: "", | 70 | qxcgl: "", |
| 71 | stcgl: "" | 71 | stcgl: "" |
| 72 | }; | 72 | }; |
| 73 | }, | ||
| 74 | mounted () { | ||
| 75 | this.getsthjqxjrtotal(); | ||
| 76 | }, | ||
| 77 | components: { columnar }, | ||
| 78 | computed: { | ||
| 79 | qxjrlList: function () { | ||
| 80 | return this.qxjrl && this.qxjrl.toString().split(""); | ||
| 81 | }, | 73 | }, |
| 82 | stjrlList: function () { | 74 | mounted () { |
| 83 | return this.stjrl && this.stjrl.toString().split(""); | 75 | this.getsthjqxjrtotal(); |
| 84 | }, | 76 | }, |
| 85 | }, | 77 | components: { columnar }, |
| 86 | methods: { | 78 | computed: { |
| 87 | getsthjqxjrtotal () { | 79 | qxjrlList: function () { |
| 88 | return new Promise(async (resolve) => { | 80 | return this.qxjrl && this.qxjrl.toString().split(""); |
| 89 | try { | 81 | }, |
| 90 | let p = { | 82 | stjrlList: function () { |
| 91 | DJLX: "", | 83 | return this.stjrl && this.stjrl.toString().split(""); |
| 92 | QLLX: "", | 84 | }, |
| 93 | XZQDM: "", | 85 | }, |
| 94 | }; | 86 | methods: { |
| 95 | let res = await work.getsthjqxjrtotal(p); | 87 | getsthjqxjrtotal () { |
| 96 | this.stjrl=res.result.stsum | 88 | return new Promise(async (resolve) => { |
| 97 | this.qxjrl=res.result.qxsum | 89 | try { |
| 98 | this.qxerrer=Number(res.result.qxjrerrer) | 90 | let p = { |
| 99 | this.sterrer=Number(res.result.sthjerrer) | 91 | DJLX: "", |
| 100 | if(res.result.sum=="0"){ | 92 | QLLX: "", |
| 101 | this.qxcgl="100%" | 93 | XZQDM: "", |
| 102 | this.stcgl="100%" | 94 | }; |
| 103 | }else{ | 95 | let res = await work.getsthjqxjrtotal(p); |
| 104 | let qxcglnum=Number(res.result.qxjrsuccess)/this.qxjrl*100 | 96 | this.stjrl = res.result.stsum |
| 105 | let stcgl=Number(res.result.sthjsuccess)/this.qxjrl*100 | 97 | this.qxjrl = res.result.qxsum |
| 106 | this.qxcgl=qxcglnum.toFixed(2)+"%"; | 98 | this.qxerrer = Number(res.result.qxjrerrer) |
| 107 | this.stcgl=stcgl.toFixed(2)+"%"; | 99 | this.sterrer = Number(res.result.sthjerrer) |
| 108 | 100 | if (res.result.sum == "0") { | |
| 101 | this.qxcgl = "100%" | ||
| 102 | this.stcgl = "100%" | ||
| 103 | } else { | ||
| 104 | let qxcglnum = Number(res.result.qxjrsuccess) / this.qxjrl * 100 | ||
| 105 | let stcgl = Number(res.result.sthjsuccess) / this.qxjrl * 100 | ||
| 106 | this.qxcgl = qxcglnum.toFixed(2) + "%"; | ||
| 107 | this.stcgl = stcgl.toFixed(2) + "%"; | ||
| 108 | |||
| 109 | } | ||
| 110 | } catch (error) { | ||
| 111 | this.$refs.msg.messageShow(); | ||
| 109 | } | 112 | } |
| 110 | } catch (error) { | 113 | }); |
| 111 | this.$refs.msg.messageShow(); | 114 | }, |
| 112 | } | ||
| 113 | }); | ||
| 114 | }, | 115 | }, |
| 115 | }, | 116 | }; |
| 116 | }; | ||
| 117 | </script> | 117 | </script> |
| 118 | 118 | ||
| 119 | <style lang="scss" scoped> | 119 | <style lang="scss" scoped> |
| 120 | .leftcard { | 120 | .leftcard { |
| 121 | width: 32%; | 121 | width: 32%; |
| 122 | height: calc(100vh -114px); | ||
| 123 | display: flex; | ||
| 124 | flex-direction: column; | ||
| 125 | |||
| 126 | .card { | ||
| 127 | background: url("~@/image/qxjr.png") no-repeat; | ||
| 128 | background-size: 100% 100%; | ||
| 129 | position: relative; | ||
| 130 | text-align: center; | ||
| 131 | width: 100%; | ||
| 132 | height: 22%; | ||
| 133 | } | ||
| 134 | .carda { | ||
| 135 | background: url("~@/image/sthj.png") no-repeat; | ||
| 136 | background-size: 100% 100%; | ||
| 137 | position: relative; | ||
| 138 | text-align: center; | ||
| 139 | width: 100%; | ||
| 140 | height: 22%; | ||
| 141 | } | ||
| 142 | |||
| 143 | // .card1 { | ||
| 144 | // background: url("~@/image/sbtj.png") no-repeat; | ||
| 145 | // background-size: 100% 100%; | ||
| 146 | // position: relative; | ||
| 147 | // text-align: center; | ||
| 148 | // width: 100%; | ||
| 149 | // padding: .0417rem 0; | ||
| 150 | // height: 49%; | ||
| 151 | // } | ||
| 152 | |||
| 153 | .card1 { | ||
| 154 | background: url("~@/image/sbtj.png") no-repeat; | ||
| 155 | background-size: 100% 100%; | ||
| 156 | position: relative; | ||
| 157 | box-sizing: border-box; | ||
| 158 | flex: 1; | ||
| 159 | height: 56%; | ||
| 160 | } | ||
| 161 | |||
| 162 | .cardhead { | ||
| 163 | color: #02d9fd; | ||
| 164 | line-height: .125rem; | ||
| 165 | letter-spacing: .0104rem; | ||
| 166 | position: absolute; | ||
| 167 | font-size: .1042rem; | ||
| 168 | left: 0; | ||
| 169 | right: 0; | ||
| 170 | margin: auto; | ||
| 171 | text-align: center; | ||
| 172 | top: 8px; | ||
| 173 | font-weight: 700; | ||
| 174 | } | ||
| 175 | |||
| 176 | .rjjrlList { | ||
| 177 | display: flex; | 122 | display: flex; |
| 178 | margin-top: .01781rem; | 123 | height: calc(100vh - 114px); |
| 124 | flex-direction: column; | ||
| 179 | 125 | ||
| 180 | .qxjr { | 126 | .card { |
| 181 | background: url("~@/image/jrl3.png"); | 127 | height: 22%; |
| 128 | background: url("~@/image/qxjr.png") no-repeat; | ||
| 182 | background-size: 100% 100%; | 129 | background-size: 100% 100%; |
| 130 | position: relative; | ||
| 131 | text-align: center; | ||
| 132 | width: 100%; | ||
| 183 | } | 133 | } |
| 184 | 134 | .carda { | |
| 185 | .sthj { | 135 | height: 22%; |
| 186 | background: url("~@/image/jh.png"); | 136 | background: url("~@/image/sthj.png") no-repeat; |
| 187 | background-size: 100% 100%; | 137 | background-size: 100% 100%; |
| 188 | } | 138 | position: relative; |
| 189 | 139 | text-align: center; | |
| 190 | p { | 140 | width: 100%; |
| 191 | margin: 0 .0156rem .0521rem .0156rem; | ||
| 192 | font-weight: 700; | ||
| 193 | width: .195rem; | ||
| 194 | height: .2475rem; | ||
| 195 | font-size: .2863rem; | ||
| 196 | font-size: .2867rem; | ||
| 197 | } | 141 | } |
| 198 | } | ||
| 199 | 142 | ||
| 200 | .cardcontent { | 143 | .card1 { |
| 201 | width: 100%; | 144 | background: url("~@/image/sbtj.png") no-repeat; |
| 202 | height: 100%; | 145 | background-size: 100% 100%; |
| 203 | display: flex; | ||
| 204 | // padding: 35px 20px 20px 20px; | ||
| 205 | box-sizing: border-box; | ||
| 206 | color: #e3f1ff; | ||
| 207 | margin-top: .1263rem; | ||
| 208 | |||
| 209 | .cardcontent-left { | ||
| 210 | width: 60%; | ||
| 211 | flex-direction: column; | ||
| 212 | position: relative; | 146 | position: relative; |
| 213 | li{ | 147 | box-sizing: border-box; |
| 214 | font-size: .1042rem; | 148 | flex: 1; |
| 215 | } | ||
| 216 | } | 149 | } |
| 217 | 150 | ||
| 218 | .cardcontent-left::before { | 151 | .cardhead { |
| 152 | color: #02d9fd; | ||
| 153 | line-height: 0.125rem; | ||
| 154 | letter-spacing: 0.0104rem; | ||
| 219 | position: absolute; | 155 | position: absolute; |
| 156 | font-size: 0.1042rem; | ||
| 157 | left: 0; | ||
| 220 | right: 0; | 158 | right: 0; |
| 221 | top: .3042rem; | 159 | margin: auto; |
| 222 | content: ""; | 160 | text-align: center; |
| 223 | width: .0052rem; | 161 | top: 8px; |
| 224 | height: .4688rem; | 162 | font-weight: 700; |
| 225 | background: linear-gradient(180deg, | ||
| 226 | #091b4c 0%, | ||
| 227 | #47b5e0 56%, | ||
| 228 | #091b4c 100%); | ||
| 229 | } | 163 | } |
| 230 | 164 | ||
| 231 | .cardcontent-right { | 165 | .rjjrlList { |
| 232 | flex: 1; | 166 | display: flex; |
| 233 | width: 100%; | 167 | margin-top: 0.01781rem; |
| 234 | flex-direction: column; | ||
| 235 | font-size: .0833rem; | ||
| 236 | 168 | ||
| 237 | .bad { | 169 | .qxjr { |
| 238 | color: #c97168; | 170 | background: url("~@/image/jrl3.png"); |
| 171 | background-size: 100% 100%; | ||
| 239 | } | 172 | } |
| 240 | 173 | ||
| 241 | .cg { | 174 | .sthj { |
| 242 | color: #5fba7d; | 175 | background: url("~@/image/jh.png"); |
| 176 | background-size: 100% 100%; | ||
| 243 | } | 177 | } |
| 244 | 178 | ||
| 245 | p { | 179 | p { |
| 246 | margin-bottom: .0417rem; | 180 | margin: 0 0.0156rem 0.0521rem 0.0156rem; |
| 181 | font-weight: 700; | ||
| 182 | width: 0.195rem; | ||
| 183 | height: 0.2475rem; | ||
| 184 | font-size: 0.2863rem; | ||
| 185 | font-size: 0.2867rem; | ||
| 186 | } | ||
| 187 | } | ||
| 188 | |||
| 189 | .cardcontent { | ||
| 190 | width: 100%; | ||
| 191 | height: 100%; | ||
| 192 | display: flex; | ||
| 193 | // padding: 35px 20px 20px 20px; | ||
| 194 | box-sizing: border-box; | ||
| 195 | color: #e3f1ff; | ||
| 196 | margin-top: 0.1263rem; | ||
| 197 | |||
| 198 | .cardcontent-left { | ||
| 199 | width: 60%; | ||
| 200 | flex-direction: column; | ||
| 201 | position: relative; | ||
| 202 | li { | ||
| 203 | font-size: 0.1042rem; | ||
| 204 | } | ||
| 205 | } | ||
| 206 | |||
| 207 | .cardcontent-left::before { | ||
| 208 | position: absolute; | ||
| 209 | right: 0; | ||
| 210 | top: 0.3042rem; | ||
| 211 | content: ""; | ||
| 212 | width: 0.0052rem; | ||
| 213 | height: 0.4688rem; | ||
| 214 | background: linear-gradient( | ||
| 215 | 180deg, | ||
| 216 | #091b4c 0%, | ||
| 217 | #47b5e0 56%, | ||
| 218 | #091b4c 100% | ||
| 219 | ); | ||
| 220 | } | ||
| 221 | |||
| 222 | .cardcontent-right { | ||
| 223 | flex: 1; | ||
| 224 | width: 100%; | ||
| 225 | flex-direction: column; | ||
| 226 | font-size: 0.0833rem; | ||
| 247 | 227 | ||
| 248 | span:nth-child(1) { | 228 | .bad { |
| 249 | margin-right: .0781rem; | 229 | color: #c97168; |
| 250 | } | 230 | } |
| 251 | 231 | ||
| 252 | span:nth-child(2) { | 232 | .cg { |
| 253 | font-size: .1042rem; | 233 | color: #5fba7d; |
| 254 | font-weight: 900; | 234 | } |
| 235 | |||
| 236 | p { | ||
| 237 | margin-bottom: 0.0417rem; | ||
| 238 | |||
| 239 | span:nth-child(1) { | ||
| 240 | margin-right: 0.0781rem; | ||
| 241 | } | ||
| 242 | |||
| 243 | span:nth-child(2) { | ||
| 244 | font-size: 0.1042rem; | ||
| 245 | font-weight: 900; | ||
| 246 | } | ||
| 255 | } | 247 | } |
| 256 | } | 248 | } |
| 257 | } | 249 | } |
| 258 | } | 250 | } |
| 259 | } | ||
| 260 | </style> | 251 | </style> | ... | ... |
| ... | @@ -19,131 +19,136 @@ | ... | @@ -19,131 +19,136 @@ |
| 19 | </template> | 19 | </template> |
| 20 | 20 | ||
| 21 | <script> | 21 | <script> |
| 22 | import columnarsmat from "@/components/Echart/Columnarsmat"; | 22 | import columnarsmat from "@/components/Echart/Columnarsmat"; |
| 23 | import Rose from "@/components/Echart/Rose"; | 23 | import Rose from "@/components/Echart/Rose"; |
| 24 | import work from "@/api/work"; | 24 | import work from "@/api/work"; |
| 25 | export default { | 25 | export default { |
| 26 | data () { | 26 | data () { |
| 27 | return { | 27 | return { |
| 28 | config: { | 28 | config: { |
| 29 | headerBGC: '#016AC5', | 29 | headerBGC: '#016AC5', |
| 30 | oddRowBGC: '#154295', | 30 | oddRowBGC: '#154295', |
| 31 | evenRowBGC: '#154295', | 31 | evenRowBGC: '#154295', |
| 32 | header: ['序号', '用途', '性质', '面积'], | 32 | header: ['序号', '用途', '性质', '面积'], |
| 33 | data: [], | 33 | data: [], |
| 34 | key: 0 | 34 | key: 0 |
| 35 | } | ||
| 35 | } | 36 | } |
| 36 | } | 37 | }, |
| 37 | }, | 38 | components: { columnarsmat, Rose }, |
| 38 | components: { columnarsmat, Rose }, | 39 | mounted () { |
| 39 | mounted () { | 40 | this.addhousetotal(); |
| 40 | this.addhousetotal(); | 41 | // scroll(tableref.value.$refs.bodyWrapper);//设置滚动 |
| 41 | // scroll(tableref.value.$refs.bodyWrapper);//设置滚动 | 42 | }, |
| 42 | }, | 43 | methods: { |
| 43 | methods: { | 44 | async addhousetotal () { |
| 44 | async addhousetotal () { | 45 | try { |
| 45 | try { | 46 | let { result: res } = await work.addhousetotal(); |
| 46 | let { result: res } = await work.addhousetotal(); | 47 | res.map((item, index) => { |
| 47 | res.map((item, index) => { | 48 | return ( |
| 48 | return ( | 49 | this.config.data.push([index, item.fwyt, item.fwxz, item.mj]) |
| 49 | this.config.data.push([index, item.fwyt, item.fwxz, item.mj]) | 50 | ) |
| 50 | ) | 51 | }); |
| 51 | }); | 52 | } catch (error) { |
| 52 | } catch (error) { | 53 | console.log("error", error); |
| 53 | console.log("error", error); | 54 | } |
| 54 | } | 55 | } |
| 55 | } | 56 | } |
| 56 | } | 57 | } |
| 57 | } | ||
| 58 | </script> | 58 | </script> |
| 59 | <style lang="scss" scoped> | 59 | <style lang="scss" scoped> |
| 60 | /deep/.row-item:not(:last-child) { | 60 | /deep/.row-item:not(:last-child) { |
| 61 | margin-bottom: .026rem; | 61 | margin-bottom: 0.026rem; |
| 62 | } | ||
| 63 | |||
| 64 | .rightcard { | ||
| 65 | width: 32%; | ||
| 66 | display: flex; | ||
| 67 | height: calc(100vh - 114px); | ||
| 68 | flex-direction: column; | ||
| 69 | |||
| 70 | .cardhead { | ||
| 71 | font-size: .1042rem; | ||
| 72 | font-weight: bold; | ||
| 73 | color: #02D9FD; | ||
| 74 | text-align: center; | ||
| 75 | position: absolute; | ||
| 76 | left: 0; | ||
| 77 | right: 0; | ||
| 78 | top: .0625rem; | ||
| 79 | text-align: center; | ||
| 80 | } | 62 | } |
| 81 | 63 | ||
| 82 | .cardcontent { | 64 | .rightcard { |
| 83 | width: 100%; | 65 | width: 32%; |
| 84 | height: 100%; | 66 | display: flex; |
| 85 | display: -webkit-box; | 67 | height: calc(100vh - 114px); |
| 86 | overflow: hidden; | 68 | flex-direction: column; |
| 87 | 69 | ||
| 88 | .nodata { | 70 | .cardhead { |
| 89 | font-size: .1042rem; | 71 | font-size: 0.1042rem; |
| 90 | color: #02D9FD; | ||
| 91 | font-weight: bold; | 72 | font-weight: bold; |
| 92 | margin: auto; | 73 | color: #02d9fd; |
| 93 | margin-top: 120px; | 74 | text-align: center; |
| 75 | position: absolute; | ||
| 76 | left: 0; | ||
| 77 | right: 0; | ||
| 78 | top: 0.0625rem; | ||
| 79 | text-align: center; | ||
| 94 | } | 80 | } |
| 95 | } | ||
| 96 | 81 | ||
| 97 | .cardCon { | 82 | .cardcontent { |
| 98 | padding: .0521rem .026rem; | 83 | width: 100%; |
| 99 | position: relative; | 84 | height: 100%; |
| 100 | text-align: center; | 85 | display: -webkit-box; |
| 101 | width: 100%; | 86 | overflow: hidden; |
| 102 | } | 87 | |
| 88 | .nodata { | ||
| 89 | font-size: 0.1042rem; | ||
| 90 | color: #02d9fd; | ||
| 91 | font-weight: bold; | ||
| 92 | margin: auto; | ||
| 93 | margin-top: 120px; | ||
| 94 | } | ||
| 95 | } | ||
| 103 | 96 | ||
| 104 | .card1 { | 97 | .cardCon { |
| 105 | height: 33%; | 98 | padding: 0.0521rem 0.026rem; |
| 106 | background: url("~@/image/xjgyfwxx.png") no-repeat; | 99 | position: relative; |
| 107 | background-size: 100% 100%; | 100 | text-align: center; |
| 101 | width: 100%; | ||
| 102 | } | ||
| 108 | 103 | ||
| 109 | .board { | 104 | .card1 { |
| 110 | width: 90%; | 105 | height: 33%; |
| 111 | margin: 0 auto; | 106 | background: url("~@/image/xjgyfwxx.png") no-repeat; |
| 112 | height: 1.1031rem; | 107 | background-size: 100% 100%; |
| 113 | margin-top: .0521rem; | 108 | /deep/.dv-scroll-board { |
| 114 | /deep/.header{ | 109 | .header { |
| 115 | font-size: .0738rem; | 110 | height: 0.1875rem; |
| 111 | align-items: center; | ||
| 112 | } | ||
| 116 | } | 113 | } |
| 117 | /deep/.rows{ | 114 | .board { |
| 118 | .ceil{ | 115 | width: 90%; |
| 119 | font-size: .0738rem; | 116 | margin: 0 auto; |
| 120 | color: #6BC1FC | 117 | height: 1.1031rem; |
| 121 | } | 118 | margin-top: 0.0521rem; |
| 119 | /deep/.header { | ||
| 120 | font-size: 0.0738rem; | ||
| 121 | } | ||
| 122 | /deep/.rows { | ||
| 123 | .ceil { | ||
| 124 | font-size: 0.0738rem; | ||
| 125 | color: #6bc1fc; | ||
| 126 | } | ||
| 127 | } | ||
| 122 | } | 128 | } |
| 123 | } | 129 | } |
| 124 | } | ||
| 125 | 130 | ||
| 126 | .card2 { | 131 | .card2 { |
| 127 | height: 33%; | 132 | height: 33%; |
| 128 | background: url("~@/image/djywl.png") no-repeat; | 133 | background: url("~@/image/djywl.png") no-repeat; |
| 129 | background-size: 100% 100%; | 134 | background-size: 100% 100%; |
| 130 | padding: .3825rem 0 0 0; | 135 | padding: 0.3825rem 0 0 0; |
| 131 | } | 136 | } |
| 132 | 137 | ||
| 133 | .card3 { | 138 | .card3 { |
| 134 | height: 33%; | 139 | height: 33%; |
| 135 | flex: 1; | 140 | flex: 1; |
| 136 | background: url("~@/image/djlxzl.png") no-repeat; | 141 | background: url("~@/image/djlxzl.png") no-repeat; |
| 137 | background-size: 100% 100%; | 142 | background-size: 100% 100%; |
| 138 | padding-bottom: 0; | 143 | padding-bottom: 0; |
| 139 | 144 | ||
| 140 | .cardhead { | 145 | .cardhead { |
| 141 | top: .0417rem; | 146 | top: 0.0417rem; |
| 147 | } | ||
| 142 | } | 148 | } |
| 143 | } | ||
| 144 | 149 | ||
| 145 | .cardhead { | 150 | .cardhead { |
| 146 | position: absolute; | 151 | position: absolute; |
| 152 | } | ||
| 147 | } | 153 | } |
| 148 | } | ||
| 149 | </style> | 154 | </style> | ... | ... |
| ... | @@ -99,187 +99,188 @@ | ... | @@ -99,187 +99,188 @@ |
| 99 | </template> | 99 | </template> |
| 100 | 100 | ||
| 101 | <script> | 101 | <script> |
| 102 | // 接收报文查询 | 102 | // 接收报文查询 |
| 103 | // 引入表格头部数据 | 103 | // 引入表格头部数据 |
| 104 | import data from "./data"; | 104 | import data from "./data"; |
| 105 | // 引入table混入方法 | 105 | // 引入table混入方法 |
| 106 | import tableMixin from "@/mixins/tableMixin.js"; | 106 | import tableMixin from "@/mixins/tableMixin.js"; |
| 107 | import { getReceiveDataReportPage } from "@/api/dataReport.js"; | 107 | import { getReceiveDataReportPage } from "@/api/dataReport.js"; |
| 108 | // 引入详情弹框 | 108 | // 引入详情弹框 |
| 109 | import dataDetails from "@/components/EditDialog"; | 109 | import dataDetails from "@/components/EditDialog"; |
| 110 | //引入日期处理方法 | 110 | //引入日期处理方法 |
| 111 | import { timeFormat } from "@/utils/operation"; | 111 | import { timeFormat } from "@/utils/operation"; |
| 112 | export default { | 112 | export default { |
| 113 | name: "jsbwcx", | 113 | name: "jsbwcx", |
| 114 | mixins: [tableMixin], | 114 | mixins: [tableMixin], |
| 115 | // 注册组件 | 115 | // 注册组件 |
| 116 | components: { | 116 | components: { |
| 117 | dataDetails, | 117 | dataDetails, |
| 118 | }, | 118 | }, |
| 119 | data () { | 119 | data () { |
| 120 | return { | 120 | return { |
| 121 | pickerOptionsStart: { | 121 | pickerOptionsStart: { |
| 122 | disabledDate: (time) => { | 122 | disabledDate: (time) => { |
| 123 | let endDateVal = this.form.receiveEndTime; | 123 | let endDateVal = this.form.receiveEndTime; |
| 124 | if (endDateVal) { | 124 | if (endDateVal) { |
| 125 | return ( | 125 | return ( |
| 126 | time.getTime() >= | 126 | time.getTime() >= |
| 127 | new Date(endDateVal).getTime() | 127 | new Date(endDateVal).getTime() |
| 128 | ); | 128 | ); |
| 129 | } | 129 | } |
| 130 | }, | ||
| 130 | }, | 131 | }, |
| 131 | }, | 132 | pickerOptionsEnd: { |
| 132 | pickerOptionsEnd: { | 133 | disabledDate: (time) => { |
| 133 | disabledDate: (time) => { | 134 | let beginDateVal = this.form.receiveStartTime; |
| 134 | let beginDateVal = this.form.receiveStartTime; | 135 | if (beginDateVal) { |
| 135 | if (beginDateVal) { | 136 | return ( |
| 136 | return ( | 137 | time.getTime() < |
| 137 | time.getTime() < | 138 | new Date(beginDateVal).getTime() |
| 138 | new Date(beginDateVal).getTime() | 139 | ); |
| 139 | ); | 140 | } |
| 140 | } | 141 | }, |
| 141 | }, | 142 | }, |
| 142 | }, | 143 | // 表格数据 |
| 143 | // 表格数据 | 144 | form: { |
| 144 | form: { | 145 | qxdm: "", // 行政区 |
| 145 | qxdm: "", // 行政区 | 146 | receiveStartTime: "", // 开始日期 |
| 146 | receiveStartTime: "", // 开始日期 | 147 | receiveEndTime: "", // 结束日期 |
| 147 | receiveEndTime: "", // 结束日期 | 148 | bdcdyh: "", // 不动产单元号 |
| 148 | bdcdyh: "", // 不动产单元号 | 149 | ywh: "", // 业务号 |
| 149 | ywh: "", // 业务号 | 150 | qllx: "", // 权利类型 |
| 150 | qllx: "", // 权利类型 | 151 | djlx: "", // 登记类型 |
| 151 | djlx: "", // 登记类型 | 152 | jcjg: "", // 检查结果 |
| 152 | jcjg: "", // 检查结果 | 153 | rkjg: "", //入库结果 |
| 153 | rkjg: "", //入库结果 | 154 | currentPage: 1 |
| 154 | currentPage: 1 | 155 | }, |
| 155 | }, | 156 | // 校验规则 |
| 156 | // 校验规则 | 157 | rules: { |
| 157 | rules: { | 158 | pcode: [{ required: true, message: "请选择行政区", trigger: "change" }], |
| 158 | pcode: [{ required: true, message: "请选择行政区", trigger: "change" }], | 159 | startTime: [ |
| 159 | startTime: [ | 160 | { required: true, message: "请选择开始日期", trigger: "change" }, |
| 160 | { required: true, message: "请选择开始日期", trigger: "change" }, | 161 | ], |
| 161 | ], | 162 | endTime: [ |
| 162 | endTime: [ | 163 | { required: true, message: "请选择结束日期", trigger: "change" }, |
| 163 | { required: true, message: "请选择结束日期", trigger: "change" }, | 164 | ], |
| 164 | ], | 165 | bdcdyh: [ |
| 165 | bdcdyh: [ | 166 | { required: true, message: "不动产单元号", trigger: "change" }, |
| 166 | { required: true, message: "不动产单元号", trigger: "change" }, | 167 | ], |
| 167 | ], | 168 | ywmc: [{ required: true, message: "业务名称", trigger: "change" }], |
| 168 | ywmc: [{ required: true, message: "业务名称", trigger: "change" }], | 169 | jcjg: [{ required: true, message: "检查结果", trigger: "change" }], |
| 169 | jcjg: [{ required: true, message: "检查结果", trigger: "change" }], | 170 | rkjg: [{ required: true, message: "入库结果", trigger: "change" }], |
| 170 | rkjg: [{ required: true, message: "入库结果", trigger: "change" }], | 171 | }, |
| 171 | }, | 172 | // 表格数据 |
| 172 | // 表格数据 | 173 | tableData: { |
| 173 | tableData: { | 174 | // 表格头部 |
| 174 | // 表格头部 | 175 | columns: [ |
| 175 | columns: [ | ||
| 176 | { | ||
| 177 | label: "序号", | ||
| 178 | type: "index", | ||
| 179 | width: "50", | ||
| 180 | index: this.indexMethod, | ||
| 181 | } | ||
| 182 | ] | ||
| 183 | .concat(data.columns()) | ||
| 184 | .concat([ | ||
| 185 | { | 176 | { |
| 186 | label: "操作", | 177 | label: "序号", |
| 187 | width: "90", | 178 | type: "index", |
| 188 | render: (h, scope) => { | 179 | width: "50", |
| 189 | return ( | 180 | index: this.indexMethod, |
| 190 | <div> | 181 | } |
| 191 | <el-button | 182 | ] |
| 192 | type="primary" | 183 | .concat(data.columns()) |
| 193 | onClick={() => { | 184 | .concat([ |
| 194 | this.handleDetails(scope.row); | 185 | { |
| 195 | }} | 186 | label: "操作", |
| 196 | > | 187 | width: "90", |
| 197 | 详情 | 188 | render: (h, scope) => { |
| 198 | </el-button> | 189 | return ( |
| 199 | </div> | 190 | <div> |
| 200 | ) | 191 | <el-button |
| 192 | type="primary" | ||
| 193 | onClick={() => { | ||
| 194 | this.handleDetails(scope.row); | ||
| 195 | }} | ||
| 196 | > | ||
| 197 | 详情 | ||
| 198 | </el-button> | ||
| 199 | </div> | ||
| 200 | ) | ||
| 201 | } | ||
| 201 | } | 202 | } |
| 203 | ]), | ||
| 204 | // 表格列表数据 | ||
| 205 | total: 0, | ||
| 206 | data: [], | ||
| 207 | }, | ||
| 208 | // 分页 | ||
| 209 | pageData: { | ||
| 210 | total: 0, | ||
| 211 | pageSize: 10, | ||
| 212 | current: 1 | ||
| 213 | }, | ||
| 214 | title: "", | ||
| 215 | }; | ||
| 216 | }, | ||
| 217 | methods: { | ||
| 218 | //截止日期变化 | ||
| 219 | endTimeChange (val) { | ||
| 220 | this.form.receiveEndTime = timeFormat(new Date(val), true) | ||
| 221 | }, | ||
| 222 | // 初始化数据 | ||
| 223 | queryClick () { | ||
| 224 | getReceiveDataReportPage({ ...this.form, ...this.formData }).then( | ||
| 225 | (res) => { | ||
| 226 | if (res.code === 200) { | ||
| 227 | console.log("菜单列表", res); | ||
| 228 | let { total, records, current } = res.result; | ||
| 229 | this.tableData.total = total; | ||
| 230 | this.tableData.data = records ? records : []; | ||
| 231 | this.pageData.current = current | ||
| 202 | } | 232 | } |
| 203 | ]), | 233 | } |
| 204 | // 表格列表数据 | 234 | ) |
| 205 | total: 0, | ||
| 206 | data: [], | ||
| 207 | }, | 235 | }, |
| 208 | // 分页 | 236 | // 重置 |
| 209 | pageData: { | 237 | resetForm () { |
| 210 | total: 0, | 238 | this.$refs.ruleForm.resetFields(); |
| 211 | pageSize: 10, | 239 | this.form.currentPage = 1 |
| 212 | current: 1 | 240 | this.queryClick(); |
| 213 | }, | 241 | }, |
| 214 | title: "", | 242 | featchData () { |
| 215 | }; | 243 | this.queryClick(); |
| 216 | }, | 244 | }, |
| 217 | methods: { | 245 | // 结果 |
| 218 | //截止日期变化 | 246 | handleResult (row) { |
| 219 | endTimeChange (val) { | 247 | this.$popupDialog('响应结果', 'views/jsbwcx/components/result', row) |
| 220 | this.form.receiveEndTime = timeFormat(new Date(val), true) | 248 | }, |
| 221 | }, | 249 | // 详情 |
| 222 | // 初始化数据 | 250 | handleDetails (row) { |
| 223 | queryClick () { | 251 | if (row.rectypeName) { |
| 224 | getReceiveDataReportPage({ ...this.form, ...this.formData }).then( | 252 | this.title = row.rectypeName |
| 225 | (res) => { | 253 | } else { |
| 226 | if (res.code === 200) { | 254 | let Title = '' |
| 227 | let { total, records, current } = res.result; | 255 | this.dicData['A21'].map(item => { |
| 228 | this.tableData.total = total; | 256 | if (item.DCODE == row.DJLX || item.DCODE == row.djlx) { |
| 229 | this.tableData.data = records ? records : []; | 257 | Title = item.DNAME |
| 230 | this.pageData.current = current | 258 | return |
| 231 | } | 259 | } |
| 232 | } | 260 | }) |
| 233 | ) | ||
| 234 | }, | ||
| 235 | // 重置 | ||
| 236 | resetForm () { | ||
| 237 | this.$refs.ruleForm.resetFields(); | ||
| 238 | this.form.currentPage = 1 | ||
| 239 | this.queryClick(); | ||
| 240 | }, | ||
| 241 | featchData () { | ||
| 242 | this.queryClick(); | ||
| 243 | }, | ||
| 244 | // 结果 | ||
| 245 | handleResult (row) { | ||
| 246 | this.$popupDialog('响应结果', 'views/jsbwcx/components/result', row) | ||
| 247 | }, | ||
| 248 | // 详情 | ||
| 249 | handleDetails (row) { | ||
| 250 | if (row.rectypeName) { | ||
| 251 | this.title = row.rectypeName | ||
| 252 | } else { | ||
| 253 | let Title = '' | ||
| 254 | this.dicData['A21'].map(item => { | ||
| 255 | if (item.DCODE == row.DJLX || item.DCODE == row.djlx) { | ||
| 256 | Title = item.DNAME | ||
| 257 | return | ||
| 258 | } | ||
| 259 | }) | ||
| 260 | 261 | ||
| 261 | this.dicData['A8'].map(item => { | 262 | this.dicData['A8'].map(item => { |
| 262 | if (item.DCODE == row.QLLX || item.DCODE == row.qllx) { | 263 | if (item.DCODE == row.QLLX || item.DCODE == row.qllx) { |
| 263 | Title += '-' + item.DNAME | 264 | Title += '-' + item.DNAME |
| 264 | return | 265 | return |
| 265 | } | 266 | } |
| 266 | }) | 267 | }) |
| 267 | this.title = Title | 268 | this.title = Title |
| 268 | } | 269 | } |
| 269 | this.$refs.editLog.isShow(row); | 270 | this.$refs.editLog.isShow(row); |
| 270 | if (row.receiveState == 2) { | 271 | if (row.receiveState == 2) { |
| 271 | this.$store.dispatch('business/setReportLogEdit') | 272 | this.$store.dispatch('business/setReportLogEdit') |
| 272 | } else { | 273 | } else { |
| 273 | this.$store.dispatch('business/setEdit') | 274 | this.$store.dispatch('business/setEdit') |
| 274 | } | 275 | } |
| 275 | }, | 276 | }, |
| 277 | } | ||
| 276 | } | 278 | } |
| 277 | } | ||
| 278 | </script> | 279 | </script> |
| 279 | <style scoped lang="scss"> | 280 | <style scoped lang="scss"> |
| 280 | // 引入表单整体样式 | 281 | // 引入表单整体样式 |
| 281 | @import "~@/styles/public.scss"; | 282 | @import "~@/styles/public.scss"; |
| 282 | // 引入当前css | 283 | // 引入当前css |
| 283 | @import "./index.scss"; | 284 | @import "./index.scss"; |
| 284 | </style> | 285 | </style> |
| 285 | 286 | ... | ... |
| ... | @@ -142,8 +142,8 @@ | ... | @@ -142,8 +142,8 @@ |
| 142 | padding: 24px 120px 0px; | 142 | padding: 24px 120px 0px; |
| 143 | .el-form-item { | 143 | .el-form-item { |
| 144 | margin-bottom: 24px; | 144 | margin-bottom: 24px; |
| 145 | .el-form-item__label { | 145 | /deep/.el-form-item__label { |
| 146 | color: #747e8c; | 146 | color: #ffffff; |
| 147 | } | 147 | } |
| 148 | ::v-deep .el-input .el-input__inner { | 148 | ::v-deep .el-input .el-input__inner { |
| 149 | padding: 0 8px; | 149 | padding: 0 8px; | ... | ... |
| ... | @@ -15,8 +15,8 @@ | ... | @@ -15,8 +15,8 @@ |
| 15 | </div> | 15 | </div> |
| 16 | <div class="from-clues-content"> | 16 | <div class="from-clues-content"> |
| 17 | <div class="contentbox"> | 17 | <div class="contentbox"> |
| 18 | <base-set v-show="isshow" :userInfo="userData" /> | 18 | <base-set v-if="isshow" :userInfo="userData" /> |
| 19 | <password-edit v-show="!isshow" :userInfo="userData" /> | 19 | <password-edit v-if="!isshow" :userInfo="userData" /> |
| 20 | </div> | 20 | </div> |
| 21 | </div> | 21 | </div> |
| 22 | </div> | 22 | </div> | ... | ... |
| ... | @@ -110,10 +110,10 @@ | ... | @@ -110,10 +110,10 @@ |
| 110 | overflow-y: auto; | 110 | overflow-y: auto; |
| 111 | .form-wrapper { | 111 | .form-wrapper { |
| 112 | padding: 24px 120px 0px; | 112 | padding: 24px 120px 0px; |
| 113 | .el-form-item { | 113 | /deep/.el-form-item { |
| 114 | margin-bottom: 24px; | 114 | margin-bottom: 24px; |
| 115 | .el-form-item__label { | 115 | .el-form-item__label { |
| 116 | color: #747e8c; | 116 | color: #ffffff; |
| 117 | } | 117 | } |
| 118 | ::v-deep .el-input .el-input__inner { | 118 | ::v-deep .el-input .el-input__inner { |
| 119 | padding: 0 8px; | 119 | padding: 0 8px; | ... | ... |
| ... | @@ -30,8 +30,8 @@ | ... | @@ -30,8 +30,8 @@ |
| 30 | 30 | ||
| 31 | </el-row> | 31 | </el-row> |
| 32 | <el-row :gutter="24"> | 32 | <el-row :gutter="24"> |
| 33 | <el-col :span="12"> | 33 | <el-col :span="24"> |
| 34 | <el-form-item label="代码:" prop="code" label-width="54px"> | 34 | <el-form-item label="代码:" prop="code" label-width="124px"> |
| 35 | <el-input | 35 | <el-input |
| 36 | v-model="codeComputed" | 36 | v-model="codeComputed" |
| 37 | placeholder="请输入菜单代码" | 37 | placeholder="请输入菜单代码" |
| ... | @@ -272,4 +272,5 @@ | ... | @@ -272,4 +272,5 @@ |
| 272 | /deep/.el-input__inner { | 272 | /deep/.el-input__inner { |
| 273 | background-color: #07388b; | 273 | background-color: #07388b; |
| 274 | } | 274 | } |
| 275 | |||
| 275 | </style> | 276 | </style> | ... | ... |
src/views/system/roles/data/roles.js
deleted
100644 → 0
| 1 | import filter from '@/utils/filter.js' | ||
| 2 | class data extends filter { | ||
| 3 | constructor() { | ||
| 4 | super() | ||
| 5 | } | ||
| 6 | columns () { | ||
| 7 | return [ | ||
| 8 | { | ||
| 9 | prop: "name", | ||
| 10 | label: "角色名称", | ||
| 11 | width: 330 | ||
| 12 | }, | ||
| 13 | { | ||
| 14 | prop: "type", | ||
| 15 | label: "类别", | ||
| 16 | width: 400 | ||
| 17 | }, | ||
| 18 | { | ||
| 19 | prop: "address", | ||
| 20 | label: "备注" | ||
| 21 | } | ||
| 22 | ] | ||
| 23 | } | ||
| 24 | } | ||
| 25 | export default new data() |
| ... | @@ -4,39 +4,36 @@ | ... | @@ -4,39 +4,36 @@ |
| 4 | :title="dialogTitle" | 4 | :title="dialogTitle" |
| 5 | :show.sync="showAddEditDialog" | 5 | :show.sync="showAddEditDialog" |
| 6 | :width="'767px'" | 6 | :width="'767px'" |
| 7 | @close="handleCloseDialog()" | 7 | @close="handleCloseDialog()"> |
| 8 | > | ||
| 9 | <template slot="content"> | 8 | <template slot="content"> |
| 10 | <el-form ref="form" :model="dialogForm" :rules="rules" label-width="82px"> | 9 | <el-form ref="form" :model="dialogForm" :rules="rules" label-width="82px"> |
| 11 | <el-row :gutter="24"> | 10 | <el-row :gutter="24"> |
| 12 | <el-col :span="12"> | 11 | <el-col :span="15"> |
| 13 | <el-form-item label="角色名称:" prop="roleName"> | 12 | <el-form-item label="角色名称:" prop="roleName"> |
| 14 | <el-input | 13 | <el-input |
| 15 | v-model="dialogForm.roleName" | 14 | v-model="dialogForm.roleName" |
| 16 | clearable | 15 | clearable |
| 17 | placeholder="角色名称" | 16 | placeholder="角色名称" /> |
| 18 | /> | ||
| 19 | </el-form-item> | 17 | </el-form-item> |
| 20 | </el-col> | 18 | </el-col> |
| 21 | <el-col :span="12"> | 19 | </el-row> |
| 20 | <el-row :gutter="24"> | ||
| 21 | <el-col :span="24"> | ||
| 22 | <el-form-item label="角色类型:" prop="roleType"> | 22 | <el-form-item label="角色类型:" prop="roleType"> |
| 23 | <el-input | 23 | <el-input |
| 24 | v-model="dialogForm.roleType" | 24 | v-model="dialogForm.roleType" |
| 25 | clearable | 25 | clearable |
| 26 | placeholder="角色类型" | 26 | placeholder="角色类型" /> |
| 27 | /> | ||
| 28 | </el-form-item> | 27 | </el-form-item> |
| 29 | </el-col> | 28 | </el-col> |
| 30 | </el-row> | 29 | </el-row> |
| 31 | <br> | ||
| 32 | <el-row> | 30 | <el-row> |
| 33 | <el-col :span="24"> | 31 | <el-col :span="24"> |
| 34 | <el-form-item label="备注:" class="form-item-mb0"> | 32 | <el-form-item label="备注:" class="form-item-mb0"> |
| 35 | <el-input | 33 | <el-input |
| 36 | v-model="dialogForm.roleTextArea" | 34 | v-model="dialogForm.roleTextArea" |
| 37 | type="textarea" | 35 | type="textarea" |
| 38 | placeholder="备注" | 36 | placeholder="备注" /> |
| 39 | /> | ||
| 40 | </el-form-item> | 37 | </el-form-item> |
| 41 | </el-col> | 38 | </el-col> |
| 42 | </el-row> | 39 | </el-row> |
| ... | @@ -45,72 +42,89 @@ | ... | @@ -45,72 +42,89 @@ |
| 45 | <template slot="footer"> | 42 | <template slot="footer"> |
| 46 | <el-button | 43 | <el-button |
| 47 | class="cancel-button" | 44 | class="cancel-button" |
| 48 | @click="handleCloseDialog" | 45 | @click="handleCloseDialog">取消</el-button> |
| 49 | >取消</el-button> | ||
| 50 | 46 | ||
| 51 | <el-button | 47 | <el-button |
| 52 | type="primary" | 48 | type="primary" |
| 53 | @click="handleSaveRole()" | 49 | @click="handleSaveRole()">保存</el-button> |
| 54 | >保存</el-button> | ||
| 55 | </template> | 50 | </template> |
| 56 | </Dialog> | 51 | </Dialog> |
| 57 | </template> | 52 | </template> |
| 58 | 53 | ||
| 59 | <script> | 54 | <script> |
| 60 | import Dialog from "@/components/Dialog/"; | 55 | import Dialog from "@/components/Dialog/"; |
| 61 | import { api, httpAction } from '@/api/manageApi' | 56 | import { api, httpAction } from '@/api/manageApi' |
| 62 | export default { | 57 | export default { |
| 63 | components: { | 58 | components: { |
| 64 | Dialog | 59 | Dialog |
| 65 | }, | 60 | }, |
| 66 | data() { | 61 | data () { |
| 67 | return { | 62 | return { |
| 68 | dialogTitle: '', | 63 | dialogTitle: '', |
| 69 | showAddEditDialog: false, | 64 | showAddEditDialog: false, |
| 70 | menuType: '', | 65 | menuType: '', |
| 71 | roleId: '', | 66 | roleId: '', |
| 72 | sort: 0, | 67 | sort: 0, |
| 73 | dialogForm: { | 68 | dialogForm: { |
| 74 | roleName: '', | 69 | roleName: '', |
| 75 | roleType: '', | 70 | roleType: '', |
| 76 | roleTextArea: '' | 71 | roleTextArea: '' |
| 77 | }, | 72 | }, |
| 78 | rules: { | 73 | rules: { |
| 79 | roleName: [ | 74 | roleName: [ |
| 80 | { required: true, message: '请输入角色名称', trigger: 'blur' } | 75 | { required: true, message: '请输入角色名称', trigger: 'blur' } |
| 81 | ], | 76 | ], |
| 82 | roleType: [ | 77 | roleType: [ |
| 83 | { required: true, message: '请输入角色类型', trigger: 'blur' } | 78 | { required: true, message: '请输入角色类型', trigger: 'blur' } |
| 79 | ] | ||
| 80 | }, | ||
| 81 | roleTypeOptions: [ | ||
| 82 | { name: '定制', value: '定制' }, | ||
| 83 | { name: '其他', value: '其他' } | ||
| 84 | ] | 84 | ] |
| 85 | }, | 85 | } |
| 86 | roleTypeOptions: [ | 86 | }, |
| 87 | { name: '定制', value: '定制' }, | 87 | methods: { |
| 88 | { name: '其他', value: '其他' } | 88 | // 保存新增或关闭事件 |
| 89 | ] | 89 | handleSaveRole (val) { |
| 90 | } | 90 | this.$refs.form.validate((valid) => { |
| 91 | }, | 91 | if (valid) { |
| 92 | methods: { | 92 | try { |
| 93 | // 保存新增或关闭事件 | 93 | const params = { |
| 94 | handleSaveRole(val) { | 94 | category: 2, |
| 95 | this.$refs.form.validate((valid) => { | 95 | description: this.dialogForm.roleTextArea, |
| 96 | if (valid) { | 96 | name: this.dialogForm.roleName, |
| 97 | try { | 97 | sort: this.sort, |
| 98 | const params = { | 98 | type: this.dialogForm.roleType |
| 99 | category: 2, | 99 | } |
| 100 | description: this.dialogForm.roleTextArea, | 100 | if (this.roleId) { |
| 101 | name: this.dialogForm.roleName, | 101 | params.id = this.roleId |
| 102 | sort: this.sort, | 102 | httpAction(`${api.roles}/${params.id}`, params, 'post').then( |
| 103 | type: this.dialogForm.roleType | 103 | (res) => { |
| 104 | } | 104 | if (res.status === 1) { |
| 105 | console.log("this.roleId",this.roleId); | 105 | this.$message.success({ |
| 106 | if (this.roleId) { | 106 | message: '修改成功', |
| 107 | params.id = this.roleId | 107 | showClose: true |
| 108 | console.log("修改",params.id,params); | 108 | }) |
| 109 | httpAction(`${api.roles}/${params.id}`, params, 'post').then( | 109 | this.dialogForm = { |
| 110 | (res) => { | 110 | roleName: '', |
| 111 | roleType: '' | ||
| 112 | } | ||
| 113 | this.showAddEditDialog = val | ||
| 114 | this.$emit('ok', this.menuType) | ||
| 115 | } else { | ||
| 116 | this.$message.error({ | ||
| 117 | message: res.message, | ||
| 118 | showClose: true | ||
| 119 | }) | ||
| 120 | } | ||
| 121 | } | ||
| 122 | ) | ||
| 123 | } else { | ||
| 124 | httpAction(api.roles, params, 'post').then((res) => { | ||
| 111 | if (res.status === 1) { | 125 | if (res.status === 1) { |
| 112 | this.$message.success({ | 126 | this.$message.success({ |
| 113 | message: '修改成功', | 127 | message: '新增成功', |
| 114 | showClose: true | 128 | showClose: true |
| 115 | }) | 129 | }) |
| 116 | this.dialogForm = { | 130 | this.dialogForm = { |
| ... | @@ -125,58 +139,49 @@ export default { | ... | @@ -125,58 +139,49 @@ export default { |
| 125 | showClose: true | 139 | showClose: true |
| 126 | }) | 140 | }) |
| 127 | } | 141 | } |
| 128 | } | 142 | }) |
| 129 | ) | 143 | } |
| 130 | } else { | 144 | } catch (e) { |
| 131 | httpAction(api.roles, params, 'post').then((res) => { | 145 | console.error(e) |
| 132 | if (res.status === 1) { | ||
| 133 | this.$message.success({ | ||
| 134 | message: '新增成功', | ||
| 135 | showClose: true | ||
| 136 | }) | ||
| 137 | this.dialogForm = { | ||
| 138 | roleName: '', | ||
| 139 | roleType: '' | ||
| 140 | } | ||
| 141 | this.showAddEditDialog = val | ||
| 142 | this.$emit('ok', this.menuType) | ||
| 143 | } else { | ||
| 144 | this.$message.error({ | ||
| 145 | message: res.message, | ||
| 146 | showClose: true | ||
| 147 | }) | ||
| 148 | } | ||
| 149 | }) | ||
| 150 | } | 146 | } |
| 151 | } catch (e) { | ||
| 152 | console.error(e) | ||
| 153 | } | 147 | } |
| 148 | }) | ||
| 149 | }, | ||
| 150 | // 取消事件 | ||
| 151 | handleCloseDialog () { | ||
| 152 | this.$refs.form.resetFields() | ||
| 153 | this.dialogForm = { | ||
| 154 | roleName: '', | ||
| 155 | roleType: '' | ||
| 154 | } | 156 | } |
| 155 | }) | 157 | this.showAddEditDialog = false |
| 156 | }, | ||
| 157 | // 取消事件 | ||
| 158 | handleCloseDialog() { | ||
| 159 | this.$refs.form.resetFields() | ||
| 160 | this.dialogForm = { | ||
| 161 | roleName: '', | ||
| 162 | roleType: '' | ||
| 163 | } | 158 | } |
| 164 | this.showAddEditDialog = false | ||
| 165 | } | 159 | } |
| 166 | } | 160 | } |
| 167 | } | ||
| 168 | </script> | 161 | </script> |
| 169 | <style scoped lang="scss"> | 162 | <style scoped lang="scss"> |
| 170 | /deep/.el-input__inner { | 163 | /deep/.el-input__inner { |
| 171 | background: #07388B; | 164 | background: #07388b; |
| 172 | border-radius: 2px; | 165 | border-radius: 2px; |
| 173 | border: 1px solid #6BC1FC; | 166 | border: 1px solid #6bc1fc; |
| 174 | } | 167 | } |
| 175 | /deep/.el-textarea__inner{ | 168 | /deep/.el-textarea__inner { |
| 176 | background: #07388B; | 169 | background: #07388b; |
| 177 | color: #fff; | 170 | color: #fff; |
| 178 | } | 171 | } |
| 179 | /deep/.el-form-item__label{ | 172 | /deep/.el-form-item__label { |
| 180 | color:#fff; | 173 | color: #fff; |
| 181 | } | 174 | } |
| 175 | /deep/.el-dialog__headerbtn { | ||
| 176 | position: absolute; | ||
| 177 | top: 15px; | ||
| 178 | right: 30px; | ||
| 179 | } | ||
| 180 | /deep/.el-dialog__header { | ||
| 181 | text-align: center; | ||
| 182 | margin-bottom: 10px; | ||
| 183 | .el-dialog__title { | ||
| 184 | color: white; | ||
| 185 | } | ||
| 186 | } | ||
| 182 | </style> | 187 | </style> | ... | ... |
| ... | @@ -14,15 +14,13 @@ | ... | @@ -14,15 +14,13 @@ |
| 14 | </div> | 14 | </div> |
| 15 | <div class="from-clues-content"> | 15 | <div class="from-clues-content"> |
| 16 | <lb-table | 16 | <lb-table |
| 17 | :page-size="pageData.size" | 17 | :pagination="false" |
| 18 | :current-page.sync="pageData.current" | ||
| 19 | :total="pageData.total" | ||
| 20 | @size-change="handleSizeChange" | 18 | @size-change="handleSizeChange" |
| 21 | @p-current-change="handleCurrentChange" | 19 | @p-current-change="handleCurrentChange" |
| 22 | :column="tableData.columns" | 20 | :column="tableData.columns" |
| 23 | :data="listdata" | 21 | :data="listdata" |
| 24 | :expand-row-keys="keyList" | 22 | :expand-row-keys="keyList" |
| 25 | row-key="id"> | 23 | row-key="dictid"> |
| 26 | </lb-table> | 24 | </lb-table> |
| 27 | </div> | 25 | </div> |
| 28 | <EditDialog ref="addEditDialog" @ok="reloadTableData" /> | 26 | <EditDialog ref="addEditDialog" @ok="reloadTableData" /> |
| ... | @@ -219,11 +217,6 @@ | ... | @@ -219,11 +217,6 @@ |
| 219 | ]), | 217 | ]), |
| 220 | data: [], | 218 | data: [], |
| 221 | }, | 219 | }, |
| 222 | pageData: { | ||
| 223 | total: 5, | ||
| 224 | pageSize: 15, | ||
| 225 | current: 1, | ||
| 226 | }, | ||
| 227 | }; | 220 | }; |
| 228 | }, | 221 | }, |
| 229 | created () { | 222 | created () { |
| ... | @@ -242,6 +235,7 @@ | ... | @@ -242,6 +235,7 @@ |
| 242 | Builtinrole = res.content; | 235 | Builtinrole = res.content; |
| 243 | getRolesById(2) | 236 | getRolesById(2) |
| 244 | .then((res) => { | 237 | .then((res) => { |
| 238 | console.log("角色列表", res); | ||
| 245 | Publicrole = res.content; | 239 | Publicrole = res.content; |
| 246 | 240 | ||
| 247 | this.listdata = Builtinrole.concat(Publicrole); | 241 | this.listdata = Builtinrole.concat(Publicrole); |
| ... | @@ -376,8 +370,6 @@ | ... | @@ -376,8 +370,6 @@ |
| 376 | } | 370 | } |
| 377 | 371 | ||
| 378 | this.$refs.rolesForm.personlist(this.waitMemberList, row.id); | 372 | this.$refs.rolesForm.personlist(this.waitMemberList, row.id); |
| 379 | // this.$refs.rolesForm.getMenuData(); | ||
| 380 | |||
| 381 | this.$refs.rolesForm.menulist(this.operationList, row.id, this.selectedSubsystemCode, this.menutablelistData, this.operationCodes); | 373 | this.$refs.rolesForm.menulist(this.operationList, row.id, this.selectedSubsystemCode, this.menutablelistData, this.operationCodes); |
| 382 | } else { | 374 | } else { |
| 383 | this.$message.error({ message: res.message, showClose: true }); | 375 | this.$message.error({ message: res.message, showClose: true }); |
| ... | @@ -402,15 +394,15 @@ | ... | @@ -402,15 +394,15 @@ |
| 402 | }, | 394 | }, |
| 403 | // 上移下移 | 395 | // 上移下移 |
| 404 | moveUpward (index, row) { | 396 | moveUpward (index, row) { |
| 405 | realMove(row.id, "UP", this.listdata); | 397 | realMove(row.dictid, "UP", this.listdata); |
| 406 | this.key++; | 398 | this.key++; |
| 407 | let id = findParents(this.listdata, row.id); | 399 | let id = findParents(this.listdata, row.dictid); |
| 408 | this.keyList = id; | 400 | this.keyList = id; |
| 409 | }, | 401 | }, |
| 410 | moveDown (index, row) { | 402 | moveDown (index, row) { |
| 411 | realMove(row.id, "DOWN", this.listdata); | 403 | realMove(row.dictid, "DOWN", this.listdata); |
| 412 | this.key++; | 404 | this.key++; |
| 413 | let id = findParents(this.listdata, row.id); | 405 | let id = findParents(this.listdata, row.dictid); |
| 414 | this.keyList = id; | 406 | this.keyList = id; |
| 415 | }, | 407 | }, |
| 416 | 408 | ... | ... |
| ... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
| 10 | {{ title || "标题" }} | 10 | {{ title || "标题" }} |
| 11 | </div> | 11 | </div> |
| 12 | <div class="editDialogBox-box"> | 12 | <div class="editDialogBox-box"> |
| 13 | <el-tabs v-model="activeName" type="card"> | 13 | <el-tabs v-model="activeName" type="card" @tab-click="handleClick"> |
| 14 | <el-tab-pane label="人员配置" name="first"></el-tab-pane> | 14 | <el-tab-pane label="人员配置" name="first"></el-tab-pane> |
| 15 | <el-tab-pane label="菜单配置" name="second"></el-tab-pane> | 15 | <el-tab-pane label="菜单配置" name="second"></el-tab-pane> |
| 16 | </el-tabs> | 16 | </el-tabs> |
| ... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
| 19 | ref="multipleTable" | 19 | ref="multipleTable" |
| 20 | :pagination="false" | 20 | :pagination="false" |
| 21 | :column="usertableData.column" | 21 | :column="usertableData.column" |
| 22 | :data="usertableData.data" | 22 | :data="lastuserList" |
| 23 | @selection-change="handleSelectionChange" | 23 | @selection-change="handleSelectionChange" |
| 24 | @row-click="handleClickTableRow"> | 24 | @row-click="handleClickTableRow"> |
| 25 | > | 25 | > |
| ... | @@ -27,7 +27,6 @@ | ... | @@ -27,7 +27,6 @@ |
| 27 | <lb-table | 27 | <lb-table |
| 28 | :key="menukey" | 28 | :key="menukey" |
| 29 | v-if="activeName == 'second'" | 29 | v-if="activeName == 'second'" |
| 30 | ref="multipleTable1" | ||
| 31 | :pagination="false" | 30 | :pagination="false" |
| 32 | :column="menutableData.column" | 31 | :column="menutableData.column" |
| 33 | :data="lastMenuList" | 32 | :data="lastMenuList" |
| ... | @@ -99,7 +98,6 @@ | ... | @@ -99,7 +98,6 @@ |
| 99 | label: "用户名", | 98 | label: "用户名", |
| 100 | }, | 99 | }, |
| 101 | ], | 100 | ], |
| 102 | data: [] | ||
| 103 | }, | 101 | }, |
| 104 | // 角色id | 102 | // 角色id |
| 105 | roleId: "", | 103 | roleId: "", |
| ... | @@ -107,6 +105,7 @@ | ... | @@ -107,6 +105,7 @@ |
| 107 | queryParam: {}, | 105 | queryParam: {}, |
| 108 | menukey: 0, | 106 | menukey: 0, |
| 109 | activeName: "first", | 107 | activeName: "first", |
| 108 | lastuserList: [], // 人员表格数据 | ||
| 110 | lastMenuList: [], // 重构完成的菜单表格数据 | 109 | lastMenuList: [], // 重构完成的菜单表格数据 |
| 111 | usermultipleSelection: [], | 110 | usermultipleSelection: [], |
| 112 | // 选中菜单列表 | 111 | // 选中菜单列表 |
| ... | @@ -132,8 +131,8 @@ | ... | @@ -132,8 +131,8 @@ |
| 132 | 131 | ||
| 133 | // 人员配置点击行勾选数据 | 132 | // 人员配置点击行勾选数据 |
| 134 | handleClickTableRow (row, event) { | 133 | handleClickTableRow (row, event) { |
| 135 | this.checkNum1 = 0; | 134 | this.checkNum = 0; |
| 136 | this.isCheck1 = false; | 135 | this.isCheck = false; |
| 137 | if (event.label == "操作") { | 136 | if (event.label == "操作") { |
| 138 | return; | 137 | return; |
| 139 | } else { | 138 | } else { |
| ... | @@ -163,10 +162,10 @@ | ... | @@ -163,10 +162,10 @@ |
| 163 | } | 162 | } |
| 164 | } | 163 | } |
| 165 | if (this.usermultipleSelection.length > 0) { | 164 | if (this.usermultipleSelection.length > 0) { |
| 166 | this.checkNum1 = this.usermultipleSelection.length; | 165 | this.checkNum = this.usermultipleSelection.length; |
| 167 | this.isCheck1 = true; | 166 | this.isCheck = true; |
| 168 | } else { | 167 | } else { |
| 169 | this.isCheck1 = false; | 168 | this.isCheck = false; |
| 170 | } | 169 | } |
| 171 | }, | 170 | }, |
| 172 | // 获取授权主体的菜单权限 | 171 | // 获取授权主体的菜单权限 |
| ... | @@ -304,19 +303,21 @@ | ... | @@ -304,19 +303,21 @@ |
| 304 | personlist (a, rid) { | 303 | personlist (a, rid) { |
| 305 | this.roleId = rid; | 304 | this.roleId = rid; |
| 306 | this.visible = true; | 305 | this.visible = true; |
| 307 | 306 | this.lastuserList = a; | |
| 308 | this.usertableData.data = a; | 307 | this.lastuserList.forEach((item, index) => { |
| 309 | this.usertableData.data.forEach((item, index) => { | ||
| 310 | if (item.selectStatus === 0) { | 308 | if (item.selectStatus === 0) { |
| 311 | this.$nextTick(() => { | 309 | this.$nextTick(async () => { |
| 312 | this.$refs.multipleTable.toggleRowSelection( | 310 | await this.$refs.multipleTable |
| 313 | this.usertableData.data[index], | 311 | if (this.$refs.multipleTable) { |
| 314 | true | 312 | this.$refs.multipleTable.toggleRowSelection( |
| 315 | ); | 313 | this.lastuserList[index], |
| 314 | true | ||
| 315 | ); | ||
| 316 | } | ||
| 317 | |||
| 316 | }); | 318 | }); |
| 317 | } | 319 | } |
| 318 | }); | 320 | }); |
| 319 | |||
| 320 | }, | 321 | }, |
| 321 | // 关闭事件 | 322 | // 关闭事件 |
| 322 | close () { | 323 | close () { |
| ... | @@ -351,7 +352,17 @@ | ... | @@ -351,7 +352,17 @@ |
| 351 | }, | 352 | }, |
| 352 | // 勾选人员事件 | 353 | // 勾选人员事件 |
| 353 | handleSelectionChange (val) { | 354 | handleSelectionChange (val) { |
| 355 | this.lastuserList.forEach((element, index) => { | ||
| 356 | delete this.lastuserList[index].selectStatus | ||
| 357 | }); | ||
| 354 | this.usermultipleSelection = val; | 358 | this.usermultipleSelection = val; |
| 359 | this.lastuserList.forEach((element, index) => { | ||
| 360 | this.usermultipleSelection.forEach(element1 => { | ||
| 361 | if (element.id == element1.id) { | ||
| 362 | this.lastuserList[index].selectStatus = 0 | ||
| 363 | } | ||
| 364 | }); | ||
| 365 | }); | ||
| 355 | }, | 366 | }, |
| 356 | // 数据筛选 | 367 | // 数据筛选 |
| 357 | setarrdata (scope, arr) { | 368 | setarrdata (scope, arr) { |
| ... | @@ -383,6 +394,23 @@ | ... | @@ -383,6 +394,23 @@ |
| 383 | ) | 394 | ) |
| 384 | this.getAuthorizedInfo() | 395 | this.getAuthorizedInfo() |
| 385 | }, | 396 | }, |
| 397 | handleClick (tab, event) { | ||
| 398 | this.lastuserList.forEach((item, index) => { | ||
| 399 | if (item.selectStatus === 0) { | ||
| 400 | this.$nextTick(async () => { | ||
| 401 | await this.$refs.multipleTable | ||
| 402 | if (this.$refs.multipleTable) { | ||
| 403 | this.$refs.multipleTable.toggleRowSelection( | ||
| 404 | this.lastuserList[index], | ||
| 405 | true | ||
| 406 | ); | ||
| 407 | } | ||
| 408 | |||
| 409 | }); | ||
| 410 | } | ||
| 411 | }); | ||
| 412 | } | ||
| 413 | |||
| 386 | }, | 414 | }, |
| 387 | }; | 415 | }; |
| 388 | </script> | 416 | </script> |
| ... | @@ -566,13 +594,8 @@ | ... | @@ -566,13 +594,8 @@ |
| 566 | display: flex; | 594 | display: flex; |
| 567 | margin-bottom: 15px; | 595 | margin-bottom: 15px; |
| 568 | } | 596 | } |
| 569 | 597 | .el-dialog__footer { | |
| 570 | .dialog_footer { | 598 | padding-right: 40px; |
| 571 | flex-direction: column; | ||
| 572 | |||
| 573 | .dialog_button { | ||
| 574 | margin-top: 8px; | ||
| 575 | } | ||
| 576 | } | 599 | } |
| 577 | 600 | ||
| 578 | .divider { | 601 | .divider { | ... | ... |
| ... | @@ -114,7 +114,7 @@ | ... | @@ -114,7 +114,7 @@ |
| 114 | { required: true, message: "请输入用户名", trigger: "blur" }, | 114 | { required: true, message: "请输入用户名", trigger: "blur" }, |
| 115 | ], | 115 | ], |
| 116 | }, | 116 | }, |
| 117 | title: "", | 117 | title: "修改", |
| 118 | visible: false, | 118 | visible: false, |
| 119 | showLoginName: false, | 119 | showLoginName: false, |
| 120 | sexList: [{ lable: "0", value: "0", name: "男" }, { lable: "1", value: "1", name: "女" }], | 120 | sexList: [{ lable: "0", value: "0", name: "男" }, { lable: "1", value: "1", name: "女" }], |
| ... | @@ -230,4 +230,14 @@ | ... | @@ -230,4 +230,14 @@ |
| 230 | /deep/.el-form-item__label { | 230 | /deep/.el-form-item__label { |
| 231 | color: #fff; | 231 | color: #fff; |
| 232 | } | 232 | } |
| 233 | /deep/.el-dialog__body { | ||
| 234 | padding-top: 20px; | ||
| 235 | } | ||
| 236 | /deep/.el-dialog__header { | ||
| 237 | text-align: center; | ||
| 238 | margin-bottom: 10px; | ||
| 239 | .el-dialog__title { | ||
| 240 | color: white; | ||
| 241 | } | ||
| 242 | } | ||
| 233 | </style> | 243 | </style> | ... | ... |
| ... | @@ -17,9 +17,7 @@ | ... | @@ -17,9 +17,7 @@ |
| 17 | </div> | 17 | </div> |
| 18 | <div class="from-clues-content"> | 18 | <div class="from-clues-content"> |
| 19 | <lb-table | 19 | <lb-table |
| 20 | :page-size="pageData.size" | 20 | :pagination="false" |
| 21 | :current-page.sync="pageData.current" | ||
| 22 | :total="pageData.total" | ||
| 23 | @size-change="handleSizeChange" | 21 | @size-change="handleSizeChange" |
| 24 | @p-current-change="handleCurrentChange" | 22 | @p-current-change="handleCurrentChange" |
| 25 | :column="tableData.columns" | 23 | :column="tableData.columns" |
| ... | @@ -182,11 +180,6 @@ | ... | @@ -182,11 +180,6 @@ |
| 182 | ]), | 180 | ]), |
| 183 | data: [], | 181 | data: [], |
| 184 | }, | 182 | }, |
| 185 | pageData: { | ||
| 186 | total: 5, | ||
| 187 | pageSize: 15, | ||
| 188 | current: 1, | ||
| 189 | }, | ||
| 190 | }; | 183 | }; |
| 191 | }, | 184 | }, |
| 192 | created () { | 185 | created () { |
| ... | @@ -209,6 +202,7 @@ | ... | @@ -209,6 +202,7 @@ |
| 209 | departmentId: this.departmentid.departmentId, | 202 | departmentId: this.departmentid.departmentId, |
| 210 | }; | 203 | }; |
| 211 | getUserList(this.queryParam).then((res) => { | 204 | getUserList(this.queryParam).then((res) => { |
| 205 | console.log("人员列表", res); | ||
| 212 | if (res.status === 1) { | 206 | if (res.status === 1) { |
| 213 | this.loading = false; | 207 | this.loading = false; |
| 214 | this.tableData.data = res.content; | 208 | this.tableData.data = res.content; | ... | ... |
-
Please register or sign in to post a comment