企微助手 ,仓库名 短剧

channelMultiple.vue 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. <template>
  2. <div class="common-screen-item">
  3. <label class="common-screen-label" v-if="title && title != ''"
  4. :style="labelWidth ? 'width:auto;padding-left:30px' : ''">{{ title }}</label>
  5. <el-select
  6. class="select-cls"
  7. v-model="value"
  8. :style="{width: width || '210px'}"
  9. size="small"
  10. :placeholder="placeholder || placeholderVal || '请选择'"
  11. :clearable="clearable"
  12. filterable
  13. :disabled="disabled"
  14. multiple
  15. collapse-tags
  16. @change="change"
  17. >
  18. <el-option v-for="item in options" :key="item.key" :label="item.val" :value="item.key" />
  19. </el-select>
  20. </div>
  21. </template>
  22. <script>
  23. import {
  24. promotionTypeCode,
  25. incomeSourceCode,
  26. launchTypeCode,
  27. customerStaffStatusCode,
  28. kfActiveStatusCode,
  29. } from '@/assets/js/staticTypes'
  30. export default {
  31. props: {
  32. afferent_value: '',
  33. clearable: {
  34. type: Boolean,
  35. default: true
  36. },
  37. reset: {
  38. type: Boolean,
  39. default: false
  40. },
  41. title: {
  42. type: String,
  43. default: '添加渠道'
  44. },
  45. type: {
  46. type: String,
  47. default: ''
  48. },
  49. labelWidth: {
  50. type: Boolean,
  51. default: false
  52. },
  53. disabled: {
  54. type: Boolean,
  55. default: false
  56. },
  57. afferent_params: {//接口传入数据
  58. type: Object,
  59. default: () => ({})
  60. },
  61. width: {
  62. type: String,
  63. },
  64. placeholder: {
  65. type: String,
  66. default: () => ''
  67. },
  68. },
  69. watch: {
  70. reset () {
  71. this.value = []
  72. },
  73. options () {
  74. if (this.options && this.options.length > 0) {
  75. this.init_afferent()
  76. }
  77. }
  78. },
  79. data () {
  80. return {
  81. value: [],
  82. options: [],
  83. placeholderVal: ''
  84. }
  85. },
  86. created () {
  87. if (this.type == 'assignment_status') {
  88. this.options = [
  89. { key: 1, val: '已转接' },
  90. { key: 2, val: '客户转接中' },
  91. { key: 3, val: '客户已拒绝' },
  92. { key: 4, val: '接替成员客户达到上限' },
  93. { key: 5, val: '无接替记录' },
  94. { key: -1, val: '迁移失败' },
  95. ]
  96. } else if (this.type == 'remove_status') {
  97. this.options = [
  98. { key: 1, val: '待迁移' },
  99. { key: 2, val: '迁移中' },
  100. { key: 3, val: '迁移完成' },
  101. { key: -1, val: '迁移失败' },
  102. ]
  103. } else if (this.type == 'remove_type') {
  104. this.options = [
  105. { key: 1, val: '在职' },
  106. { key: 2, val: '离职' },
  107. ]
  108. } else if (this.type == 'chat_group_status') {
  109. this.options = [
  110. { key: 1, val: '群主已发送' },
  111. { key: 2, val: '群主未发送' },
  112. { key: 3, val: '发送失败' },
  113. ]
  114. } else if (this.type == 'thePublic') {//公众号(投放账号)
  115. this.placeholderVal = '公众号'
  116. this.thePublic_init()
  117. } else if (this.type == 'officialAccount') { // 公众号(成员、运营配置账号)
  118. this.placeholderVal = '公众号'
  119. this.getOfficialAccount()
  120. } else if (this.type == 'dramaList') {//短剧列表
  121. this.dramaList_init()
  122. } else if (this.type == 'popularizCompanys') {//推广数据
  123. this.popularizCompanys_init()
  124. } else if (this.type == 'pitcher') {//投手列表
  125. this.pitcher_init()
  126. } else if (this.type == 'chargePay') {//充值订单管理-支付状态
  127. this.options = [
  128. { key: 1, val: '已付款' },
  129. { key: 2, val: '未付款' }
  130. ]
  131. this.placeholderVal = '支付状态'
  132. } else if (this.type == 'orderType') {//充值订单管理-订单类型
  133. this.options = [
  134. { key: 1, val: '通用充值' },
  135. { key: 2, val: '充值活动' },
  136. { key: 3, val: '会员充值' },
  137. { key: 4, val: '平台会员充值' },
  138. ]
  139. this.placeholderVal = '订单类型'
  140. } else if (this.type == 'paySource') {//充值订单管理-付费来源
  141. this.options = [
  142. { key: 1, val: '柚子' },
  143. { key: 2, val: '嘉书' },
  144. { key: 3, val: '迈步' },
  145. { key: 4, val: '点众-阳光' },
  146. // { key: 5, val: '中文在线' },
  147. ]
  148. this.placeholderVal = '付费来源'
  149. } else if (this.type == 'wx_reportRule') {//回传规则
  150. this.reportRule_init()
  151. } else if (this.type == 'corpIdList') {//企微账号下拉列表
  152. this.getCorpIdList()
  153. } else if (this.type == 'circleCreate') {//企微朋友圈-选择创建人
  154. this.getsysUserList()
  155. this.placeholderVal = '选择创建人'
  156. } else if (this.type == 'circleType') {//企微朋友圈-朋友圈类型
  157. this.options = [
  158. { key: 2, val: '个人发表' },
  159. { key: 1, val: '企业发表' }
  160. ]
  161. this.placeholderVal = '朋友圈类型'
  162. } else if (this.type == 'importRecordDetial_addStatus') {//批量加好友/导入详情/添加状态
  163. this.options = [
  164. { key: 0, val: '全部' },
  165. { key: 1, val: '待添加' },
  166. { key: 2, val: '待通过' },
  167. { key: 3, val: '已添加' },
  168. { key: 4, val: '待分配' },
  169. ]
  170. this.placeholderVal = '添加状态'
  171. } else if (this.type == 'promotionType') { // 推广类型
  172. this.options = [
  173. { key: promotionTypeCode.h5, val: 'H5' },
  174. { key: promotionTypeCode.mini_program, val: '小程序' },
  175. ]
  176. this.placeholderVal = '推广类型'
  177. } else if (this.type == 'incomeSource') { // 收入来源
  178. this.options = [
  179. { key: incomeSourceCode.launch, val: '投放推广' },
  180. { key: incomeSourceCode.operation, val: '运营推广' },
  181. ]
  182. this.placeholderVal = '收入来源'
  183. } else if (this.type == 'launchType') { // 投放类型
  184. this.options = [
  185. { key: launchTypeCode.mp, val: 'MP投放' },
  186. { key: launchTypeCode.adq, val: 'ADQ投放' },
  187. ]
  188. this.placeholderVal = '投放类型'
  189. } else if (this.type == 'adqAccount') { // adq 账号选项
  190. this.getAdqAccountList()
  191. this.placeholderVal = 'ADQ账号'
  192. } else if (this.type == 'allAccount') { // 总表 账号选项
  193. this.getAllAccountList()
  194. this.placeholderVal = '总表账号'
  195. } else if (this.type == 'platform') { // 平台选项
  196. this.getPlatformList()
  197. this.placeholderVal = '请选择平台'
  198. } else if (this.type == 'mpAccountHS') { // 花生平台 MP账号
  199. this.getMpAccountHSList()
  200. this.placeholderVal = '请选择账号'
  201. } else if (this.type == 'isActive') { // 成员管理 激活状态
  202. this.options = [
  203. { key: kfActiveStatusCode.NOT_ACTIVATED, val: '未激活' },
  204. { key: kfActiveStatusCode.ACTIVATED, val: '已激活' },
  205. ]
  206. this.placeholderVal = '请选择激活状态'
  207. } else if (this.type == 'orderSource') { // 付费来源
  208. this.getOrderSource()
  209. this.placeholderVal = '付费来源'
  210. } else if (this.type == 'orderSourceHS') { // 订单来源 花生
  211. this.getOrderSourceHS()
  212. this.placeholderVal = '订单来源'
  213. } else if (this.type == 'operatorGroup') { // 运营组
  214. this.getOperatorGroup()
  215. this.placeholderVal = '运营组'
  216. } else if (this.type == 'customerStaffStatus') { // 客服状态
  217. this.options = [
  218. { key: customerStaffStatusCode.USING, val: '运营中' },
  219. { key: customerStaffStatusCode.STOPPED, val: '已停用' },
  220. { key: customerStaffStatusCode.BANNED, val: '已封禁' },
  221. ]
  222. this.placeholderVal = '请选择'
  223. } else if (this.type == 'expireDays') { // 到期时间
  224. this.options = [
  225. { key: 3, val: '3天' },
  226. { key: 7, val: '7天' },
  227. { key: 15, val: '15天' },
  228. ]
  229. this.placeholderVal = '请选择'
  230. } else {
  231. this.init()
  232. }
  233. },
  234. methods: {
  235. getOperatorGroup() { // 运营组
  236. this.$axios.get(this.URL.BASEURL + this.URL.operatorGroup_groupList, {
  237. params: {
  238. page: 1,
  239. page_size: 500,
  240. operator_id: '',
  241. }
  242. }).then((res) => {
  243. var res = res.data
  244. if (res && res.errno == 0 && Array.isArray(res.rst.data)) {
  245. this.options = res.rst.data
  246. this.options.forEach((item) => {
  247. item.val = item.group_name
  248. item.key = item.group_id
  249. });
  250. } else if (res.errno != 4002) {
  251. }
  252. }).catch((err) => {
  253. });
  254. },
  255. getOrderSourceHS() { // 订单来源 花生
  256. this.$axios.get(this.URL.BASEURL + this.URL.dataBoardHS_platformList, { params: {}}).then((res) => {
  257. var res = res.data
  258. if (res && res.errno == 0) {
  259. this.options = res.rst
  260. this.options.forEach((item) => {
  261. item.val = item.desc
  262. item.key = item.order_source
  263. });
  264. } else if (res.errno != 4002) {
  265. }
  266. }).catch((err) => {
  267. });
  268. },
  269. getOrderSource() { // 付费来源
  270. this.$axios.get(this.URL.BASEURL + this.URL.order_platformList, { params: {}}).then((res) => {
  271. var res = res.data
  272. if (res && res.errno == 0) {
  273. this.options = res.rst
  274. this.options.forEach((item) => {
  275. item.val = item.platform_title
  276. item.key = item.platform_id
  277. });
  278. } else if (res.errno != 4002) {
  279. }
  280. }).catch((err) => {
  281. });
  282. },
  283. getMpAccountHSList() { // 花生平台 MP账号
  284. this.$axios.get(this.URL.BASEURL + this.URL.dataBoardHS_wxAccountList, {
  285. params: {
  286. is_select: 1
  287. }
  288. }).then((res) => {
  289. var res = res.data
  290. if (res && res.errno == 0) {
  291. this.options = res.rst
  292. this.options.forEach((item) => {
  293. item.val = item.account_name
  294. item.key = item.wechat_account_id
  295. });
  296. } else if (res.errno != 4002) {
  297. }
  298. }).catch((err) => {
  299. });
  300. },
  301. getPlatformList() { // 平台选项
  302. this.$axios.post(this.URL.BASEURL + this.URL.getPlatformOptions, {}).then((res) => {
  303. var res = res.data
  304. if (res && res.errno == 0) {
  305. this.options = res.rst
  306. this.options.forEach((item) => {
  307. item.val = item.platform_name
  308. item.key = item.platform_id
  309. });
  310. } else if (res.errno != 4002) {
  311. }
  312. }).catch((err) => {
  313. });
  314. },
  315. getAdqAccountList() { // ADQ账号选项
  316. this.$axios.get(this.URL.BASEURL + this.URL.adqAccount_list, {
  317. params: {
  318. is_select: 1
  319. }
  320. }).then((res) => {
  321. var res = res.data
  322. if (res && res.errno == 0) {
  323. this.options = res.rst
  324. this.options.forEach((item) => {
  325. item.val = item.account_id
  326. item.key = item.account_id
  327. });
  328. } else if (res.errno != 4002) {
  329. }
  330. }).catch((err) => {
  331. });
  332. },
  333. getAllAccountList() { // 总表账号选项
  334. this.$axios.get(this.URL.BASEURL + this.URL.dataBoard_allAccountOptions, {
  335. params: {
  336. keyword: ''
  337. }
  338. }).then((res) => {
  339. var res = res.data
  340. if (res && res.errno == 0) {
  341. this.options = res.rst
  342. this.options.forEach((item) => {
  343. item.val = item.account_name
  344. item.key = item.account_id
  345. });
  346. } else if (res.errno != 4002) {
  347. }
  348. }).catch((err) => {
  349. });
  350. },
  351. getsysUserList () {
  352. this.$axios.get(this.URL.BASEURL + this.URL.getsysUserList, {
  353. params: {
  354. ...this.afferent_params
  355. }
  356. }).then((res) => {
  357. var res = res.data
  358. if (res && res.errno == 0) {
  359. this.options = res.rst
  360. this.options.forEach((item) => {
  361. item.val = item.name;
  362. item.key = item.admin_id
  363. });
  364. } else if (res.errno != 4002) {
  365. }
  366. }).catch((err) => {
  367. });
  368. },
  369. init_afferent () {//传入的时初始化
  370. if (this.afferent_value) {
  371. this.value = this.afferent_value
  372. }
  373. },
  374. clear () {
  375. this.value = []
  376. this.$emit('channelDefine', [])
  377. },
  378. change () {
  379. this.$emit('channelDefine', this.value)
  380. },
  381. init () {
  382. this.$axios.get(this.URL.BASEURL + this.URL.addWayList, {}).then((res) => {
  383. var res = res.data
  384. if (res && res.errno == 0) {
  385. this.options = res.rst
  386. } else if (res.errno != 4002) {
  387. }
  388. }).catch((err) => {
  389. });
  390. },
  391. thePublic_init () {
  392. this.$axios.get(this.URL.BASEURL + this.URL.pitcher_wxAccountList, {
  393. params: {
  394. is_select: 1,
  395. }
  396. }).then((res) => {
  397. var res = res.data
  398. if (res && res.errno == 0) {
  399. this.options = res.rst
  400. this.options.forEach((item) => {
  401. item.val = item.account_name;
  402. item.key = item.wechat_account_id
  403. });
  404. } else if (res.errno != 4002) {
  405. }
  406. }).catch((err) => {
  407. });
  408. },
  409. getOfficialAccount () {
  410. this.$axios.get(this.URL.BASEURL + this.URL.pitcher_officialAccountsList, {
  411. params: {
  412. is_select: 1,
  413. }
  414. }).then((res) => {
  415. var res = res.data
  416. if (res && res.errno == 0) {
  417. this.options = res.rst
  418. this.options.forEach((item) => {
  419. item.val = item.account_name;
  420. item.key = item.wechat_account_id
  421. });
  422. } else if (res.errno != 4002) {
  423. }
  424. }).catch((err) => {
  425. });
  426. },
  427. dramaList_init () {
  428. this.$axios.get(this.URL.BASEURL + this.URL.pitcher_dramaList, {
  429. params: {
  430. is_select: 1
  431. }
  432. }).then((res) => {
  433. var res = res.data
  434. if (res && res.errno == 0) {
  435. this.options = res.rst
  436. this.options.forEach((item) => {
  437. item.val = item.name;
  438. item.key = item.id
  439. });
  440. } else if (res.errno != 4002) {
  441. }
  442. }).catch((err) => {
  443. });
  444. },
  445. popularizCompanys_init () {
  446. this.$axios.get(this.URL.BASEURL + this.URL.stat_popularizCompanys, {
  447. params: this.afferent_params
  448. }).then((res) => {
  449. var res = res.data
  450. if (res && res.errno == 0) {
  451. this.options = res.rst
  452. this.options.forEach((item) => {
  453. item.val = item.principalName;
  454. item.key = item.principalName
  455. });
  456. } else if (res.errno != 4002) {
  457. }
  458. }).catch((err) => {
  459. });
  460. },
  461. pitcher_init () {
  462. this.$axios.get(this.URL.BASEURL + this.URL.pitcher_pitcherList, {
  463. params: this.afferent_params
  464. }).then((res) => {
  465. var res = res.data
  466. if (res && res.errno == 0) {
  467. this.options = res.rst
  468. this.options.forEach((item) => {
  469. item.val = item.name;
  470. item.key = item.id
  471. });
  472. } else if (res.errno != 4002) {
  473. }
  474. }).catch((err) => {
  475. });
  476. },
  477. reportRule_init () {
  478. this.$axios.get(this.URL.BASEURL + this.URL.pitcher_reportRuleList, {
  479. }).then((res) => {
  480. var res = res.data
  481. if (res && res.errno == 0) {
  482. this.options = res.rst
  483. this.options.forEach((item) => {
  484. item.val = item.name;
  485. item.key = item.id
  486. });
  487. } else if (res.errno != 4002) {
  488. }
  489. }).catch((err) => {
  490. });
  491. },
  492. getCorpIdList () {
  493. this.$axios.get(this.URL.BASEURL + this.URL.pitcher_getCorpIdList, {
  494. }).then((res) => {
  495. var res = res.data
  496. if (res && res.errno == 0) {
  497. this.options = res.rst
  498. this.options.forEach((item) => {
  499. item.val = item.corp_name;
  500. item.key = item.corpid
  501. });
  502. } else if (res.errno != 4002) {
  503. }
  504. }).catch((err) => {
  505. });
  506. }
  507. }
  508. }
  509. </script>
  510. <style lang="scss" scoped>
  511. .dateInput {
  512. padding: 0 !important;
  513. text-align: center;
  514. }
  515. .select-cls {
  516. /deep/ &.el-select .el-input.is-focus .el-input__inner,
  517. /deep/ &.el-select .el-input__inner:focus {
  518. border-color: #DCDFE6;
  519. }
  520. /deep/ .el-input__suffix {
  521. border-top-right-radius: 4px;
  522. border-bottom-right-radius: 4px;
  523. border: 1px solid #DCDFE6;
  524. right: 0;
  525. width: 30px;
  526. background-color: #F1F1F1;
  527. .el-input__icon {
  528. color: #909399;
  529. }
  530. }
  531. }
  532. </style>