From d30f91bc1b90dee2d829ae5523de90c95a091fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8D=9A=E5=86=89?= Date: Tue, 1 Nov 2022 10:59:14 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BC=81=E5=BE=AE?= =?UTF-8?q?=E6=8A=95=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/img/business_wechat.png | Bin 0 -> 1292 bytes src/router/index.js | 6 + .../components/enterpriseBasicInformation.vue | 472 ++++++++++++++++++ .../enterpriseQuantityLimitTable.vue | 95 ++++ .../launch-center/launch-task/create.vue | 1 + .../launch-task/enterpriseWeChat.vue | 394 +++++++++++++++ .../launch-center/launch-task/index.vue | 133 ++++- 7 files changed, 1093 insertions(+), 8 deletions(-) create mode 100644 src/assets/img/business_wechat.png create mode 100644 src/views/Publish/launch-center/components/enterpriseBasicInformation.vue create mode 100644 src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue create mode 100644 src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue diff --git a/src/assets/img/business_wechat.png b/src/assets/img/business_wechat.png new file mode 100644 index 0000000000000000000000000000000000000000..4f2d14b1024eebc935153e265be357db1ddbfb3c GIT binary patch literal 1292 zcmV+n1@roeP)Px(#z{m$R9Hvtmuqa3RT#&A@B8+;b_~|+!etVMMKdnWEi*{a8Fd865Q84cc zqJanrA5_3ZO(X^)5fYF^K_CtWh7Z$lNn~mives5%vnK3()F?> z#t*z{nkGGc&hPx6|MQ%uiV#BZKYEnAKq;~@Fogv4A~FE`NR!Bm77D9xe72hz&O!YHy5%q>&(GPz0{{dO&7YD)d;(0399eQ9uSbcEobfY@blFm=NA@W zR1=j#e2auYQsxauJ6Q0I#<4mRCay@jJ56`|uMeaoEir-9F{z-uZg5Br5xOVCk503Kn3ptD&l=x)5 zNp-yy{jY^+;X?@3fmXa1G}+4(qOl0OFK*}P<;OVnH>{gkNTE$O-6Un-JGe~Um%n?d z-KF7j`q<(cn)LFJDblYmLu>s2lo-*%6&M^#h+8mz?RVgT5sV#b#AZL39%)e!nRq zKEP@SYMpL2xC$Y78ljr-G_1z{3r9EpedV)OuX(u(MMykhHC?96U+-tf_OQEx^ zK_-3HMVD^oiIG88Rt=&s+dzvyMq40CL>JgiDg`!`0=ogL;db*2-#9~b)ifAYfnN3$ zYrT`HeqbnL^DI5BB(B-*X*?|;>7(=QLD~a4Wh1g~-bHagNNwcU8h_%Udk-k`+u)XY zSbo@yP&LAJo3K{YfO320&KT$pli#X_3>rY-*bdC~vr&iYk2Ij`5v&i@q8R0jop{juPk=Hx&|RQZYW)LJEG5N3p14B*0000 import(/* webpackChunkName: "publish" */ '@/views/Publish/launch-center/launch-task/create') }, + { + path: 'enterprise-weChat', + name: 'enterprise-weChat', + meta: { showPreview: false, showPublish: false, keepAlive: true, showShare: true }, + component: () => import(/* webpackChunkName: "publish" */ '@/views/Publish/launch-center/launch-task/enterpriseWeChat') + }, // { // path: "link", // name: "link", diff --git a/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue b/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue new file mode 100644 index 00000000..f46297fd --- /dev/null +++ b/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue @@ -0,0 +1,472 @@ + + + + + diff --git a/src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue b/src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue new file mode 100644 index 00000000..91adda4a --- /dev/null +++ b/src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/src/views/Publish/launch-center/launch-task/create.vue b/src/views/Publish/launch-center/launch-task/create.vue index c23c4d9e..da8a3182 100644 --- a/src/views/Publish/launch-center/launch-task/create.vue +++ b/src/views/Publish/launch-center/launch-task/create.vue @@ -252,6 +252,7 @@ export default { .link-container { padding: 32px 24px; background: #fff; + box-shadow: 0px 0px 6px 0px rgb(0 0 0 / 10%); .title { font-size: 16px; font-weight: bold; diff --git a/src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue b/src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue new file mode 100644 index 00000000..0943b3e6 --- /dev/null +++ b/src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue @@ -0,0 +1,394 @@ + + + + + + \ No newline at end of file diff --git a/src/views/Publish/launch-center/launch-task/index.vue b/src/views/Publish/launch-center/launch-task/index.vue index 79a1765e..69e6e73f 100644 --- a/src/views/Publish/launch-center/launch-task/index.vue +++ b/src/views/Publish/launch-center/launch-task/index.vue @@ -65,6 +65,45 @@
+ +
+
+
+ + 企业微信 +
+
+

适用于内部员工调研

+

可指定多成员、多部门、多标签参与

+
+ + 开始新建 + +
+
+
小程序
+
+

通过消息中心传递至小程序

+

请先联系小程序运营人员支持标签参与

+
+
+ + 开始新建 + +
+
+
@@ -138,16 +177,22 @@ export default { // projectname.value = res.data.project_name; }; + const visible = ref(false) const addLaunchTask = (iscreate = 0, item) => { console.log("create", item); - router.push({ - path: "create", - query: { - ...route.query, - iscreate: iscreate, - id: item?.record?.plan_id, - }, - }); + if(iscreate===1) { + visible.value = true + }else{ + // 小程序投放入口 + router.push({ + path: "create", + query: { + ...route.query, + iscreate: iscreate, + id: item?.record?.plan_id, + }, + }); + } }; const lockLaunchTask = (item) => { addLaunchTask(0, item); @@ -194,6 +239,35 @@ export default { } }; + const isSelected = ref(0) + const onSelected = (isSelect) => { + isSelected.value = isSelect + } + const onNewBuilt = (type) => { + if(type===1) { + // 企业微信投放入口 + router.push({ + path: "enterprise-weChat", + query: { + ...route.query, + iscreate: 1, + }, + }); + }else{ + // 小程序投放入口 + router.push({ + path: "create", + query: { + ...route.query, + iscreate: 1, + }, + }); + } + } + const onCancel = () => { + isSelected.value = 0 + } + onMounted(async () => { await fetchInfo(route.query.sn); if (status.value === 1) { @@ -225,6 +299,11 @@ export default { createQuantityLimitRef, onPageChange, onShowSizeChange, + visible, + isSelected, + onSelected, + onCancel, + onNewBuilt, }; }, }; @@ -389,4 +468,42 @@ export default { height: 36px; border-radius: 6px; } + +.delivery-type { + display: flex; + justify-content: space-between; + .wechat-type { + width: 264px; + height: 256px; + background: #FFFFFF; + border-radius: 6px 6px 6px 6px; + opacity: 1; + border: 1px solid #DFE0E3; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + } + .wechat-type:hover { + cursor: pointer; + } + .present { + margin: 24px 0 31px; + text-align: center; + color: #908B8B; + p { + padding: 0; + margin: 0; + } + } + .program { + margin: 25px 0 32px; + } + img { + margin-right: 9px; + } + .selected { + border: 1px solid #70B936; + } +} From 54edfb3b64fa4214a242ec5c736500ab606e37c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8D=9A=E5=86=89?= Date: Wed, 2 Nov 2022 14:54:31 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BC=81=E5=BE=AE?= =?UTF-8?q?=E6=8A=95=E6=94=BE=EF=BC=8C=E4=BA=BA=E7=BE=A4=E5=8C=85=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 4 +- .env.prod | 3 + .env.sit | 3 + .env.uat | 2 + src/config.js | 1 + .../components/createQuantityLimit.vue | 4 +- .../components/enterpriseBasicInformation.vue | 1 + .../enterpriseQuantityLimitTable.vue | 79 +++++++++++++++---- .../launch-center/components/shareLinks.vue | 1 + 9 files changed, 81 insertions(+), 17 deletions(-) diff --git a/.env.dev b/.env.dev index fe19dd37..815c2638 100644 --- a/.env.dev +++ b/.env.dev @@ -10,4 +10,6 @@ VUE_APP_MESSAGE_CENTER ='http://gtech-gateway.dcin-test.digitalyili.com/apigtech #VUE_APP_SOCKETURL = 'wss://planetg-java.test.automark.cc/survey_sync' VUE_APP_SOCKETURL = 'wss://ylst-api-uat.dctest.digitalyili.com/survey_sync' -VUE_APP_JSONPURL = 'https://iam-uat.dctest.digitalyili.com/idp/restful/getIDPToken' \ No newline at end of file +VUE_APP_JSONPURL = 'https://iam-uat.dctest.digitalyili.com/idp/restful/getIDPToken' + +VUE_APP_YQRURL = 'https://ocp-uat-ain.digitalyili.com' diff --git a/.env.prod b/.env.prod index a96414d7..ff8db3e9 100644 --- a/.env.prod +++ b/.env.prod @@ -10,3 +10,6 @@ VUE_APP_MESSAGE_CENTER ='http://gtech-gateway.cxpin.digitalyili.com/apigtech/mes VUE_APP_LOGIN = 'https://yip.digitalyili.com//login' VUE_APP_SOCKETURL = 'wss://ylst-api.xapi.digitalyili.com/survey_sync' VUE_APP_JSONPURL = 'https://iam.digitalyili.com/idp/restful/getIDPToken' + +VUE_APP_YQRURL = 'https://ocp.digitalyili.com' + diff --git a/.env.sit b/.env.sit index 66cee0a7..ee134abb 100644 --- a/.env.sit +++ b/.env.sit @@ -13,3 +13,6 @@ VUE_APP_LOGIN = 'https://yip-uat.dctest.digitalyili.com/login' VUE_APP_SOCKETURL = 'wss://ylst-api-uat.dctest.digitalyili.com/survey_sync' VUE_APP_JSONPURL = 'https://iam-uat.dctest.digitalyili.com/idp/restful/getIDPToken' + +VUE_APP_YQRURL = 'https://ocp-uat-ain.digitalyili.com' + diff --git a/.env.uat b/.env.uat index 73da6714..81e45e41 100644 --- a/.env.uat +++ b/.env.uat @@ -13,3 +13,5 @@ VUE_APP_LOGIN = 'https://yip-uat.dctest.digitalyili.com/login' VUE_APP_SOCKETURL = 'wss://ylst-api-uat.dctest.digitalyili.com/survey_sync' VUE_APP_JSONPURL = 'https://iam-uat.dctest.digitalyili.com/idp/restful/getIDPToken' + +VUE_APP_YQRURL = 'https://ocp-uat-ain.digitalyili.com' diff --git a/src/config.js b/src/config.js index 9be32366..4a3d3413 100644 --- a/src/config.js +++ b/src/config.js @@ -6,4 +6,5 @@ module.exports = { loginUrl: process.env.VUE_APP_LOGIN, socketUrl: process.env.VUE_APP_SOCKETURL, jsonpUrl: process.env.VUE_APP_JSONPURL, + jqrUrl: process.env.VUE_APP_YQRURL, }; diff --git a/src/views/Publish/launch-center/components/createQuantityLimit.vue b/src/views/Publish/launch-center/components/createQuantityLimit.vue index 7b7e3ed3..5e7ff2b0 100644 --- a/src/views/Publish/launch-center/components/createQuantityLimit.vue +++ b/src/views/Publish/launch-center/components/createQuantityLimit.vue @@ -283,14 +283,14 @@ export default { console.log(dataSource.value); const data = await edit({ - deliveryPlanList: JSON.stringify( + deliveryPlanList: JSON.parse(JSON.stringify( dataSource.value.map((s) => { return { sampleQuota: s.sampleQuota || 0, outerPlanId: s.id, }; }) - ), + )), sn: route.query.sn, deliveryPlanId: id.value, }); diff --git a/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue b/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue index f46297fd..9322d6ee 100644 --- a/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue +++ b/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue @@ -385,6 +385,7 @@ export default { display: flex; } .copy-btn { + margin-left: 20px; display: flex; align-items: center; justify-content: center; diff --git a/src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue b/src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue index 91adda4a..706fbd56 100644 --- a/src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue +++ b/src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue @@ -8,26 +8,32 @@ :wrapper-col="wrapperCol" > - - diff --git a/src/views/Publish/launch-center/components/shareLinks.vue b/src/views/Publish/launch-center/components/shareLinks.vue index 4df490cb..d68ebaec 100644 --- a/src/views/Publish/launch-center/components/shareLinks.vue +++ b/src/views/Publish/launch-center/components/shareLinks.vue @@ -36,6 +36,7 @@ import SubTitle from "@/views/DataAnalyse/components/SubTitle.vue"; import { onMounted } from "@vue/runtime-core"; import { useRoute } from "vue-router"; import { useStore } from "vuex"; +import { message } from "ant-design-vue"; export default { name: "share-links", components: { From a29a47c6a63c6c25c3441f644eb1d60e974c8941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8D=9A=E5=86=89?= Date: Wed, 2 Nov 2022 18:08:45 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BC=81=E5=BE=AE?= =?UTF-8?q?=E6=8A=95=E6=94=BE=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Publish/launch-center/api/php.js | 9 +- .../components/enterpriseBasicInformation.vue | 311 +----------------- .../enterpriseQuantityLimitTable.vue | 174 ++++++---- .../launch-task/enterpriseWeChat.vue | 27 +- 4 files changed, 132 insertions(+), 389 deletions(-) diff --git a/src/views/Publish/launch-center/api/php.js b/src/views/Publish/launch-center/api/php.js index 24f502f6..102a8f34 100644 --- a/src/views/Publish/launch-center/api/php.js +++ b/src/views/Publish/launch-center/api/php.js @@ -69,6 +69,13 @@ export function applications (params) { }) } - +/* 企微投放-人群包列表 */ +export function getActLists (params) { + return request({ + url: `/console/release_task/actLists`, + method: 'GET', + data: params + }) +} diff --git a/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue b/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue index 9322d6ee..bc1ffdd2 100644 --- a/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue +++ b/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue @@ -1,7 +1,6 @@ diff --git a/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue b/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue index 708c3c8b..1e41fefb 100644 --- a/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue +++ b/src/views/Publish/launch-center/components/enterpriseBasicInformation.vue @@ -28,13 +28,13 @@ (不开启样本数量限制)
  样本数量达到  - +   时,停止收集数据
- +
复制 @@ -47,16 +47,13 @@ diff --git a/src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue b/src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue index 451947ea..cafcac52 100644 --- a/src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue +++ b/src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue @@ -1,16 +1,9 @@ @@ -31,27 +19,22 @@ import quantityLimitTable from "../components/enterpriseQuantityLimitTable.vue"; import { useRoute, useRouter } from "vue-router"; import { onMounted, ref, watch } from "@vue/runtime-core"; - import addChannelApplication from "../components/createChannelApplication.vue"; import { add, channels } from "../api/php"; import { getQrcode } from "@/api/publish"; - import { getAnswerSetting } from "@/views/planetDesign/api/api"; import { message, Modal } from "ant-design-vue"; export default { components: { basicInformation, quantityLimitTable, - // addChannelApplication, }, setup() { const route = useRoute(); const isCreate = ref(false); - const addChannelApplicationRef = ref(); - const basicInformationRef = ref(); + const basicInformationRef = ref(null); const datasource = ref([]); const loading = ref(false); - const publish_number = ref(0); - const quantityLimitTableRef = ref(); + const quantityLimitTableRef = ref(null); const id = ref(); const router = useRouter(); isCreate.value = route.query.iscreate === "1" ? true : false; @@ -62,67 +45,28 @@ isCreate.value = value === "1" ? true : false; } ); - watch( - () => route.query.id, - (value) => { - id.value = value; - getList(); - } - ); - id.value = route.query.id; - - - const onSelectRows = (value) => { - datasource.value = JSON.parse(JSON.stringify(value)); - console.log("onSelectRows", value); - }; - const deleteRecord = (recode) => { - datasource.value = JSON.parse(JSON.stringify(datasource.value.filter((s) => s !== recode))); - }; - + const save = async () => { // 基础信息 - const params = await basicInformationRef.value.onSubmit(); - console.log('basicInformationRef',basicInformationRef.value.formState); - if (basicInformationRef.value.formState.checked&&!basicInformationRef.value.formState.number) { + // let params = { + // deliveryName:'', + // } + let basicData = await basicInformationRef.value.onSubmit(); + let quantityData = await quantityLimitTableRef.value.onSubmit(); + // if(!basicData.checked) { + // params.sampleQuota = 0 + // }else{ + // params.sampleQuota = basicData.sampleQuota + // } + // console.log('basicInformationRef',basicInformationRef.value.formState); + if (quantityData.checked&&!quantityData.sampleQuota) { message.warning('请输入限制的样本数量') } // 消息中心提交 - if (quantityLimitTableRef.value) { - quantityLimitTableRef.value.onSubmit(); - } - - console.log("save", datasource.value); - - if (datasource.value.length > 0) { - let sampleQuotaValue = 0; - sampleQuotaValue = datasource.value - .map((s) => s.sampleQuota) - .reduce((s, v) => { - let sampleQuota = 0; - if (s) { - sampleQuota += s || 0; - } - if (v) { - sampleQuota += v; - } - return sampleQuota; - }); - - if (sampleQuotaValue > publish_number.value && publish_number.value > 0) { - Modal.error({ - content: "样本数量限制累计不能大于" + publish_number.value, - title: "提示", - }); - return; - } - } else { - Modal.error({ - content: "未添加渠道应用", - title: "提示", - }); - return; - } + // if (quantityLimitTableRef.value) { + // quantityLimitTableRef.value.onSubmit(); + // } + console.log('quantityLimitTableRef.value',quantityLimitTableRef.value.formState); Modal.confirm({ title: "提示", @@ -131,32 +75,23 @@ cancelText: "取消", onOk() { setTimeout(async () => { - if (params) { - const url = await getUrl(route.query.sn); + if (basicData&&quantityData) { + // const url = await getUrl(route.query.sn); const data = await add({ - ...params, - deliverySource: 1, - attachment: JSON.stringify(params.attachment), - deliveryPlanList: datasource.value.map((s) => { - return { - channelId: s.systemName, - deliveryStatus: 1, - // directorCode: s.systemDescribe, - // directorName: s.systemAdministrator, - outerPlanId: route.query.sn, - receiveApplicationCode: s.applicationCode, - receiveApplicationName: s.applicationChineseName, - sampleQuota: s.sampleQuota > 0 ? s.sampleQuota : 0, - questionnaireUrl: url, - receiverCodeNameList: JSON.stringify([ - { - receiverCode: s.systemAdministratorPhone, - receiverName: s.systemAdministrator, - }, - ]), - }; - }) - , + deliveryName: basicData.deliveryName, + urlCode: basicData.urlCode, + deliverySource: 2, + description: quantityData.description, + deliveryPlanList: [{ + channelId: '企业微信', + deliveryStatus: 1, + outerPlanId:route.query.sn, + receiveApplicationCode: 2, + receiveApplicationName: '企业微信', + sampleQuota: basicData.checked?basicData.sampleQuota:-1, + questionnaireUrl: basicInformationRef.value.formState.code, + receiverCodeNameList: quantityData.receiverCodeNameList, + }], sn: route.query.sn, }); if (data) { @@ -171,64 +106,63 @@ }, }); }; - - const getNum = async () => { - const data = await getAnswerSetting(route.query.sn); - console.log("getNum", data.data.publish_number); - publish_number.value = data.data.publish_number; - }; - - const getUrl = async (sn) => { - const data = await getQrcode(sn); - return data.data.url; - }; - - onMounted(() => { - getNum(); - getList(); - }); - + const getList = async () => { if (!(id.value && route.query.sn)) { return; } loading.value = true; - const data = await channels({ + const { data } = await channels({ sn: route.query.sn, deliveryPlanId: route.query.id, }).finally(() => { loading.value = false; }); - datasource.value = data.data.map((s) => { - return { - systemAdministratorPhone: s.system_administrator_phone, - applicationChineseName: s.app_name, - systemChineseName: "小程序", - sampleQuota: s.samples > 0 ? s.samples : undefined, - systemAdministrator: s.system_administrator, - id: s.id, - }; - }); - console.log("data.data.map", datasource.value); + console.log('channels-data',data); + datasource.value = data[0] + quantityData.value.receiver = data[0].system_administrator + basicData.value.samples = data[0].samples }; - const onUpdate = (value) => { - datasource.value = value.value; - }; + // const getUrl = async (sn) => { + // const data = await getQrcode(sn); + // return data.data.url; + // }; + + watch( + () => route.query.id, + (value) => { + id.value = value; + getList(); + }, + { immediate:true } + ); + // 获取详情 + const getDetail = (val) => { + console.log('val详情',val); + quantityData.value.description = val.memo + } + + const quantityData = ref({ + description: "", + receiver: "", + }) + const basicData = ref({ + samples: -1, + }) + onMounted(() => { + getList(); + }); return { - // eslint-disable-next-line vue/no-dupe-keys basicInformationRef, + quantityLimitTableRef, datasource, isCreate, - addChannelApplicationRef, - onUpdate, - deleteRecord, - onSelectRows, - publish_number, - // open, save, - quantityLimitTableRef, + getDetail, + quantityData, + basicData, }; }, }; diff --git a/src/views/Publish/launch-center/launch-task/index.vue b/src/views/Publish/launch-center/launch-task/index.vue index 69e6e73f..3f012d84 100644 --- a/src/views/Publish/launch-center/launch-task/index.vue +++ b/src/views/Publish/launch-center/launch-task/index.vue @@ -1,7 +1,7 @@ -
{{formState.receiver}}
+
+ {{formState.receiver}} + +
新增人群包
- +
@@ -41,7 +44,7 @@ 查看人群包
-
+ -
+
+
{{legendFormat(formState.description).length}} / 1000
-
+
@@ -77,10 +81,14 @@ import { getActLists } from "../api/php" import { useRoute } from "vue-router"; import SubTitle from "@/views/DataAnalyse/components/SubTitle.vue"; import QuestionTinymceOption from "./QuestionTinymceOption.vue"; +import { DownOutlined } from "@ant-design/icons-vue"; +import * as cheerio from 'cheerio'; +import { useStore } from "vuex"; export default { components: { SubTitle, QuestionTinymceOption, + DownOutlined, }, props: { isCreate: { @@ -93,6 +101,7 @@ export default { } }, setup(props, context) { + const store = useStore(); const formRef = ref() const route = useRoute(); const rules = { @@ -107,7 +116,7 @@ export default { { required: true, message: "请输入消息内容", - trigger: "blur", + trigger: "change", }, ], }; @@ -115,6 +124,7 @@ export default { receiverCodeNameList: undefined, description: "", receiver: "", + descriptionText: "", }); let lastFetchId = 0; const state = reactive({ @@ -151,22 +161,31 @@ export default { } const updateHandle = (val) => { formState.value.description = val + formState.value.descriptionText = val.replace("&","&").replace(store.state.throw.hrefUrl,"javascript:void(0)") } const onSubmit = () => { return formRef.value.validate(); }; const iscreate = ref(route.query.iscreate === "1"); + const legendFormat = (str)=>{ + if(str){ + const $ = cheerio.load(str) + const text = $.text().trim() + return text + } + return str + } watch( ()=>props.quantityData, (val)=>{ formState.value.receiver = val.receiver formState.value.description = val.description + formState.value.descriptionText = val.description.indexOf('')>0? val.description.replace("&","&").replace(store.state.throw.hrefUrl,"javascript:void(0)"):val.description }, { deep:true, immediate: true } ) onMounted(() => { - console.log(iscreate.value); if(iscreate.value) fetchUser(null); }); return { @@ -185,6 +204,7 @@ export default { updateHandle, rules, onSubmit, + legendFormat, }; } } @@ -196,6 +216,10 @@ export default { background: #fff; .content { margin-top: 16px; + .receiver-name :deep(.ant-form-item-control .ant-form-item-control-input .ant-form-item-control-input-content) { + display: flex; + align-items: center; + } .limitation { display: inline-block; } @@ -244,7 +268,10 @@ export default { border: 1px solid #DFE0E3; color: rgba(0,0,0,0.2); cursor: no-drop; - padding: 4px 11px + padding: 4px 11px; + display: flex; + justify-content: space-between; + align-items: center; } } .input { diff --git a/src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue b/src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue index cafcac52..73dbd285 100644 --- a/src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue +++ b/src/views/Publish/launch-center/launch-task/enterpriseWeChat.vue @@ -6,7 +6,7 @@
- + 确定投放
@@ -67,7 +67,7 @@ // quantityLimitTableRef.value.onSubmit(); // } console.log('quantityLimitTableRef.value',quantityLimitTableRef.value.formState); - + console.log('basicInformationRef.value.formState',basicInformationRef.value.formState); Modal.confirm({ title: "提示", content: "确定后,该投放任务将无法修改(除样本数量限制),可在投放中心查询业务进度", @@ -77,10 +77,11 @@ setTimeout(async () => { if (basicData&&quantityData) { // const url = await getUrl(route.query.sn); + loading.value = true; const data = await add({ deliveryName: basicData.deliveryName, - urlCode: basicData.urlCode, - deliverySource: 2, + urlCode: basicInformationRef.value.urlCode, + deliverySource: "2", description: quantityData.description, deliveryPlanList: [{ channelId: '企业微信', @@ -88,18 +89,21 @@ outerPlanId:route.query.sn, receiveApplicationCode: 2, receiveApplicationName: '企业微信', - sampleQuota: basicData.checked?basicData.sampleQuota:-1, - questionnaireUrl: basicInformationRef.value.formState.code, + sampleQuota: basicInformationRef.value.formState.checked?basicInformationRef.value.formState.sampleQuota:-1, + questionnaireUrl: JSON.parse(JSON.stringify(basicInformationRef.value.formState.code)), receiverCodeNameList: quantityData.receiverCodeNameList, }], sn: route.query.sn, }); if (data) { + loading.value = false; Modal.success({ title: "提示", content: "添加成功", }); router.back(); + }else{ + loading.value = false; } } }); @@ -111,17 +115,17 @@ if (!(id.value && route.query.sn)) { return; } - loading.value = true; const { data } = await channels({ sn: route.query.sn, deliveryPlanId: route.query.id, }).finally(() => { - loading.value = false; }); console.log('channels-data',data); datasource.value = data[0] quantityData.value.receiver = data[0].system_administrator basicData.value.samples = data[0].samples + basicData.value.urlUniqCode = data[0].url_uniq_code + }; // const getUrl = async (sn) => { @@ -149,6 +153,7 @@ }) const basicData = ref({ samples: -1, + urlUniqCode: "", }) onMounted(() => { getList(); @@ -163,6 +168,7 @@ getDetail, quantityData, basicData, + loading }; }, }; diff --git a/src/views/Publish/launch-center/launch-task/index.vue b/src/views/Publish/launch-center/launch-task/index.vue index 3f012d84..bec3aaa8 100644 --- a/src/views/Publish/launch-center/launch-task/index.vue +++ b/src/views/Publish/launch-center/launch-task/index.vue @@ -22,6 +22,9 @@ key="plan_id" rowKey="plan_id" > + @@ -114,7 +114,7 @@ import launchListEmpty from "../components/launchListEmpty.vue"; import shareLinks from "../components/shareLinks.vue"; import SubTitle from "@/views/DataAnalyse/components/SubTitle.vue"; -import { reactive, ref } from "@vue/reactivity"; +import { reactive, ref, computed } from "@vue/reactivity"; // import { list } from "../api/api"; import { useRoute, useRouter } from "vue-router"; import createQuantityLimit from "../components/createQuantityLimit.vue"; @@ -125,6 +125,7 @@ import { Modal } from "ant-design-vue"; import Pagination, { getPagination } from "@components/Pagination.vue"; // import { getAnswerSetting } from "@/views/planetDesign/api/api"; import { canPlanetPublish } from "@/Layouts/utils.js"; +import { useStore } from "vuex"; export default { components: { @@ -293,6 +294,12 @@ export default { const onCancel = () => { isSelected.value = 0 } + const store = useStore(); + // 判断超管权限 + let userInfo = computed((state) => { + const info = store.state.common.userInfo + return info||{} + }); onMounted(async () => { await fetchInfo(route.query.sn); @@ -331,6 +338,7 @@ export default { onCancel, onNewBuilt, shareRef, + userInfo, }; }, }; From 5c5ae1b6980cb6955bfcbf9ca8f8f41793a78724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8D=9A=E5=86=89?= Date: Mon, 14 Nov 2022 11:37:13 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BC=81=E5=BE=AE?= =?UTF-8?q?=E6=8A=95=E6=94=BE=E6=B6=88=E6=81=AF=E5=86=85=E5=AE=B9=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E9=99=90=E5=88=B6=E6=96=87=E5=AD=97=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launch-center/components/enterpriseQuantityLimitTable.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue b/src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue index 7bda39b1..060e437d 100644 --- a/src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue +++ b/src/views/Publish/launch-center/components/enterpriseQuantityLimitTable.vue @@ -58,7 +58,7 @@ >
-
{{legendFormat(formState.description).length}} / 1000
+
{{legendFormat(formState.description).length}} / 1000
From 910c12492f33f2102bad0b650c65cfdcb10bdcb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8D=9A=E5=86=89?= Date: Mon, 14 Nov 2022 15:44:30 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E6=8A=95=E6=94=BE=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Publish/launch-center/launch-task/create.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Publish/launch-center/launch-task/create.vue b/src/views/Publish/launch-center/launch-task/create.vue index da8a3182..e595c6d5 100644 --- a/src/views/Publish/launch-center/launch-task/create.vue +++ b/src/views/Publish/launch-center/launch-task/create.vue @@ -135,7 +135,6 @@ export default { }); return; } - Modal.confirm({ title: "提示", content: "确定后,该投放任务将无法修改(除样本数量限制),可在投放中心查询业务进度", @@ -164,6 +163,7 @@ export default { { receiverCode: s.systemAdministratorPhone, receiverName: s.systemAdministrator, + receiverPhone: s.systemAdministratorPhone, }, ]), };