-
+
+

+
@@ -209,6 +211,7 @@ export default {
await this.getAgencylist()//获取组织级别
await nextTick(500)
await this.loadOrgData()
+
await this.getApiData();
},
@@ -238,6 +241,15 @@ export default {
if (month2 < 10) {
month2 = '0' + month2;
}
+ if (month < 10) {
+ month = '0' + month;
+ }
+ if (day < 10) {
+ day = '0' + day;
+ }
+ if (day2 < 10) {
+ day2 = '0' + day2;
+ }
var t2 = year2 + '-' + month2 + '-' + day2;
var t1 = year + '-' + month + '-' + day;
// let t3 = formate(t2, style);
@@ -251,9 +263,19 @@ export default {
},
async getApiData () {
-
- await this.getLine()
+ await this.getLineChart()
await this.loadMapData();
+
+ this.assignData()
+ },
+
+ assignData () {
+ if (!this.showNoData) {
+ this.getLine()
+ }
+
+ this.loadMap()
+ this.isfirstInit = false
},
// 获取当前登录人员信息及组织信息
@@ -352,17 +374,17 @@ export default {
if (code === 0) {
this.legendArray = []
- if (data.under) {
+ if (data.under === 0 || data.under) {
this.under = data.under
this.legendArray.push(
{
color: this.colorArray[0],
- name: data.under + '以下'
+ name: data.under + '及以下'
}
)
}
- if (data.above) {
+ if (data.above === 0 || data.above) {
this.above = data.above
this.legendArray.push(
{
@@ -373,7 +395,7 @@ export default {
this.legendArray.push(
{
color: this.colorArray[2],
- name: data.above + '以上'
+ name: data.above + '及以上'
}
)
}
@@ -394,12 +416,12 @@ export default {
item.latitude = agencyItem.latitude
item.coordinates = agencyItem.coordinates
- if (this.under) {
+ if (this.under === 0 || this.under) {
if (item.count < this.under || item.count === this.under) {
item.color = this.colorArray[0]
item.fillColor = this.colorFillArray[0]
} else {
- if (this.above) {
+ if (this.above === 0 || this.above) {
if (item.count > this.under && item.count < this.above) {
item.color = this.colorArray[1]
item.fillColor = this.colorFillArray[1]
@@ -410,7 +432,6 @@ export default {
}
}
-
}
break
}
@@ -420,8 +441,7 @@ export default {
});
console.log(this.mapList)
- this.loadMap()
- this.isfirstInit = false
+
} else {
this.$message.error(msg);
@@ -446,7 +466,7 @@ export default {
},
getLine () {
if (this.lineInitState) {
- this.getLineChart()
+ this.assignLineChart()
} else {
setTimeout(() => {
this.getLine()
@@ -455,9 +475,13 @@ export default {
},
// 获取折线图
async getLineChart () {
- this.$refs.lineChart.clear()
+ if (!this.showNoData) {
+ this.$refs.lineChart.clear()
+ this.$refs.lineChart.showLoading()
+ }
+
const _that = this
- this.$refs.lineChart.showLoading()
+
const url = "/gov/project/project/projectdistributionanalysisleft";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/projectdistributionanalysisleft";
let params = {
@@ -467,28 +491,20 @@ export default {
};
const { data, code, msg } = await requestPost(url, params);
- this.$refs.lineChart.hideLoading()
+ if (!this.showNoData) {
+ this.$refs.lineChart.hideLoading()
+ }
if (code === 0) {
- // 获取pieChart配置
- this.lineOption = lineOption()
if (data && data.length > 0) {
this.lineList = data
- this.loadCategoryData()
-
-
-
- this.$refs.lineChart.setOption(this.lineOption, true)
- this.$refs.lineChart.setOption({
- xAxis: { data: this.xaxis },
- legend: { data: this.legend },
- series: this.series
- }, true)
+ this.showNoData = false
} else {
this.lineList = []
+ this.showNoData = true
}
-
+ this.loadCategoryData()
} else {
this.$message.error(msg);
@@ -496,60 +512,75 @@ export default {
},
+ assignLineChart () {
+ // 获取pieChart配置
+ this.lineOption = lineOption()
+
+ this.$refs.lineChart.setOption(this.lineOption, true)
+ this.$refs.lineChart.setOption({
+ xAxis: { data: this.xaxis },
+ legend: { data: this.legend },
+ series: this.series
+ }, true)
+ },
+
//解析折线图数据
loadCategoryData () {
this.xaxis = []
this.series = []
this.legend = []
- let num = this.lineList[0].categoryList.length
-
- let dataArray = new Array(num)
- //遍历每个分类
- this.lineList[0].categoryList.forEach((categoryItem, index) => {
- this.legend.push(categoryItem.categoryName)
- dataArray[index] = []
-
- });
+ if (this.lineList.length > 0) {
- //遍历每个时间
- this.lineList.forEach(item => {
- this.xaxis.push(item.time)
+ let num = this.lineList[0].categoryList.length
+ let dataArray = new Array(num)
//遍历每个分类
- item.categoryList.forEach((categoryItem, index) => {
- dataArray[index].push(categoryItem.count)
+ this.lineList[0].categoryList.forEach((categoryItem, index) => {
+ this.legend.push(categoryItem.categoryName)
+ dataArray[index] = []
+
});
- });
-
- //遍历第一组的分类
- this.lineList[0].categoryList.forEach((categoryItem, index) => {
-
- let object = {
- name: categoryItem.categoryName,
- type: 'line',
- smooth: true,
- barWidth: 15,
- areaStyle: {},
- itemStyle: {
- color: new echarts.graphic.LinearGradient(
- 0, 1, 0, 0,
- [
- { offset: 0, color: 'rgba(121, 55, 255, 0)' },
- { offset: 1, color: categoryItem.color }
- ]
- )
- },
- data: dataArray[index]
- }
- this.series.push(object)
+ //遍历每个时间
+ this.lineList.forEach(item => {
+ this.xaxis.push(item.time)
+ //遍历每个分类
+ item.categoryList.forEach((categoryItem, index) => {
+ dataArray[index].push(categoryItem.count)
+ });
- });
+ });
+
+ //遍历第一组的分类
+ this.lineList[0].categoryList.forEach((categoryItem, index) => {
+
+ let object = {
+ name: categoryItem.categoryName,
+ type: 'line',
+ smooth: true,
+ barWidth: 15,
+ areaStyle: {},
+ itemStyle: {
+ color: new echarts.graphic.LinearGradient(
+ 0, 1, 0, 0,
+ [
+ { offset: 0, color: 'rgba(121, 55, 255, 0)' },
+ { offset: 1, color: categoryItem.color }
+ ]
+ )
+ },
+ data: dataArray[index]
+ }
+ this.series.push(object)
+
+
+ });
+ }
},
handleChangeAgency (value) {
From 5787640869df6ab4c9d8f6690f63afee486258b7 Mon Sep 17 00:00:00 2001
From: jiangyy
Date: Thu, 6 Jan 2022 13:29:54 +0800
Subject: [PATCH 4/7] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=9B=BE=E7=89=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../communityParty/regionalParty/activitys.vue | 14 +++++++++++++-
.../communityParty/regionalParty/activitysForm.vue | 13 ++++++++++++-
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/views/modules/communityParty/regionalParty/activitys.vue b/src/views/modules/communityParty/regionalParty/activitys.vue
index 1638a07c3..18f9d3158 100644
--- a/src/views/modules/communityParty/regionalParty/activitys.vue
+++ b/src/views/modules/communityParty/regionalParty/activitys.vue
@@ -148,6 +148,16 @@
label="活动时间"
width="230">
+
+
+ 小程序
+ 管理平台
+
+
查看
- 修改
@@ -199,6 +210,7 @@
@dialogCancle="addFormCancle"
@dialogOk="addFormOk">
+
Date: Fri, 7 Jan 2022 17:02:20 +0800
Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=9A=E7=BE=A4bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/communityService/dqfwzx/index.vue | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/views/modules/communityService/dqfwzx/index.vue b/src/views/modules/communityService/dqfwzx/index.vue
index b26a50a3d..0544cbf95 100644
--- a/src/views/modules/communityService/dqfwzx/index.vue
+++ b/src/views/modules/communityService/dqfwzx/index.vue
@@ -191,9 +191,7 @@ export default {
},
async mounted() {
await this.loadAgency();
- await this.getTableData();
- this.initMap();
- this.setMap();
+ // await this.getTableData();
},
methods: {
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义
@@ -324,6 +322,7 @@ export default {
},
async getTableData() {
+ const oldLen = this.tableData.length;
const url = "/gov/org/icpartyservicecenter/partyservicecenterlist";
const { data, code, msg } = await requestPost(url, {
orgId: this.agencyId,
@@ -333,7 +332,12 @@ export default {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.tableData = data;
- } else {
+
+ if (data.length > 0 && oldLen == 0) {
+ await nextTick(100);
+ this.initMap();
+ this.setMap();
+ }
}
},
From 580da4ef412a22ec85ae539945bf91d91ea4caca Mon Sep 17 00:00:00 2001
From: dai <851733175@qq.com>
Date: Tue, 11 Jan 2022 11:14:41 +0800
Subject: [PATCH 6/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=AF=E7=B4=AF?=
=?UTF-8?q?=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/js/dai/request.js | 67 ++++++++++---------
.../communityService/dqfwzx/cpts/edit.vue | 19 +++++-
.../communityService/dqfwzx/cpts/order.vue | 10 +++
.../modules/communityService/dqfwzx/index.vue | 29 +++++++-
.../communityService/shzz/cpts/edit.vue | 4 +-
.../modules/communityService/shzz/index.vue | 25 +++----
.../communityService/sqzzz/cpts/edit.vue | 7 ++
.../modules/communityService/sqzzz/index.vue | 25 +++----
8 files changed, 115 insertions(+), 71 deletions(-)
diff --git a/src/js/dai/request.js b/src/js/dai/request.js
index 5701ea49a..80d8118e2 100644
--- a/src/js/dai/request.js
+++ b/src/js/dai/request.js
@@ -1,87 +1,90 @@
/*---------------------------------------------------------------
| 请求接口封装 |
---------------------------------------------------------------*/
-import axios from 'axios'
-import log from 'dai-js/modules/log'
-import curry from 'dai-js/tools/curry'
+import axios from "axios";
+import message from "dai-js/modules/message/message";
+import curry from "dai-js/tools/curry";
const request = curry(
(method, url, data = {}, headers = {}, progress = () => {}) => {
return new Promise((reslove) => {
let returnIniData = {
- httpCode: '',
+ httpCode: "",
data: {},
- msg: '',
- code: ''
- }
+ msg: "",
+ code: "",
+ };
// 添加服务器端URL
function processUrl(url) {
- if (url.indexOf('http://') > -1 || url.indexOf('https://') > -1) {
- return url
+ if (url.indexOf("http://") > -1 || url.indexOf("https://") > -1) {
+ return url;
}
- return process.env.VUE_APP_API_SERVER + url
+ return process.env.VUE_APP_API_SERVER + url;
}
- url = processUrl(url)
+ url = processUrl(url);
const succFn = (res) => {
// log(`[request成功] ${url}`, data, res);
let retData = {
...returnIniData,
...res.data,
- httpCode: res.statusCode
- }
+ httpCode: res.statusCode,
+ };
// if(typeof Vue.$afterRequestHook == 'function'){
// retData = Vue.$afterRequestHook(retData);
// }
+ if (res.data.code > 8000 && res.data.code < 10000) {
+ message.error(res.data.msg);
+ }
- reslove(retData)
- }
+ reslove(retData);
+ };
const failFn = (err) => {
// log(`[request失败] ${url}`, data, err);
reslove(
Object.assign({}, returnIniData, {
- httpCode: '9999', //访问出现意外
- msg: '网络错误'
+ httpCode: "9999", //访问出现意外
+ msg: "网络错误",
})
- )
- }
+ );
+ };
- if (method.toUpperCase() == 'POST') {
+ if (method.toUpperCase() == "POST") {
axios
.post(url, data, {
headers,
- responseType: 'json'
+ responseType: "json",
// progress,
// credentials: false,
})
.then(succFn)
- .catch(failFn)
+ .catch(failFn);
} else {
axios
.get(url, {
params: data,
headers,
- responseType: 'json'
+ responseType: "json",
// credentials: true,
})
.then(succFn)
- .catch(failFn)
+ .catch(failFn);
}
- })
+ });
}
-)
+);
-export const requestGet = request('get')
+export const requestGet = request("get");
-export const requestPost = request('post')
+export const requestPost = request("post");
export default {
install(Vue) {
- Vue.prototype.$requestGet = requestGet
- Vue.prototype.$requestPost = requestPost
- }
-}
+ Vue.prototype.$requestGet = requestGet;
+ Vue.prototype.$requestPost = requestPost;
+ },
+};
diff --git a/src/views/modules/communityService/dqfwzx/cpts/edit.vue b/src/views/modules/communityService/dqfwzx/cpts/edit.vue
index 90ebcff99..4aeab7ba8 100644
--- a/src/views/modules/communityService/dqfwzx/cpts/edit.vue
+++ b/src/views/modules/communityService/dqfwzx/cpts/edit.vue
@@ -408,18 +408,31 @@ export default {
},
];
},
- handleDelStaff(index) {
+ async handleDelStaff(index) {
const { matterList } = this.dataForm;
- let delItem = matterList.splice(index, 1);
+ let list = [...matterList];
+ let delItem = list.splice(index, 1);
console.log(delItem);
if (delItem[0].matterId) {
+ if (!confirm("删除后无法恢复,确认删除?"))
+ return console.log("不删了");
+ if (!(await this.delStaff(delItem[0].matterId))) return;
this.dataForm.delMatterList = [
...this.dataForm.delMatterList,
delItem[0].matterId,
];
}
- this.dataForm.matterList = matterList;
+ this.dataForm.matterList = list;
+ },
+ async delStaff(matterId) {
+ const { data, code, msg } = await requestPost(
+ "/gov/org/icpartyservicecenter/delmatter",
+ {
+ matterId,
+ }
+ );
+ return code === 0;
},
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义
initMap() {
diff --git a/src/views/modules/communityService/dqfwzx/cpts/order.vue b/src/views/modules/communityService/dqfwzx/cpts/order.vue
index 501266fdf..49ad2ce8c 100644
--- a/src/views/modules/communityService/dqfwzx/cpts/order.vue
+++ b/src/views/modules/communityService/dqfwzx/cpts/order.vue
@@ -139,6 +139,7 @@ import { mapGetters } from "vuex";
import { Loading } from "element-ui"; // 引入Loading服务
import { requestPost } from "@/js/dai/request";
import dateFormat from "dai-js/tools/dateFormat";
+import formVltHelper from "dai-js/tools/formVltHelper";
const deepClone = function (arg) {
if (typeof arg == "object" || typeof arg == "array") {
@@ -295,6 +296,9 @@ export default {
}
console.log(list);
this.timeList = list;
+ this.dataForm.timeId = list
+ .filter((item) => item.selected && item.isAppointment)
+ .map((item) => item.timeId);
return false;
},
@@ -350,6 +354,12 @@ export default {
app.util.validateRule(messageObj);
this.btnDisable = false;
} else {
+ if (!formVltHelper.userOrMobile(this.dataForm.appointmentPhone)) {
+ return this.$message({
+ type: "error",
+ message: "手机号格式有误",
+ });
+ }
this.submit();
}
});
diff --git a/src/views/modules/communityService/dqfwzx/index.vue b/src/views/modules/communityService/dqfwzx/index.vue
index 0544cbf95..c081cfe6c 100644
--- a/src/views/modules/communityService/dqfwzx/index.vue
+++ b/src/views/modules/communityService/dqfwzx/index.vue
@@ -17,6 +17,13 @@
:key="'ct' + index"
v-for="(item, index) in tableData"
>
+
+ 修改
+
{{ item.centerName }}
社区地址:
@@ -38,11 +45,11 @@
-
+
@@ -191,7 +198,7 @@ export default {
},
async mounted() {
await this.loadAgency();
- // await this.getTableData();
+ await this.getTableData();
},
methods: {
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义
@@ -371,6 +378,7 @@ export default {
width: 25%;
.list {
.item {
+ position: relative;
box-sizing: border-box;
margin-bottom: 10px;
border: 2px solid #6aa;
@@ -383,6 +391,21 @@ export default {
background-color: #ffffff;
box-shadow: 0 0 10px #6aa;
}
+ .item-btn {
+ position: absolute;
+ top: 5px;
+ right: 5px;
+ font-size: 14px;
+ color: rgb(235, 192, 4);
+ width: 50px;
+ line-height: 30px;
+ text-align: center;
+ cursor: pointer;
+ &:hover {
+ // text-decoration: underline;
+ color: rgb(250, 208, 23);
+ }
+ }
.item-name {
font-size: 16px;
font-weight: bold;
diff --git a/src/views/modules/communityService/shzz/cpts/edit.vue b/src/views/modules/communityService/shzz/cpts/edit.vue
index d3c206094..ff4c47eaa 100644
--- a/src/views/modules/communityService/shzz/cpts/edit.vue
+++ b/src/views/modules/communityService/shzz/cpts/edit.vue
@@ -345,7 +345,9 @@ export default {
if (row) {
this.dataForm = { ...this.dataForm, ...row };
this.societyId = this.dataForm.societyId;
- map.setCenter(new TMap.LatLng(row.latitude, row.longitude));
+ if (row.latitude && row.longitude) {
+ map.setCenter(new TMap.LatLng(row.latitude, row.longitude));
+ }
}
},
diff --git a/src/views/modules/communityService/shzz/index.vue b/src/views/modules/communityService/shzz/index.vue
index 508838f9d..36adc798c 100644
--- a/src/views/modules/communityService/shzz/index.vue
+++ b/src/views/modules/communityService/shzz/index.vue
@@ -284,31 +284,24 @@ export default {
url: window.SITE_CONFIG["apiURL"] + "/heart/societyorg/import",
method: "post",
data: formData,
- responseType: "blob",
+ // responseType: "blob",
})
.then((res) => {
this.importLoading = false;
this.importBtnTitle = "excel导入";
- let fileName = window.decodeURI(
- res.headers["content-disposition"].split(";")[1].split("=")[1]
- );
- console.log("filename", fileName);
- let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
- var url = window.URL.createObjectURL(blob);
- var aLink = document.createElement("a");
- aLink.style.display = "none";
- aLink.href = url;
- aLink.setAttribute("download", fileName);
- document.body.appendChild(aLink);
- aLink.click();
- document.body.removeChild(aLink); //下载完成移除元素
- window.URL.revokeObjectURL(url); //释放掉blob对象
+ console.log("resresresresresresres", res);
+
this.getTableData();
+ if (res.data.code == 0) {
+ return this.$message.success(res.data.data || '导入成功');
+ } else {
+ return this.$message.error(res.data.msg);
+ }
})
.catch((err) => {
console.log("失败", err);
- param.onError(); //上传失败的文件会从文件列表中删除
});
+ this.$refs.upload.clearFiles();
},
handleSizeChange(val) {
diff --git a/src/views/modules/communityService/sqzzz/cpts/edit.vue b/src/views/modules/communityService/sqzzz/cpts/edit.vue
index d95377722..21da37de2 100644
--- a/src/views/modules/communityService/sqzzz/cpts/edit.vue
+++ b/src/views/modules/communityService/sqzzz/cpts/edit.vue
@@ -209,6 +209,7 @@
import { mapGetters } from "vuex";
import { Loading } from "element-ui"; // 引入Loading服务
import { requestPost } from "@/js/dai/request";
+import formVltHelper from "dai-js/tools/formVltHelper";
var map;
var search;
@@ -389,6 +390,12 @@ export default {
app.util.validateRule(messageObj);
this.btnDisable = false;
} else {
+ if (!formVltHelper.userOrMobile(this.dataForm.principalPhone)) {
+ return this.$message({
+ type: "error",
+ message: "手机号格式有误",
+ });
+ }
this.submit();
}
});
diff --git a/src/views/modules/communityService/sqzzz/index.vue b/src/views/modules/communityService/sqzzz/index.vue
index a2c1a7d7b..d22fbafa4 100644
--- a/src/views/modules/communityService/sqzzz/index.vue
+++ b/src/views/modules/communityService/sqzzz/index.vue
@@ -252,31 +252,24 @@ export default {
"/heart/iccommunityselforganization/importcommunityselforganization",
method: "post",
data: formData,
- responseType: "blob",
+ // responseType: "blob",
})
.then((res) => {
this.importLoading = false;
this.importBtnTitle = "excel导入";
- let fileName = window.decodeURI(
- res.headers["content-disposition"].split(";")[1].split("=")[1]
- );
- console.log("filename", fileName);
- let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
- var url = window.URL.createObjectURL(blob);
- var aLink = document.createElement("a");
- aLink.style.display = "none";
- aLink.href = url;
- aLink.setAttribute("download", fileName);
- document.body.appendChild(aLink);
- aLink.click();
- document.body.removeChild(aLink); //下载完成移除元素
- window.URL.revokeObjectURL(url); //释放掉blob对象
+ console.log("resresresresresresres", res);
+
this.getTableData();
+ if (res.data.code == 0) {
+ return this.$message.success(res.data.data || '导入成功');
+ } else {
+ return this.$message.error(res.data.msg);
+ }
})
.catch((err) => {
console.log("失败", err);
- param.onError(); //上传失败的文件会从文件列表中删除
});
+ this.$refs.upload.clearFiles();
},
handleSizeChange(val) {
From 621cdb54a935e05381622fc69e3fcac41365bbcd Mon Sep 17 00:00:00 2001
From: dai <851733175@qq.com>
Date: Wed, 12 Jan 2022 09:35:13 +0800
Subject: [PATCH 7/7] youma
---
.../visual/warning/components/screen-table/index.vue | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/views/modules/visual/warning/components/screen-table/index.vue b/src/views/modules/visual/warning/components/screen-table/index.vue
index 41c80f97f..a4171708d 100644
--- a/src/views/modules/visual/warning/components/screen-table/index.vue
+++ b/src/views/modules/visual/warning/components/screen-table/index.vue
@@ -23,7 +23,7 @@
:key="indexs"
:style="tableContentStyle[indexs]"
>
- {{ item }}
+
{{ item }}
更多>
-
+
{{ item }}
@@ -180,6 +184,10 @@ export default {
created() {},
methods: {
+ toUserInfo(uid) {
+ // this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` });
+ },
+
onClickMorePop(index) {
this.visiblePopList.forEach((item, indexs) => {
if (index == indexs) {