Commit 74e7a524 by li_hongchao

发查询权限 ui问题调整

parent de4818f8
...@@ -806,10 +806,13 @@ export default { ...@@ -806,10 +806,13 @@ export default {
let hz = this.showType === 1 ? 'Ry' : 'Aj' let hz = this.showType === 1 ? 'Ry' : 'Aj'
return this.qxgzPopName + hz + index return this.qxgzPopName + hz + index
}, },
clickQxgz(index) { cancleQxgzPop() {
if (this.qxgzPopIndex !== -1 && this.qxgzPopIndex !== index) { if (this.qxgzPopIndex !== -1) {
this.$refs[this.getQxgzPopRef(this.qxgzPopIndex)].cancel() this.$refs[this.getQxgzPopRef(this.qxgzPopIndex)].cancel()
} }
},
clickQxgz(index) {
this.cancleQxgzPop()
this.qxgzPopIndex = index this.qxgzPopIndex = index
}, },
// 获取全部人员列表请求 // 获取全部人员列表请求
...@@ -1092,6 +1095,7 @@ export default { ...@@ -1092,6 +1095,7 @@ export default {
//复制条码列表操作 //复制条码列表操作
isShowFztmBtn(val) { isShowFztmBtn(val) {
this.cancleQxgzPop()
//console.log("复制条码", val); //console.log("复制条码", val);
if (this.showType == 1) { if (this.showType == 1) {
this.type = 'ry' this.type = 'ry'
...@@ -1155,6 +1159,7 @@ export default { ...@@ -1155,6 +1159,7 @@ export default {
} }
}, },
isShowFcxBtn1(val) { isShowFcxBtn1(val) {
this.cancleQxgzPop()
//console.log("单行人员发查询数据", val); //console.log("单行人员发查询数据", val);
let rowVal = [] let rowVal = []
rowVal.push(val) rowVal.push(val)
...@@ -1212,6 +1217,7 @@ export default { ...@@ -1212,6 +1217,7 @@ export default {
* @return {*} * @return {*}
*/ */
handleClick(row) { handleClick(row) {
this.cancleQxgzPop()
//console.log(row); //console.log(row);
if (this.showType == 1) { if (this.showType == 1) {
// 清除bus // 清除bus
...@@ -1324,9 +1330,16 @@ export default { ...@@ -1324,9 +1330,16 @@ export default {
}, },
mounted() { mounted() {
this.search() this.search()
let _that = this
//console.log(this.$route.query.id, 'this.$route.query.id') //console.log(this.$route.query.id, 'this.$route.query.id')
this.showType = this.$route.query.id || '1' this.showType = this.$route.query.id || '1'
document.addEventListener('click', function (event) {
logger.info('click', '1111111111111111111111111111111111111')
if (_that.qxgzPopIndex !== -1) {
_that.$refs[_that.getQxgzPopRef(_that.qxgzPopIndex)].cancel()
_that.qxgzPopIndex = -1
}
})
}, },
} }
</script> </script>
......
...@@ -35,9 +35,7 @@ ...@@ -35,9 +35,7 @@
<div class="txt">系统可发送查询总数:</div> <div class="txt">系统可发送查询总数:</div>
<el-input v-model="numTotal" @input="totalNumChanged"></el-input> <el-input v-model="numTotal" @input="totalNumChanged"></el-input>
<label>条/天</label> <label>条/天</label>
<el-checkbox class="ckbAuto" fill="#055FE7" v-model="isAutoDistribute" <el-checkbox class="ckbAuto" fill="#055FE7" v-model="isAutoDistribute">省厅总数自动分配</el-checkbox>
>省厅总数自动分配</el-checkbox
>
<button @click="autoDistribute" class="f-primary-button"> <button @click="autoDistribute" class="f-primary-button">
一键分配 一键分配
</button> </button>
...@@ -57,7 +55,12 @@ ...@@ -57,7 +55,12 @@
v-on:change="changeStGaoNum" v-on:change="changeStGaoNum"
></numberInput> ></numberInput>
</div> </div>
<el-table :data="tableDateSt" tooltip-effect="dark" style="width: 100%"> <el-table
:border="true"
:data="tableDateSt"
tooltip-effect="dark"
style="width: 100%"
:header-cell-class-name="tableRowClassName">
<el-table-column label="省/区厅用户名" prop="userName"> <el-table-column label="省/区厅用户名" prop="userName">
</el-table-column> </el-table-column>
<el-table-column label="已发送/总数" prop="date"> <el-table-column label="已发送/总数" prop="date">
...@@ -81,7 +84,7 @@ ...@@ -81,7 +84,7 @@
</editableLable> </editableLable>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="其中(高优先级)" prop="highTotal"> <el-table-column class="kkk" label="其中(高优先级)" prop="highTotal">
<template slot-scope="scope"> <template slot-scope="scope">
<editableLable <editableLable
v-bind:id="scope.row.userId.toString()" v-bind:id="scope.row.userId.toString()"
...@@ -97,7 +100,7 @@ ...@@ -97,7 +100,7 @@
</el-table> </el-table>
<div v-show="selectedFeature" class="dsTongjiBlk"> <div v-show="selectedFeature" class="dsTongjiBlk">
<label>地市单位:</label> <label>地市单位:</label>
<label>{{ dsdw + "公安局" }}</label> <label>{{ dsdw + '公安局' }}</label>
<div class="dsTongji"> <div class="dsTongji">
<div>地市发查询总数:</div> <div>地市发查询总数:</div>
<div class="labelBack pink"></div> <div class="labelBack pink"></div>
...@@ -115,10 +118,12 @@ ...@@ -115,10 +118,12 @@
</div> </div>
</div> </div>
<el-table <el-table
:border="true"
ref="dishiTable" ref="dishiTable"
:data="tableDateDs" :data="tableDateDs"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
:header-cell-class-name="tableRowClassName"
> >
<el-table-column label="省/区厅用户名" prop="userName"> <el-table-column label="省/区厅用户名" prop="userName">
</el-table-column> </el-table-column>
...@@ -161,40 +166,41 @@ ...@@ -161,40 +166,41 @@
</div> </div>
</template> </template>
<script> <script>
import dataR from "@/assets/data/xz.json"; import dataR from '@/assets/data/xz.json'
import dataP from "@/assets/data/xzP.json"; import dataP from '@/assets/data/xzP.json'
import Map from "ol/Map"; import Map from 'ol/Map'
import View from "ol/View"; import View from 'ol/View'
import GeoJSON from "ol/format/GeoJSON"; import GeoJSON from 'ol/format/GeoJSON'
import { Vector as VectorSource } from "ol/source"; import {Vector as VectorSource} from 'ol/source'
import { Vector as VectorLayer } from "ol/layer"; import {Vector as VectorLayer} from 'ol/layer'
import { Fill, Stroke, Style, Text, Icon } from "ol/style"; import {Fill, Stroke, Style, Text, Icon} from 'ol/style'
import { Point } from "ol/geom"; import {Point} from 'ol/geom'
import marker from "@/assets/img/fcxqx/marker.png"; import marker from '@/assets/img/fcxqx/marker.png'
import markers from "@/assets/img/fcxqx/markerS.png"; import markers from '@/assets/img/fcxqx/markerS.png'
import editableLable from "@/views/SystemManage/editableLable.vue"; import editableLable from '@/views/SystemManage/editableLable.vue'
import numberInput from "@/views/SystemManage/numberInput.vue"; import numberInput from '@/views/SystemManage/numberInput.vue'
import qs from "qs"; import qs from 'qs'
let selectedRegionLayer, selectedPointLayer;
let selectedRegionLayer, selectedPointLayer
export default { export default {
name: "QueryPermission", name: 'QueryPermission',
components: { editableLable, numberInput }, components: {editableLable, numberInput},
data() { data() {
return { return {
stDataObj: {}, stDataObj: {},
dsDataObj: {}, dsDataObj: {},
dsdw: "拉萨市", dsdw: '拉萨市',
tableDateDs: [], tableDateDs: [],
tableDateSt: [], tableDateSt: [],
isAutoDistribute: true, isAutoDistribute: true,
id: "olGeojsonMap", id: 'olGeojsonMap',
heightWindow: window.innerHeight - 0 + "px", heightWindow: window.innerHeight - 0 + 'px',
selectedFeature: null, selectedFeature: null,
colorArr: [ colorArr: [
"rgba(154, 218, 252, 0.64)", 'rgba(154, 218, 252, 0.64)',
"rgba(130, 199, 253, 1)", 'rgba(130, 199, 253, 1)',
"rgba(10, 200, 153, 1)", 'rgba(10, 200, 153, 1)',
], ],
numTotal: 0, numTotal: 0,
numTotalSt: 0, numTotalSt: 0,
...@@ -208,152 +214,164 @@ export default { ...@@ -208,152 +214,164 @@ export default {
intervalNum: 0, intervalNum: 0,
regionFeatures: [], regionFeatures: [],
pointFeatures: [], pointFeatures: [],
shengtingCode: "540000000000", shengtingCode: '540000000000',
dishiCode: "540100000000", dishiCode: '540100000000',
}; }
}, },
methods: { methods: {
tableRowClassName({row, column, rowIndex, columnIndex}) {
logger.info('row', row)
logger.info('column', column)
logger.info('rowIndex', rowIndex)
logger.info('columnIndex', columnIndex)
console.log(columnIndex)
if (columnIndex === 2) {
return 'redTableHeader'
} else {
return 'commonTableHeader'
}
},
initMap() { initMap() {
const self = this; const self = this
// 地图地址 // 地图地址
const features = new GeoJSON().readFeatures(dataR); const features = new GeoJSON().readFeatures(dataR)
this.regionFeatures = features; this.regionFeatures = features
const featuresP = new GeoJSON().readFeatures(dataP); const featuresP = new GeoJSON().readFeatures(dataP)
this.pointFeatures = featuresP; this.pointFeatures = featuresP
const vectorSource = new VectorSource({ const vectorSource = new VectorSource({
features: features, features: features,
}); })
const pointLayer = new VectorLayer({ const pointLayer = new VectorLayer({
source: new VectorSource({ source: new VectorSource({
features: featuresP, features: featuresP,
}), }),
style: function(feature) { style: function (feature) {
const style = [ const style = [
new Style({ new Style({
text: new Text({ text: new Text({
font: "14px HarmonyOS_Sans_SC-Bold, HarmonyOS_Sans_SC", font: '14px HarmonyOS_Sans_SC-Bold, HarmonyOS_Sans_SC',
fill: new Fill({ fill: new Fill({
color: "rgba(255, 255, 255, 1)", color: 'rgba(255, 255, 255, 1)',
}), }),
offsetY: -35, offsetY: -35,
textAlign: "center", textAlign: 'center',
text: feature.get("totalCount") || "", text: feature.get('totalCount') || '',
}), }),
image: new Icon({ image: new Icon({
anchor: [0.5, 120], anchor: [0.5, 120],
scale: 0.5, scale: 0.5,
anchorXUnits: "fraction", anchorXUnits: 'fraction',
anchorYUnits: "pixels", anchorYUnits: 'pixels',
src: marker, src: marker,
}), }),
}), }),
new Style({ new Style({
text: new Text({ text: new Text({
font: "14px HarmonyOS_Sans_SC", font: '14px HarmonyOS_Sans_SC',
fill: new Fill({ fill: new Fill({
color: "rgba(255, 255, 255, 1)", color: 'rgba(255, 255, 255, 1)',
}), }),
backgroundFill: new Fill({ backgroundFill: new Fill({
color: "rgba(0, 0, 0, 0.6) ", color: 'rgba(0, 0, 0, 0.6) ',
}), }),
backgroundStroke: new Stroke({ backgroundStroke: new Stroke({
color: "rgba(255, 255, 255, 1)", color: 'rgba(255, 255, 255, 1)',
width: 1, width: 1,
}), }),
textAlign: "center", textAlign: 'center',
padding: [3, 1, 0, 3], padding: [3, 1, 0, 3],
text: feature.get("MC"), text: feature.get('MC'),
}), }),
}), }),
]; ]
return style; return style
}, },
}); })
const layer = new VectorLayer({ const layer = new VectorLayer({
source: vectorSource, source: vectorSource,
style: function(feature) { style: function (feature) {
const style = new Style({ const style = new Style({
fill: new Fill({ fill: new Fill({
color: self.getFeatureColor(feature.get("percentage")), color: self.getFeatureColor(feature.get('percentage')),
}), }),
stroke: new Stroke({ stroke: new Stroke({
color: "#fff", color: '#fff',
width: 2, width: 2,
}), }),
}); })
return style; return style
}, },
}); })
selectedRegionLayer = new VectorLayer({ selectedRegionLayer = new VectorLayer({
source: new VectorSource(), source: new VectorSource(),
style: function(feature) { style: function (feature) {
const rstyle = new Style({ const rstyle = new Style({
fill: new Fill({ fill: new Fill({
color: "rgba(154, 218, 252, 0)", color: 'rgba(154, 218, 252, 0)',
}), }),
stroke: new Stroke({ stroke: new Stroke({
color: "#055FE7", color: '#055FE7',
width: 3, width: 3,
}), }),
}); })
return rstyle; return rstyle
}, },
}); })
selectedPointLayer = new VectorLayer({ selectedPointLayer = new VectorLayer({
source: new VectorSource(), source: new VectorSource(),
style: function(feature) { style: function (feature) {
const pstyle = [ const pstyle = [
new Style({ new Style({
text: new Text({ text: new Text({
font: "14px HarmonyOS_Sans_SC-Bold, HarmonyOS_Sans_SC", font: '14px HarmonyOS_Sans_SC-Bold, HarmonyOS_Sans_SC',
fill: new Fill({ fill: new Fill({
color: "#333333", color: '#333333',
}), }),
offsetY: -35, offsetY: -35,
textAlign: "center", textAlign: 'center',
text: feature.get("totalCount") || "", text: feature.get('totalCount') || '',
}), }),
image: new Icon({ image: new Icon({
scale: 0.5, scale: 0.5,
anchor: [0.5, 120], anchor: [0.5, 120],
anchorXUnits: "fraction", anchorXUnits: 'fraction',
anchorYUnits: "pixels", anchorYUnits: 'pixels',
src: markers, src: markers,
}), }),
}), }),
new Style({ new Style({
text: new Text({ text: new Text({
font: "14px HarmonyOS_Sans_SC", font: '14px HarmonyOS_Sans_SC',
fill: new Fill({ fill: new Fill({
color: "rgba(51, 51, 51, 1)", color: 'rgba(51, 51, 51, 1)',
}), }),
backgroundFill: new Fill({ backgroundFill: new Fill({
color: "rgba(255, 255, 255, 1)", color: 'rgba(255, 255, 255, 1)',
}), }),
textAlign: "center", textAlign: 'center',
padding: [3, 1, 0, 3], padding: [3, 1, 0, 3],
text: feature.get("MC"), text: feature.get('MC'),
}), }),
}), }),
]; ]
return pstyle; return pstyle
}, },
}); })
const map = new Map({ const map = new Map({
layers: [layer, selectedRegionLayer, pointLayer, selectedPointLayer], layers: [layer, selectedRegionLayer, pointLayer, selectedPointLayer],
controls: [], controls: [],
target: this.id, target: this.id,
view: new View({ view: new View({
projection: "EPSG:4326", projection: 'EPSG:4326',
}), }),
}); })
const ext = vectorSource.getExtent(); const ext = vectorSource.getExtent()
map.getView().fit(ext); map.getView().fit(ext)
// 地图鼠标移动事件 // 地图鼠标移动事件
map.on("click", function(evt) { map.on('click', function (evt) {
const pixel = map.getEventPixel(evt.originalEvent); const pixel = map.getEventPixel(evt.originalEvent)
const features = map.getFeaturesAtPixel(pixel); const features = map.getFeaturesAtPixel(pixel)
// 原更改样式选中 // 原更改样式选中
// 鼠标移出清空则打开 // 鼠标移出清空则打开
// if (features.length <= 0 && self.selectedFeature) { // if (features.length <= 0 && self.selectedFeature) {
...@@ -362,222 +380,222 @@ export default { ...@@ -362,222 +380,222 @@ export default {
// self.tableDateDs = []; // self.tableDateDs = [];
// } // }
for (let i = 0; i < features.length; i++) { for (let i = 0; i < features.length; i++) {
const fea = features[i]; const fea = features[i]
if ( if (
self.selectedFeature && self.selectedFeature &&
fea.get("CODE_LEV") === self.selectedFeature.get("CODE_LEV") fea.get('CODE_LEV') === self.selectedFeature.get('CODE_LEV')
) { ) {
return; return
} }
if (layer.getSource().hasFeature(fea)) { if (layer.getSource().hasFeature(fea)) {
if (features && features.length > 0) { if (features && features.length > 0) {
self.selectedFeature = fea.clone(); self.selectedFeature = fea.clone()
selectedRegionLayer.getSource().clear(); selectedRegionLayer.getSource().clear()
selectedPointLayer.getSource().clear(); selectedPointLayer.getSource().clear()
selectedRegionLayer.getSource().addFeature(self.selectedFeature); selectedRegionLayer.getSource().addFeature(self.selectedFeature)
// 找到对应的点 // 找到对应的点
const pFea = self.pointFeatures.filter( const pFea = self.pointFeatures.filter(
(item) => item.get("CODE_LEV") === fea.get("CODE_LEV") (item) => item.get('CODE_LEV') === fea.get('CODE_LEV')
)[0]; )[0]
if (pFea) { if (pFea) {
selectedPointLayer.getSource().addFeature(pFea); selectedPointLayer.getSource().addFeature(pFea)
console.log("dian", pFea); console.log('dian', pFea)
} }
const dsCode = fea.get("CODE_LEV"); const dsCode = fea.get('CODE_LEV')
self.dsdw = fea.get("MC"); self.dsdw = fea.get('MC')
self.dishiCode = fea.get("CODE_LEV"); self.dishiCode = fea.get('CODE_LEV')
if (dsCode) { if (dsCode) {
self.loadDishiData(dsCode); self.loadDishiData(dsCode)
} }
} }
} }
} }
}); })
}, },
// 手动选中某个区域 // 手动选中某个区域
selectFeature(id) { selectFeature(id) {
if (!id) { if (!id) {
id = this.dishiCode; id = this.dishiCode
} }
const pFea = this.pointFeatures.filter( const pFea = this.pointFeatures.filter(
(fea) => fea.get("CODE_LEV") === id (fea) => fea.get('CODE_LEV') === id
)[0]; )[0]
const rFea = this.regionFeatures.filter( const rFea = this.regionFeatures.filter(
(fea) => fea.get("CODE_LEV") === id (fea) => fea.get('CODE_LEV') === id
)[0]; )[0]
if (pFea && rFea) { if (pFea && rFea) {
this.selectedFeature = rFea.clone(); this.selectedFeature = rFea.clone()
selectedRegionLayer.getSource().clear(); selectedRegionLayer.getSource().clear()
selectedPointLayer.getSource().clear(); selectedPointLayer.getSource().clear()
selectedRegionLayer.getSource().addFeature(this.selectedFeature); selectedRegionLayer.getSource().addFeature(this.selectedFeature)
selectedPointLayer.getSource().addFeature(pFea.clone()); selectedPointLayer.getSource().addFeature(pFea.clone())
this.loadDishiData(this.dishiCode); this.loadDishiData(this.dishiCode)
} }
}, },
getFeatureColor(num = 0) { getFeatureColor(num = 0) {
const curnum = Number(num); const curnum = Number(num)
if (curnum > 0.7) { if (curnum > 0.7) {
return this.colorArr[2]; return this.colorArr[2]
} else if (curnum > 0.3) { } else if (curnum > 0.3) {
return this.colorArr[1]; return this.colorArr[1]
} else { } else {
return this.colorArr[0]; return this.colorArr[0]
} }
}, },
loadShengtingData() { loadShengtingData() {
const self = this; const self = this
this.$axios({ this.$axios({
method: "get", method: 'get',
url: "api/queryCount/provinceMsg/" + self.shengtingCode, url: 'api/queryCount/provinceMsg/' + self.shengtingCode,
loading: false, loading: false,
}).then((response) => { }).then((response) => {
if (response.data.code === 0) { if (response.data.code === 0) {
console.log(response.data.detail.queryCounts); console.log(response.data.detail.queryCounts)
self.tableDateSt = response.data.detail.queryCounts; self.tableDateSt = response.data.detail.queryCounts
self.numTotal = response.data.detail.sysCountTotal; self.numTotal = response.data.detail.sysCountTotal
self.numTotalSt = response.data.detail.countTotal; self.numTotalSt = response.data.detail.countTotal
self.numGaoSt = response.data.detail.highLevTotal; self.numGaoSt = response.data.detail.highLevTotal
self.numTotalStUsed = response.data.detail.usedCount; self.numTotalStUsed = response.data.detail.usedCount
self.numGaoStUsed = response.data.detail.highLevUsedCount; self.numGaoStUsed = response.data.detail.highLevUsedCount
} else { } else {
this.$message.error(response.data.message); this.$message.error(response.data.message)
} }
}); })
}, },
loadDishiData(code) { loadDishiData(code) {
if (!code) { if (!code) {
code = this.dishiCode; code = this.dishiCode
} }
if (!code) { if (!code) {
return; return
} }
const self = this; const self = this
this.$axios({ this.$axios({
method: "get", method: 'get',
url: "api/queryCount/cityMsg/" + code, url: 'api/queryCount/cityMsg/' + code,
loading: false, loading: false,
}).then((response) => { }).then((response) => {
if (response.data.code === 0) { if (response.data.code === 0) {
self.tableDateDs = []; self.tableDateDs = []
self.tableDateDs = response.data.detail.queryCounts; self.tableDateDs = response.data.detail.queryCounts
self.numTotalDs = response.data.detail.countTotal; self.numTotalDs = response.data.detail.countTotal
self.numGaoDs = response.data.detail.highLevTotal; self.numGaoDs = response.data.detail.highLevTotal
self.numTotalDsUsed = response.data.detail.usedCount; self.numTotalDsUsed = response.data.detail.usedCount
self.numGaoDsUsed = response.data.detail.highLevUsedCount; self.numGaoDsUsed = response.data.detail.highLevUsedCount
} else { } else {
this.$message.error(response.data.message); this.$message.error(response.data.message)
} }
}); })
}, },
getMapPageData() { getMapPageData() {
const self = this; const self = this
this.$axios({ this.$axios({
method: "get", method: 'get',
url: "/api/queryCount/getPercentage", url: '/api/queryCount/getPercentage',
loading: false, loading: false,
headers: { headers: {
QueryCount: "QueryCount", QueryCount: 'QueryCount',
}, },
}).then((response) => { }).then((response) => {
if (response.data.code === 0) { if (response.data.code === 0) {
console.log(response.data.detail); console.log(response.data.detail)
self.pointFeatures.forEach((fea) => { self.pointFeatures.forEach((fea) => {
const code = fea.get("CODE_LEV"); const code = fea.get('CODE_LEV')
const totalCount = const totalCount =
response.data.detail.filter((item) => item.dwCode === code)[0] response.data.detail.filter((item) => item.dwCode === code)[0]
.totalCount || 0; .totalCount || 0
fea.set("totalCount", totalCount.toString()); fea.set('totalCount', totalCount.toString())
}); })
// 更新feature 属性 // 更新feature 属性
self.regionFeatures.forEach((fea) => { self.regionFeatures.forEach((fea) => {
const code = fea.get("CODE_LEV"); const code = fea.get('CODE_LEV')
const percentage = const percentage =
response.data.detail.filter((item) => item.dwCode === code)[0] response.data.detail.filter((item) => item.dwCode === code)[0]
.percentage || ""; .percentage || ''
fea.set("percentage", percentage); fea.set('percentage', percentage)
}); })
} else { } else {
self.$message.error(response.data.message); self.$message.error(response.data.message)
} }
self.selectFeature(); self.selectFeature()
}); })
}, },
totalNumChanged(val) { totalNumChanged(val) {
console.log("限制输入数字外的其他类型"); console.log('限制输入数字外的其他类型')
if (val && !Number(val)) { if (val && !Number(val)) {
this.numTotal = this.numTotal.replace(/[^0-9]/gi, ""); this.numTotal = this.numTotal.replace(/[^0-9]/gi, '')
} }
}, },
// 一键分配按钮点击 // 一键分配按钮点击
autoDistribute() { autoDistribute() {
const self = this; const self = this
this.$axios({ this.$axios({
method: "post", method: 'post',
url: "/api/queryCount/autoAssignment", url: '/api/queryCount/autoAssignment',
params: { params: {
totalCount: self.numTotal, totalCount: self.numTotal,
areaCount: self.regionFeatures.length + 1, areaCount: self.regionFeatures.length + 1,
}, },
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
self.$message.success("一键分配成功"); self.$message.success('一键分配成功')
} else if (res.data.code === 201) { } else if (res.data.code === 201) {
self.$message.error("一键分配失败,请核查输入总数"); self.$message.error('一键分配失败,请核查输入总数')
} else { } else {
self.$message.error("一键分配失败,请重试"); self.$message.error('一键分配失败,请重试')
} }
// 更改页面数据(重新加载页面) // 更改页面数据(重新加载页面)
self.getMapPageData(); self.getMapPageData()
self.loadShengtingData(); self.loadShengtingData()
self.loadDishiData(); self.loadDishiData()
}); })
}, },
// 省厅用户修改 // 省厅用户修改
changeStPeo(a, b, c) { changeStPeo(a, b, c) {
console.log(a, b, c); console.log(a, b, c)
}, },
// 修改省厅发查询总数 // 修改省厅发查询总数
changeStTotalNum(val) { changeStTotalNum(val) {
this.changeTotalNumber(this.shengtingCode, 0, val, function(res) { this.changeTotalNumber(this.shengtingCode, 0, val, function (res) {
console.log("修改省厅总数成功"); console.log('修改省厅总数成功')
}); })
}, },
// 修改省厅高优先级总数 // 修改省厅高优先级总数
changeStGaoNum(val) { changeStGaoNum(val) {
const self = this; const self = this
this.changeTotalNumber(this.shengtingCode, 1, val, function(res) { this.changeTotalNumber(this.shengtingCode, 1, val, function (res) {
self.loadShengtingData(); self.loadShengtingData()
// 修改省/地市发查询总数后,分配后的总数平均分配给该地市下的用户20220118 // 修改省/地市发查询总数后,分配后的总数平均分配给该地市下的用户20220118
self.loadDishiData(); self.loadDishiData()
self.getMapPageData(); self.getMapPageData()
}); })
}, },
// 修改地市发查询总数 // 修改地市发查询总数
changeDsTotalNum(val) { changeDsTotalNum(val) {
const self = this; const self = this
this.changeTotalNumber(this.dishiCode, 0, val, function(res) { this.changeTotalNumber(this.dishiCode, 0, val, function (res) {
self.loadDishiData(); self.loadDishiData()
self.getMapPageData(); self.getMapPageData()
}); })
}, },
// 修改地市高优先级总数 // 修改地市高优先级总数
changeDsGaoNum(val) { changeDsGaoNum(val) {
this.changeTotalNumber(this.dishiCode, 1, val, function(res) { this.changeTotalNumber(this.dishiCode, 1, val, function (res) {
console.log("修改省厅高优先级成功"); console.log('修改省厅高优先级成功')
}); })
}, },
// 修改地区省/区厅发查询总数、高优先级数 // 修改地区省/区厅发查询总数、高优先级数
// 0:修改总数 1:修改高优先级 // 0:修改总数 1:修改高优先级
changeTotalNumber(id, type, num, fn) { changeTotalNumber(id, type, num, fn) {
const self = this; const self = this
this.$axios({ this.$axios({
method: "put", method: 'put',
headers: { headers: {
"Content-Type": "application/x-www-form-urlencoded", 'Content-Type': 'application/x-www-form-urlencoded',
}, },
url: "/api/queryCount/updateAreaQueryCount", url: '/api/queryCount/updateAreaQueryCount',
data: qs.stringify({ data: qs.stringify({
dwCode: id, dwCode: id,
flag: type, flag: type,
...@@ -586,24 +604,24 @@ export default { ...@@ -586,24 +604,24 @@ export default {
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
if (fn) { if (fn) {
fn(res.data); fn(res.data)
} }
self.$message.success("修改成功"); self.$message.success('修改成功')
} else { } else {
self.$message.error("分配失败,请核查输入数值"); self.$message.error('分配失败,请核查输入数值')
} }
}); })
}, },
// 修改用户发查询总数、高优先级数 // 修改用户发查询总数、高优先级数
// 0:修改总数 1:修改高优先级 // 0:修改总数 1:修改高优先级
changeYonghuTotalNumber(id, type, num, isSt, fn) { changeYonghuTotalNumber(id, type, num, isSt, fn) {
const self = this; const self = this
this.$axios({ this.$axios({
method: "put", method: 'put',
headers: { headers: {
"Content-Type": "application/x-www-form-urlencoded", 'Content-Type': 'application/x-www-form-urlencoded',
}, },
url: "/api/queryCount/updateUserQueryCount", url: '/api/queryCount/updateUserQueryCount',
data: qs.stringify({ data: qs.stringify({
userId: id, userId: id,
flag: type, flag: type,
...@@ -611,78 +629,110 @@ export default { ...@@ -611,78 +629,110 @@ export default {
}), }),
}).then((res) => { }).then((res) => {
if (res.data.code !== 0) { if (res.data.code !== 0) {
self.$message.error("分配失败,请核查输入数值"); self.$message.error('分配失败,请核查输入数值')
} else { } else {
self.$message.success("修改成功"); self.$message.success('修改成功')
} }
if (fn) { if (fn) {
fn(res.data.code === 0); fn(res.data.code === 0)
} }
if (isSt) { if (isSt) {
self.loadShengtingData(); self.loadShengtingData()
} else { } else {
self.loadDishiData(); self.loadDishiData()
} }
}); })
}, },
countTime() { countTime() {
const justnow = new Date(); const justnow = new Date()
// 3是循环时间 // 3是循环时间
justnow.getHours() === 0 && justnow.getHours() === 0 &&
justnow.getMinutes() - 3 < 0 && justnow.getMinutes() - 3 < 0 &&
this.reloadUsedData(); this.reloadUsedData()
}, },
reloadUsedData() { reloadUsedData() {
this.$axios({ this.$axios({
method: "get", method: 'get',
url: "/api/queryCount/flashUsedCount", url: '/api/queryCount/flashUsedCount',
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
self.$message.info("已为您刷新当日最新数据"); self.$message.info('已为您刷新当日最新数据')
// 更改页面数据(重新加载页面) // 更改页面数据(重新加载页面)
self.getMapPageData(); self.getMapPageData()
self.loadShengtingData(); self.loadShengtingData()
self.loadDishiData(); self.loadDishiData()
} }
}); })
}, },
}, },
mounted() { mounted() {
this.initMap(); this.initMap()
this.loadShengtingData(); this.loadShengtingData()
// 添加定时任务,更新地图数据 // 添加定时任务,更新地图数据
const intervalTime = 3 * 60 * 1000; //3分钟 const intervalTime = 3 * 60 * 1000 //3分钟
this.getMapPageData(); this.getMapPageData()
const self = this; const self = this
setTimeout(() => { setTimeout(() => {
//默认选中拉萨 //默认选中拉萨
self.selectFeature(); self.selectFeature()
}, 1000); }, 1000)
this.intervalNum = window.setInterval( this.intervalNum = window.setInterval(
function() { function () {
// 掉接口更新地图,并添加参数(header),不干扰登陆状态 // 掉接口更新地图,并添加参数(header),不干扰登陆状态
self.getMapPageData(); self.getMapPageData()
// 判断当前时间跨天则重新请求数据 // 判断当前时间跨天则重新请求数据
self.countTime(); self.countTime()
}, },
intervalTime intervalTime
); )
}, },
destroyed() { destroyed() {
window.clearInterval(this.intervalNum); window.clearInterval(this.intervalNum)
}, },
}; }
</script> </script>
<style lang="scss">
.commonTableHeader {
font-size: 14px !important;
font-family: MicrosoftYaHei !important;
color: #333333 !important;
}
.redTableHeader {
font-size: 14px !important;
font-family: MicrosoftYaHei !important;
color: #E60012 !important;
}
</style>
<style lang="scss" scoped>
/deep/ .el-input-number.is-controls-right .el-input-number__decrease,
/deep/ .el-input-number.is-controls-right .el-input-number__increase {
background: transparent;
}
/deep/ .el-table th {
background: linear-gradient(180deg, #FBFCFD 0%, #F6F8FA 100%);
}
/deep/ .el-table td > .cell {
margin-left: 20px;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .el-checkbox__input.is-checked + .el-checkbox__label { /deep/ .el-checkbox__input.is-checked + .el-checkbox__label {
color: #2e3846; color: #2e3846;
} }
/deep/ .el-checkbox__input.is-checked .el-checkbox__inner {
/deep/ .el-checkbox__input.is-checked .el-checkbox__inner {
background-color: #005ef7; background-color: #005ef7;
border-color: #005ef7; border-color: #005ef7;
} }
.maps {
.maps {
& .map { & .map {
width: 55rem; width: 55rem;
height: 50rem; height: 50rem;
...@@ -692,6 +742,7 @@ export default { ...@@ -692,6 +742,7 @@ export default {
margin: 24px; margin: 24px;
display: inline-block; display: inline-block;
} }
& .mapTitle { & .mapTitle {
position: absolute; position: absolute;
width: 143px; width: 143px;
...@@ -700,13 +751,16 @@ export default { ...@@ -700,13 +751,16 @@ export default {
top: 7.125rem; top: 7.125rem;
background: url("~@/assets/img/fcxqx/mapTitle.png") 100% 100% / cover; background: url("~@/assets/img/fcxqx/mapTitle.png") 100% 100% / cover;
} }
& .mapLegend { & .mapLegend {
position: absolute; position: absolute;
left: 65px; left: 65px;
bottom: 150px; bottom: 150px;
& > div { & > div {
display: flex; display: flex;
margin-bottom: 2px; margin-bottom: 2px;
& div { & div {
display: inline-block; display: inline-block;
font-size: 14px; font-size: 14px;
...@@ -714,6 +768,7 @@ export default { ...@@ -714,6 +768,7 @@ export default {
color: #333333; color: #333333;
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
&.persent { &.persent {
color: #d1d1d1; color: #d1d1d1;
} }
...@@ -725,32 +780,39 @@ export default { ...@@ -725,32 +780,39 @@ export default {
height: 24px; height: 24px;
display: inline-block; display: inline-block;
margin-right: 16px; margin-right: 16px;
&.less { &.less {
background: #bfe8fd; background: #bfe8fd;
} }
&.middle { &.middle {
background: #82c7fd; background: #82c7fd;
} }
&.many { &.many {
background: #0ac899; background: #0ac899;
} }
} }
} }
} }
.querypermission {
.querypermission {
display: flex; display: flex;
} }
.tables {
.tables {
flex: 1; flex: 1;
margin: 24px 24px 0 0; margin: 24px 24px 0 0;
& .buleBlk { & .buleBlk {
width: 4px; width: 4px;
height: 16px; height: 16px;
margin-top: 0.2rem; margin-top: 0.2rem;
margin-right: 10px; margin-right: 10px;
} }
} }
.firstLine .el-input /deep/ {
.firstLine .el-input /deep/ {
.el-input__inner { .el-input__inner {
width: 4.5rem; width: 4.5rem;
padding: 3px; padding: 3px;
...@@ -764,18 +826,30 @@ export default { ...@@ -764,18 +826,30 @@ export default {
color: #055fe7; color: #055fe7;
line-height: 26px; line-height: 26px;
} }
} }
.firstLine {
.firstLine {
display: flex; display: flex;
height: 50px; height: 50px;
align-items: center; align-items: center;
padding-bottom: 20px; padding-bottom: 20px;
& .el-input { & .el-input {
width: 80px; width: 80px;
} }
& .label {
height: 19px;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #333333;
line-height: 19px;
}
& .el-checkbox { & .el-checkbox {
margin-left: 97px; margin-left: 148px;
} }
& .el-checkbox__label /deep/ { & .el-checkbox__label /deep/ {
font-size: 14px; font-size: 14px;
font-family: HarmonyOS_Sans_SC; font-family: HarmonyOS_Sans_SC;
...@@ -790,6 +864,7 @@ export default { ...@@ -790,6 +864,7 @@ export default {
color: #2e3846; color: #2e3846;
line-height: 21px; line-height: 21px;
} }
& button { & button {
width: 96px; width: 96px;
height: 32px; height: 32px;
...@@ -804,22 +879,30 @@ export default { ...@@ -804,22 +879,30 @@ export default {
position: absolute; position: absolute;
right: 24px; right: 24px;
} }
} }
.stTongji {
.stTongji {
background: linear-gradient(270deg, #f4f9ff 0%, #e5f0ff 100%); background: linear-gradient(270deg, #f4f9ff 0%, #e5f0ff 100%);
border-radius: 4px; border-radius: 4px;
height: 50px; height: 50px;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 13px; padding: 13px;
& div { & div {
display: inline-block; display: inline-block;
} }
}
.dsTongjiBlk { .numberInput {
margin-top: 2px;
}
}
.dsTongjiBlk {
& label { & label {
line-height: 50px; line-height: 50px;
} }
& .dsTongji { & .dsTongji {
height: 50px; height: 50px;
display: flex; display: flex;
...@@ -827,40 +910,50 @@ export default { ...@@ -827,40 +910,50 @@ export default {
padding: 13px; padding: 13px;
background: linear-gradient(270deg, #fff7f7 0%, #ffefee 100%); background: linear-gradient(270deg, #fff7f7 0%, #ffefee 100%);
border-radius: 4px; border-radius: 4px;
& div { & div {
display: inline-block; display: inline-block;
} }
} }
} }
.awayLeft {
.awayLeft {
margin-left: 39px; margin-left: 39px;
} }
.labelBack {
.labelBack {
height: 8px; height: 8px;
opacity: 0.25; opacity: 0.25;
position: absolute; position: absolute;
margin-top: 13px; margin-top: 13px;
&.blue { &.blue {
width: 9rem; width: 9rem;
background: #006aff; background: #006aff;
} }
&.pink { &.pink {
width: 7.5rem; width: 7.5rem;
background: #ff3400; background: #ff3400;
} }
} }
.f-primary-button {
.f-primary-button {
cursor: pointer; cursor: pointer;
background: #055fe7 !important; background: #055fe7 !important;
&:hover { &:hover {
background: #377fec !important; background: #377fec !important;
} }
&:active { &:active {
background: #044cb9 !important; background: #044cb9 !important;
} }
} }
/deep/.el-input-number.is-controls-right .el-input__inner{
/deep/ .el-input-number.is-controls-right .el-input__inner {
padding-left: 30px; padding-left: 30px;
} }
// @import "@/assets/css/globalBase.scss";
// @import "@/assets/css/globalBase.scss";
</style> </style>
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