Commit a2c3e06b by 米嘉伟

Merge branch 'dev_zwpt' of http://47.92.108.28/changchao/founder_vue into dev_zwpt

parents b4eff4c9 9fd49cf6
<!--
* @Author: your name
* @Date: 2021-12-24 09:50:39
* @LastEditTime: 2021-12-27 21:12:18
* @LastEditTime: 2021-12-28 10:30:52
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\views\SystemManage\QueryPermission.vue
......@@ -63,6 +63,7 @@
<editableLable
v-bind:id="scope.row.userId.toString()"
v-bind:type="0"
v-bind:isSt="true"
v-bind:preText="
(scope.row.midUsed + scope.row.highUsed).toString() + '/'
"
......@@ -79,6 +80,7 @@
<editableLable
v-bind:id="scope.row.userId.toString()"
v-bind:type="1"
v-bind:isSt="true"
v-bind:preText="scope.row.highUsed.toString() + '/'"
v-bind:text="scope.row.highTotal.toString()"
v-on:change="changeYonghuTotalNumber"
......@@ -118,6 +120,7 @@
<editableLable
v-bind:id="scope.row.userId.toString()"
v-bind:type="0"
v-bind:isSt="false"
v-bind:preText="
(scope.row.midUsed + scope.row.highUsed).toString() + '/'
"
......@@ -134,6 +137,7 @@
<editableLable
v-bind:id="scope.row.userId.toString()"
v-bind:type="1"
v-bind:isSt="false"
v-bind:preText="scope.row.highUsed.toString() + '/'"
v-bind:text="scope.row.highTotal.toString()"
v-on:change="changeYonghuTotalNumber"
......@@ -160,7 +164,7 @@ import markers from "@/assets/img/fcxqx/markerS.png";
import editableLable from "@/views/SystemManage/editableLable.vue";
import numberInput from "@/views/SystemManage/numberInput.vue";
import qs from "qs";
let selectedRegionLayer, selectedPointLayer;
export default {
name: "QueryPermission",
components: { editableLable, numberInput },
......@@ -194,6 +198,7 @@ export default {
regionFeatures: [],
pointFeatures: [],
shengtingCode: "540000000000",
defaultSelectedCode: "540100000000",
};
},
methods: {
......@@ -264,7 +269,7 @@ export default {
return style;
},
});
const selectedRegionLayer = new VectorLayer({
selectedRegionLayer = new VectorLayer({
source: new VectorSource(),
style: function(feature) {
const pstyle = new Style({
......@@ -310,7 +315,7 @@ export default {
return isPoint ? pstyle : rstyle;
},
});
const selectedPointLayer = new VectorLayer({
selectedPointLayer = new VectorLayer({
source: new VectorSource(),
style: function(feature) {
const pstyle = new Style({
......@@ -412,6 +417,26 @@ export default {
}
});
},
// 手动选中某个区域
selectFeature(id) {
if (!id) {
id = this.defaultSelectedCode;
}
const pFea = this.pointFeatures.filter(
(fea) => fea.get("CODE_LEV") === id
)[0];
const rFea = this.regionFeatures.filter(
(fea) => fea.get("CODE_LEV") === id
)[0];
if (pFea && rFea) {
this.selectedFeature = rFea.clone();
selectedRegionLayer.getSource().clear();
selectedPointLayer.getSource().clear();
selectedRegionLayer.getSource().addFeature(this.selectedFeature);
selectedPointLayer.getSource().addFeature(pFea.clone());
this.loadDishiData(this.defaultSelectedCode);
}
},
getFeatureColor(num = 0) {
if (num > 0.7) {
return this.colorArr[2];
......@@ -446,6 +471,9 @@ export default {
if (!code) {
code = this.dishiCode;
}
if (!code) {
return;
}
const self = this;
this.$axios({
method: "get",
......@@ -512,11 +540,13 @@ export default {
},
}).then((res) => {
if (res.data.code === 0) {
self.$message("一键分配成功");
self.$message.info("一键分配成功");
// 更改页面数据(重新加载页面)
self.getMapPageData();
self.loadShengtingData();
self.loadDishiData();
} else if (res.data.code === 201) {
self.$message.info("一键分配失败,请核查输入总数");
} else {
self.$message.error("一键分配失败,请重试");
}
......@@ -534,14 +564,16 @@ export default {
},
// 修改省厅高优先级总数
changeStGaoNum(val) {
const self = this;
this.changeTotalNumber(this.shengtingCode, 1, val, function(res) {
console.log("修改省厅高优先级成功");
self.loadShengtingData();
});
},
// 修改地市发查询总数
changeDsTotalNum(val) {
const self = this;
this.changeTotalNumber(this.dishiCode, 0, val, function(res) {
console.log("修改省厅总数成功");
self.loadDishiData();
});
},
// 修改地市高优先级总数
......@@ -570,12 +602,14 @@ export default {
if (fn) {
fn(res.data);
}
} else if (res.data.code === 201) {
self.$message.info("分配失败,请核查输入数值");
}
});
},
// 修改用户发查询总数、高优先级数
// 0:修改总数 1:修改高优先级
changeYonghuTotalNumber(id, type, num) {
changeYonghuTotalNumber(id, type, num, isSt) {
const self = this;
this.$axios({
method: "put",
......@@ -590,6 +624,35 @@ export default {
}),
}).then((res) => {
if (res.data.code === 0) {
if (isSt) {
self.loadShengtingData();
} else {
self.loadDishiData();
self.getMapPageData();
}
} else if (res.data.code === 201) {
self.$message.info("分配失败,请核查输入数值");
}
});
},
countTime() {
const justnow = new Date();
// 3是循环时间
justnow.getHours() === 0 &&
justnow.getMinutes() - 3 < 0 &&
this.reloadUsedData();
},
reloadUsedData() {
this.$axios({
method: "get",
url: "/api/queryCount/flashUsedCount",
}).then((res) => {
if (res.data.code === 0) {
self.$message.info("已为您刷新当日最新数据");
// 更改页面数据(重新加载页面)
self.getMapPageData();
self.loadShengtingData();
self.loadDishiData();
}
});
},
......@@ -601,11 +664,16 @@ export default {
const intervalTime = 3 * 60 * 1000; //3分钟
this.getMapPageData();
const self = this;
setTimeout(() => {
//默认选中拉萨
self.selectFeature();
}, 1000);
this.intervalNum = window.setInterval(
function() {
// 掉接口更新地图,并添加参数(header),不干扰登陆状态
this.getMapPageData();
self.getMapPageData();
// 判断当前时间跨天则重新请求数据
self.countTime();
},
intervalTime
......
<!--
* @Author: your name
* @Date: 2021-12-27 11:19:03
* @LastEditTime: 2021-12-27 21:15:20
* @LastEditTime: 2021-12-27 21:47:12
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\views\SystemManage\editableLable.vue
......@@ -24,6 +24,7 @@
<script>
export default {
props: {
isSt: { type: Boolean, require: true },
id: {
type: String,
require: false,
......@@ -45,7 +46,7 @@ export default {
type: String,
require: false,
default: "",
},
},
},
data() {
return {
......@@ -62,7 +63,7 @@ export default {
textChange(txt) {
this.curTxt = txt;
this.canEdit = false;
this.$emit("change", this.id, this.type, txt);
this.$emit("change", this.id, this.type, txt,this.isSt);
},
enableEdit() {
this.canEdit = true;
......
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-12-27 21:21:08
* @LastEditTime: 2021-12-28 09:25:48
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\vue.config.js
......@@ -112,12 +112,12 @@ module.exports = {
// target: "http://192.168.128.166:8099/", // 张 认定
// target: "http://192.168.128.114:8099", // 湖南-马
// target: "http://192.168.128.116:8099", // 湖南-王
// target: "http://192.168.128.102:8099", // 湖南-张呈光
target: "http://192.168.128.119:8099", // 湖南-张呈光
// target: "http://172.18.116.73:8099/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/ ma
// target: "http://127.0.0.1:8099",
// target: "http://47.92.225.109:5602",
// target: "http://www.meetfood.cn:2390", // 湖南-线上
target:"http://zwpt.xzclub.top:9333/",
// target:"http://zwpt.xzclub.top:9333/",
// target: "http://192.168.128.103:8099", // 江
ws: true,
changeOrigin: true,
......
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