From 601640eea15c18ea7ac7063bf80744abb1f5af89 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Tue, 26 Jul 2022 10:32:07 +0800 Subject: [PATCH 1/4] =?UTF-8?q?table=EF=BC=8C=E5=B7=B2=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=9B=9E=E6=98=BE=20=20=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AiTable.vue | 2 +- .../AppCooperationPropaganda.vue | 17 ++++++------- .../cooperationDetail.vue | 11 ++++----- .../saas/AppCooperationPropaganda/detail.vue | 2 +- .../AppCooperationPropaganda/selectUser.vue | 24 ++++++++++++------- .../AppPropagandaStatistics.vue | 11 +++++---- 6 files changed, 35 insertions(+), 32 deletions(-) diff --git a/src/components/AiTable.vue b/src/components/AiTable.vue index ce106c86..1674f408 100644 --- a/src/components/AiTable.vue +++ b/src/components/AiTable.vue @@ -6,7 +6,7 @@ - +

{{ $dict.getLabel(col.dict, row[col.prop]) }}

{{ row[col.prop] || "-" }}

diff --git a/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue b/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue index 25e984fc..b9f73daa 100644 --- a/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue +++ b/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue @@ -129,24 +129,21 @@ export default { this.startTime = '', this.endTime = '' this.userIdList = [] - // uni.clearStorageSync('userSelect') //清空会导致状态字典出问题 + this.createUserId = '' + uni.clearStorageSync('userSelect') this.current = 1 this.list = [] - this.getList() + this.$dict.load(['mstStatus']).then(() => { + this.getList() + }) + this.filterShow = false }, selectConfirm() { if(this.userIdList.length) { this.createUserId = this.userIdList?.[0].userId - console.log(this.userIdList,'userIdList'); - console.log(this.createUserId,'createUserId'); } - // let arr = this.userIdList - // console.log(arr[0],222); - // console.log(this.userIdList,111); - - this.start = this.startTime, this.end = this.endTime let startTmp = this.start.split("-"); @@ -172,7 +169,7 @@ export default { }, onShow() { document.title = '群发居民群' - this.getList() + // this.getList() this.$dict.load(['mstStatus']).then(() => { this.getList() }) diff --git a/src/project/saas/AppCooperationPropaganda/cooperationDetail.vue b/src/project/saas/AppCooperationPropaganda/cooperationDetail.vue index c085fb36..8caa9d95 100644 --- a/src/project/saas/AppCooperationPropaganda/cooperationDetail.vue +++ b/src/project/saas/AppCooperationPropaganda/cooperationDetail.vue @@ -65,11 +65,8 @@ :data="tableData" :colConfigs="tabIndex==0? colConfigs0 : colConfigs1" v-if="tableData.length"> - - + + @@ -107,7 +104,7 @@ export default { computed: { colConfigs0() { return [ - { slot: "groupOwnerId",label: "成员" }, + { slot: "groupOwnerId",label: "成员",prop: "groupOwnerId" }, { label: "预计送达居民群", prop: "groupCount" } ]; }, @@ -115,7 +112,7 @@ export default { return [ { label: "居民群",prop: "groupName" }, { label: "群人数", prop: "memberCount"}, - { slot: "groupOwnerId",label: "群主"} + { slot: "groupOwnerId",label: "群主",prop: "groupOwnerId" } ]; }, }, diff --git a/src/project/saas/AppCooperationPropaganda/detail.vue b/src/project/saas/AppCooperationPropaganda/detail.vue index 95b0eea3..0f10b181 100644 --- a/src/project/saas/AppCooperationPropaganda/detail.vue +++ b/src/project/saas/AppCooperationPropaganda/detail.vue @@ -65,7 +65,7 @@
-

小程序地址

+

小程序

{{item.mpTitle}}
diff --git a/src/project/saas/AppCooperationPropaganda/selectUser.vue b/src/project/saas/AppCooperationPropaganda/selectUser.vue index 8d1b8d12..f7effd3a 100644 --- a/src/project/saas/AppCooperationPropaganda/selectUser.vue +++ b/src/project/saas/AppCooperationPropaganda/selectUser.vue @@ -3,7 +3,7 @@
-
+
{{e.userId}}
@@ -41,11 +41,10 @@ export default { onLoad() { this.selected = uni.getStorageSync('userSelect') || [] this.getDeptsAndUsersByParent() - console.log(this.selected); }, methods: { isSelected(id) { - return !!this.selected.find(e => e.id == id) + return this.selected.userId===id }, getDeptsAndUsersByParent() { this.userList = [] @@ -53,7 +52,7 @@ export default { params: {} }).then(res => { if (res?.data) { - let userArr = res.data.records.map(e => ({userId: e.createUserId, isChecked: this.isSelected(e.id)})) + let userArr = res.data.records.map(e => ({userId: e.createUserId, isChecked: this.isSelected(e.createUserId)})) // 数组去重 this.userList = [] userArr.forEach(item=> { @@ -61,20 +60,27 @@ export default { this.userList.push(item) } }) + } }) }, itemCheck(row) { this.userList.forEach(e => e.isChecked = false) - row.isChecked = !row.isChecked - this.selected[0] = this.userList.filter(e => e.isChecked == true) - this.$forceUpdate() + + const index= this.userList.findIndex(o => { + + return row.userId===o.userId + }) + this.userList[index].isChecked=true + this.selected = this.userList[index] + console.log( this.selected) + // this.$forceUpdate() }, submit() { - if(!this.selected.length) { + if(!this.selected.userId) { return this.$u.toast('请选择创建人') } - uni.$emit("pagePicker:custom", this.selected) + uni.$emit("pagePicker:custom",[ this.selected]) uni.setStorageSync('userSelect', this.selected) uni.navigateBack() }, diff --git a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue index 631b77dd..577f8915 100644 --- a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue +++ b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue @@ -218,7 +218,7 @@ export default { nowDate: "", calendarList: [], colData: {}, - detailType: '0', + detailType: 0, timeType: "", departId: "", startTime: "", @@ -278,6 +278,8 @@ export default { this.end = ""; this.departId = ""; this.departmentId = ""; + this.getBrokenDate() + this.filterShow = false; }, selectConfirm() { @@ -286,7 +288,7 @@ export default { this.start = this.startTime; this.end = this.endTime; } else { - this.detailType = this.timeSelect; + this.detailType = this.timeSelect || 0; } this.departId = this.departmentId this.getBrokenDate(); @@ -563,7 +565,7 @@ export default { .then((res) => { if(res?.data) { let items = [], xData = [], yData = [] - res.data.map((item) => { + res.data.forEach((item) => { const i = {type: 'departmentName', id: item.deptId, corpid: this.user.corpId} items.push(i) yData.push(item.taskCount) @@ -572,9 +574,10 @@ export default { this.initOpenData({canvas:true}) this.transCanvas(items).then((data) => { - console.log(data.items,"data.items"); + // console.log(data.items,"data.items"); data.items.map((a) => { xData.push(a.data) + console.log( xData) }) console.log(xData, yData, '111222'); this.getColumnarEcharts(xData, yData) From 048aa08ab14ea92adb4283737ac93bf4f207f1d6 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Tue, 26 Jul 2022 11:05:58 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=8E=BB=E6=8E=89console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppCooperationPropaganda.vue | 1 - .../AppCooperationPropaganda/cooperationDetail.vue | 5 +++-- .../saas/AppCooperationPropaganda/selectUser.vue | 14 ++++---------- .../AppPropagandaStatistics.vue | 2 +- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue b/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue index b9f73daa..eb41961b 100644 --- a/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue +++ b/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue @@ -169,7 +169,6 @@ export default { }, onShow() { document.title = '群发居民群' - // this.getList() this.$dict.load(['mstStatus']).then(() => { this.getList() }) diff --git a/src/project/saas/AppCooperationPropaganda/cooperationDetail.vue b/src/project/saas/AppCooperationPropaganda/cooperationDetail.vue index 8caa9d95..75f75bcb 100644 --- a/src/project/saas/AppCooperationPropaganda/cooperationDetail.vue +++ b/src/project/saas/AppCooperationPropaganda/cooperationDetail.vue @@ -66,6 +66,7 @@ :colConfigs="tabIndex==0? colConfigs0 : colConfigs1" v-if="tableData.length"> + @@ -104,7 +105,7 @@ export default { computed: { colConfigs0() { return [ - { slot: "groupOwnerId",label: "成员",prop: "groupOwnerId" }, + { slot: "groupOwnerId",label: "成员" }, { label: "预计送达居民群", prop: "groupCount" } ]; }, @@ -112,7 +113,7 @@ export default { return [ { label: "居民群",prop: "groupName" }, { label: "群人数", prop: "memberCount"}, - { slot: "groupOwnerId",label: "群主",prop: "groupOwnerId" } + { slot: "groupOwnerId",label: "群主" } ]; }, }, diff --git a/src/project/saas/AppCooperationPropaganda/selectUser.vue b/src/project/saas/AppCooperationPropaganda/selectUser.vue index f7effd3a..775699ab 100644 --- a/src/project/saas/AppCooperationPropaganda/selectUser.vue +++ b/src/project/saas/AppCooperationPropaganda/selectUser.vue @@ -4,7 +4,7 @@
- {{e.userId}} +
@@ -53,34 +53,28 @@ export default { }).then(res => { if (res?.data) { let userArr = res.data.records.map(e => ({userId: e.createUserId, isChecked: this.isSelected(e.createUserId)})) - // 数组去重 this.userList = [] userArr.forEach(item=> { if(!this.userList.find(o=> o.userId === item.userId)) { this.userList.push(item) } }) - } }) }, itemCheck(row) { this.userList.forEach(e => e.isChecked = false) - - const index= this.userList.findIndex(o => { - + const index = this.userList.findIndex(o => { return row.userId===o.userId }) - this.userList[index].isChecked=true + this.userList[index].isChecked = true this.selected = this.userList[index] - console.log( this.selected) - // this.$forceUpdate() }, submit() { if(!this.selected.userId) { return this.$u.toast('请选择创建人') } - uni.$emit("pagePicker:custom",[ this.selected]) + uni.$emit("pagePicker:custom", [this.selected]) uni.setStorageSync('userSelect', this.selected) uni.navigateBack() }, diff --git a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue index 577f8915..5ef5f87d 100644 --- a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue +++ b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue @@ -579,7 +579,7 @@ export default { xData.push(a.data) console.log( xData) }) - console.log(xData, yData, '111222'); + // console.log(xData, yData, '111222'); this.getColumnarEcharts(xData, yData) }) } From dc9f38a5a574e723930692d7c805ee2d7b748780 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Tue, 26 Jul 2022 12:02:32 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=BC=82=E6=AD=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppPropagandaStatistics.vue | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue index 5ef5f87d..1d2a2e1b 100644 --- a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue +++ b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue @@ -255,7 +255,7 @@ export default { ...mapState(['user']) }, methods: { - ...mapActions(['initOpenData', 'transCanvas']), + ...mapActions(['initOpenData', 'transCanvas','selectEnterpriseContact']), checkTime(index) { if (index == 3) { this.timeSelect = index; @@ -563,25 +563,31 @@ export default { }, }) .then((res) => { - if(res?.data) { - let items = [], xData = [], yData = [] - res.data.forEach((item) => { - const i = {type: 'departmentName', id: item.deptId, corpid: this.user.corpId} - items.push(i) - yData.push(item.taskCount) - }) - - this.initOpenData({canvas:true}) - - this.transCanvas(items).then((data) => { - // console.log(data.items,"data.items"); - data.items.map((a) => { - xData.push(a.data) - console.log( xData) + if (res.code ===0) { + if(res.data && res.data.length) { + let items = [], xData = [], yData = [] + res.data.forEach((item) => { + const i = {type: 'departmentName', id: item.deptId, corpid: this.user.corpId} + items.push(i) + yData.push(item.taskCount) }) - // console.log(xData, yData, '111222'); - this.getColumnarEcharts(xData, yData) - }) + console.log('111'); + + this.initOpenData({canvas:true}) + console.log('222'); + setTimeout(() => { + this.transCanvas(items).then((data) => { + console.log("333"); + data.items.map((a) => { + xData.push(a.data) + console.log( xData) + }) + console.log('4444'); + this.getColumnarEcharts(xData, yData) + }) + },600) + + } } }); }, @@ -630,9 +636,7 @@ export default { ], }); }, - // 选择部门 - ...mapActions(['selectEnterpriseContact']), getDept() { this.selectEnterpriseContact({ fromDepartmentId: 0, From 75403a1057c1621e2c7a3532caf6188c5aaa22ee Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Tue, 26 Jul 2022 13:48:13 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E7=AD=89=E4=BA=8E=E7=BB=93=E6=9D=9F=E6=97=A5?= =?UTF-8?q?=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppCooperationPropaganda.vue | 4 ++-- .../AppPropagandaStatistics.vue | 11 +++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue b/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue index eb41961b..0ac1ea0c 100644 --- a/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue +++ b/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue @@ -150,8 +150,8 @@ export default { let endTmp = this.end.split("-"); let stT = new Date(startTmp[0], startTmp[1], startTmp[2]); let edT = new Date(endTmp[0], endTmp[1], endTmp[2]); - if (stT.getTime() >= edT.getTime()) { - this.$u.toast("开始日期不能大于或等于结束日期!"); + if (stT.getTime() > edT.getTime()) { + this.$u.toast("开始日期不能大于结束日期!"); this.filterShow = true return } diff --git a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue index 1d2a2e1b..7b52b692 100644 --- a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue +++ b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue @@ -310,8 +310,8 @@ export default { let endTmp = this.end.split("-"); let stT = new Date(startTmp[0], startTmp[1], startTmp[2]); let edT = new Date(endTmp[0], endTmp[1], endTmp[2]); - if (stT.getTime() >= edT.getTime()) { - this.$u.toast("开始日期不能大于或等于结束日期!"); + if (stT.getTime() > edT.getTime()) { + this.$u.toast("开始日期不能大于结束日期!"); this.customShow = true return } @@ -571,18 +571,13 @@ export default { items.push(i) yData.push(item.taskCount) }) - console.log('111'); - + this.initOpenData({canvas:true}) - console.log('222'); setTimeout(() => { this.transCanvas(items).then((data) => { - console.log("333"); data.items.map((a) => { xData.push(a.data) - console.log( xData) }) - console.log('4444'); this.getColumnarEcharts(xData, yData) }) },600)