ProjectMemberList.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. <style>
  2. .my-project .ant-tabs-nav-scroll {
  3. display: flex;
  4. justify-content: center;
  5. }
  6. .close-account-my-project .ant-modal-footer .ant-btn-primary {
  7. display: none;
  8. }
  9. .only .ant-badge-count {
  10. right: -16px;
  11. }
  12. </style>
  13. <template>
  14. <a-card :bordered="false" :tabList="tabListNoTitle" :activeTabKey="noTitleKey"
  15. @tabChange="key => onTabChange(key, 'noTitleKey')" class="my-project">
  16. <!-- 查询区域 -->
  17. <div class="table-page-search-wrapper">
  18. <a-form layout="inline">
  19. <a-row :gutter="24">
  20. <a-col :md="6" :sm="8">
  21. <a-form-item label="项目名称">
  22. <a-input placeholder="请输入项目名称" v-model="keyWord"></a-input>
  23. </a-form-item>
  24. </a-col>
  25. <a-col :md="6" :sm="8">
  26. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  27. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  28. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  29. </span>
  30. </a-col>
  31. </a-row>
  32. </a-form>
  33. </div>
  34. <!-- table区域-begin -->
  35. <div>
  36. <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
  37. :pagination="ipagination" :loading="loading">
  38. <span slot="maxBid" slot-scope="maxBid">{{ maxBid / 1000 }}</span>
  39. <span slot="mediaId" slot-scope="mediaId">{{ mediaId == 1 ? '头条' :mediaId == 2? '快手':mediaId == 3?'头条内广':'快手内广' }}</span>
  40. <span slot="action" slot-scope="text, record">
  41. <a @click="handleEdit(record)">{{ noTitleKey == 'myProject' ? '查看成员' : '账号绑定' }}</a>
  42. <a-divider type="vertical" />
  43. <a @click="addParams(record)">{{ noTitleKey == 'myProject' ? '新增人员' : '查看账户' }}</a>
  44. <a-divider type="vertical" v-if="noTitleKey == 'myProject'" />
  45. <a-badge :count="record.needExamine" class="only">
  46. <a @click="projectLook(record)" v-if="noTitleKey == 'myProject'"
  47. :disabled="record.needExamine == 0">待办事项</a>
  48. </a-badge>
  49. </span>
  50. </a-table>
  51. </div>
  52. <!-- table区域-end -->
  53. <!-- 查看项目成员 -->
  54. <a-modal :title="title" v-model="visible" @ok="handleOk" width="800px" class="close-account-my-project">
  55. <div style="display:flex;line-height:50px;flex-wrap: wrap;">
  56. <div style="width:25%;text-align:center;" v-for="(item, index) of memberList" :key="index">
  57. <a-tag color="#2db7f5" @close="log(item.id)" closable>{{ item.userName }}
  58. <a-divider type="vertical" />
  59. {{ item.roleCode | roleCode }}</a-tag>
  60. </div>
  61. </div>
  62. </a-modal>
  63. <!-- 添加项目成员 -->
  64. <a-modal title="添加项目成员" v-model="visibleAdd" @ok="handleOkAdd" :confirmLoading="confirmLoading">
  65. <!-- /sys/user/getAllUserList -->
  66. <a-select v-model="appId" showSearch allowClear mode="multiple" placeholder="请选择成员" optionFilterProp="children"
  67. style="width: 100%" @focus="handleFocus" @blur="handleBlur" @change="handleChange" :filterOption="true"
  68. @search="search" :maxTagCount="1">
  69. <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
  70. :value="appModel.userId">
  71. {{ appModel.realName }}
  72. &#12288;&#12288;{{ appModel.roleName }}</a-select-option>
  73. </a-select>
  74. </a-modal>
  75. <!-- 账号绑定 -->
  76. <a-modal title="账号绑定" v-model="visibleBind" @ok="handleSubmit" :width="800"
  77. :okButtonProps="{ props: { disabled: false } }" :cancelButtonProps="{ props: { disabled: false } }">
  78. <a-form :form="form">
  79. <a-form-item label="选择方式" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
  80. :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
  81. <a-radio-group buttonStyle="solid" v-model="mode" @change="onChageLogin">
  82. <a-radio-button value="authorization">授权</a-radio-button>
  83. <a-radio-button value="login">登录</a-radio-button>
  84. </a-radio-group>
  85. </a-form-item>
  86. <div v-if="mode=='authorization'">
  87. <a-form-item label="媒体:" :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
  88. :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }">
  89. <a-radio-group buttonStyle="outline" v-model="loginType">
  90. <a-radio-button value="kuaishou">快手</a-radio-button>
  91. <a-radio-button value="bytedance">头条</a-radio-button>
  92. </a-radio-group>
  93. </a-form-item>
  94. <a-form-item label="是否本代理商开户:" :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
  95. :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }" v-if="loginType == 'kuaishou'">
  96. <a-radio-group buttonStyle="outline" v-model="agentType">
  97. <a-radio-button value="0">否</a-radio-button>
  98. <a-radio-button value="1">是</a-radio-button>
  99. </a-radio-group>
  100. </a-form-item>
  101. <a-form-item label="系统类型:" :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
  102. :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }">
  103. <a-radio-group buttonStyle="outline" v-model="systemType">
  104. <a-radio-button value="不限">不限</a-radio-button>
  105. <a-radio-button value="ios">ios</a-radio-button>
  106. <a-radio-button value="android">android</a-radio-button>
  107. <a-radio-button value="4">其他</a-radio-button>
  108. </a-radio-group>
  109. <a-input v-model="systemTypeName" v-if="systemType == '4'" placeholder="请输入系统类型" />
  110. </a-form-item>
  111. <a-form-item label="预警金额" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
  112. :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
  113. <!-- <a-input v-decorator="['warningAmount', { rules: [{ required: true, message: '请输入预警金额' }] }]" /> -->
  114. <a-input-number style="width:50%" v-decorator="[
  115. 'warningAmount',
  116. { rules: [{ required: true, message: '请输入预警金额' }], initialValue: 5000 }
  117. ]" />
  118. </a-form-item>
  119. <a-form-item label="预警比例" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
  120. :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
  121. <a-input-number :step="0.1" style="width:50%" v-decorator="[
  122. 'warningProportion',
  123. { rules: [{ required: true, message: '请输入预警比例' }], initialValue: 1.5 }
  124. ]" />
  125. </a-form-item>
  126. </div>
  127. <div v-else>
  128. <a-form-item label="媒体:" :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
  129. :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }">
  130. <a-radio-group buttonStyle="outline" v-model="loginType">
  131. <a-radio-button value="pangolin">穿山甲</a-radio-button>
  132. </a-radio-group>
  133. </a-form-item>
  134. <a-form-item label="账号:" :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
  135. :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }" v-show="mode == 'login'">
  136. <a-input v-model="accountName" placeholder="请输入账户名" />
  137. </a-form-item>
  138. <a-form-item label="密码:" :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
  139. :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }" v-show="mode == 'login'">
  140. <a-input type="password" v-model="password" placeholder="请输入密码" />
  141. </a-form-item>
  142. </div>
  143. </a-form>
  144. </a-modal>
  145. <!-- 查看项目下的账号 -->
  146. <a-modal :title="titleAccount" v-model="visibleAccount" @ok="handleOk" width="800px"
  147. class="close-account-my-project">
  148. <a-table ref="table" size="middle" bordered rowKey="id" :columns="columnsAccount" :dataSource="dataAccount"
  149. :pagination="ipaginationAccount" :loading="loadingAccount">
  150. <span slot="createTime" slot-scope="createTime">{{ createTime | getDate }}</span>
  151. </a-table>
  152. </a-modal>
  153. <!-- 待办事件审核 -->
  154. <a-modal title="待办事件审核" v-model="projectVisible" @ok="handleOkProject" width="800px"
  155. class="close-account-my-project" :footer="null">
  156. <a-table ref="table" size="middle" bordered rowKey="id" :columns="columnsProject" :dataSource="dataProject"
  157. :pagination="ipaginationAccount" :loading="loadingAccount">
  158. <span slot="action" slot-scope="text, record">
  159. <a @click="projectEdit(record, 1)">通过</a>
  160. <a-divider type="vertical" />
  161. <a @click="projectEdit(record, 2)">拒绝</a>
  162. </span>
  163. </a-table>
  164. </a-modal>
  165. </a-card>
  166. </template>
  167. <script>
  168. import ProjectMemberModal from './modules/ProjectMemberModal'
  169. import {
  170. httpAction,
  171. getAction,
  172. deleteAction,
  173. putAction
  174. } from '@/api/manage'
  175. import {
  176. mapGetters
  177. } from 'vuex'
  178. import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
  179. import {
  180. JeecgListMixin
  181. } from '@/mixins/ipagination'
  182. export default {
  183. name: 'ProjectMemberList',
  184. components: {
  185. ProjectMemberModal,
  186. JSelectUserByDep
  187. },
  188. mixins: [JeecgListMixin],
  189. data() {
  190. return {
  191. title: '',
  192. titleAccount: '',
  193. description: '我的项目',
  194. // 表头
  195. visible: false,
  196. keyWord: '',
  197. mode: 'authorization',
  198. mediaId: '2',
  199. accountName: '',
  200. password: '',
  201. loginType: 'kuaishou',
  202. agentType: '1',
  203. form: this.$form.createForm(this),
  204. record: '',
  205. systemType: '不限',
  206. systemTypeName: '',
  207. queryParam: {
  208. projectId: '',
  209. userId: ''
  210. },
  211. projectId: '',
  212. user: '',
  213. tabListNoTitle: [{
  214. key: 'myProject',
  215. tab: '我管理的'
  216. },
  217. {
  218. key: 'participation',
  219. tab: '我参与的'
  220. }
  221. ],
  222. noTitleKey: 'participation',
  223. columns: [{
  224. title: '项目名称',
  225. align: 'center',
  226. dataIndex: 'projectName'
  227. },
  228. {
  229. title: '广告主名称',
  230. align: 'center',
  231. dataIndex: 'advertiserName'
  232. },
  233. {
  234. title: '运营负责人',
  235. align: 'center',
  236. dataIndex: 'responsibleName'
  237. },
  238. {
  239. title: '设计负责人',
  240. align: 'center',
  241. dataIndex: 'designResponsibleName'
  242. },
  243. {
  244. title: '媒体类型',
  245. align: 'center',
  246. dataIndex: 'mediaId',
  247. scopedSlots: {
  248. customRender: 'mediaId'
  249. }
  250. },
  251. {
  252. title: '最高出价',
  253. align: 'center',
  254. dataIndex: 'maxBid',
  255. scopedSlots: {
  256. customRender: 'maxBid'
  257. }
  258. },
  259. {
  260. title: '操作',
  261. dataIndex: 'action',
  262. align: 'center',
  263. scopedSlots: {
  264. customRender: 'action'
  265. }
  266. }
  267. ],
  268. columnsAccount: [{
  269. title: '账户id',
  270. align: 'center',
  271. dataIndex: 'accountId'
  272. },
  273. {
  274. title: '账户名称',
  275. align: 'center',
  276. dataIndex: 'authName'
  277. },
  278. {
  279. title: '所属人',
  280. align: 'center',
  281. dataIndex: 'userName'
  282. },
  283. {
  284. title: '授权时间',
  285. align: 'center',
  286. dataIndex: 'createTime',
  287. scopedSlots: {
  288. customRender: 'createTime'
  289. }
  290. }
  291. ],
  292. ipaginationAccount: {
  293. current: 1,
  294. pageSize: 10,
  295. // pageSizeOptions: ['10', '20', '30'],
  296. showTotal: (total, range) => {
  297. return range[0] + '-' + range[1] + ' 共' + total + '条'
  298. },
  299. showQuickJumper: true,
  300. // showSizeChanger: true,
  301. total: 0,
  302. onChange: current => {
  303. // 切换分页时的回调,
  304. // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
  305. this.ipaginationAccount.current = current
  306. }
  307. },
  308. loadingAccount: false,
  309. projectVisible: false,
  310. columnsProject: [{
  311. title: '转让账户',
  312. align: 'center',
  313. dataIndex: 'accountId'
  314. },
  315. {
  316. title: '受让人姓名',
  317. align: 'center',
  318. dataIndex: 'transferorName'
  319. },
  320. {
  321. title: '转户人姓名',
  322. align: 'center',
  323. dataIndex: 'assigneeName'
  324. },
  325. {
  326. title: '受让人绩效开始时间',
  327. align: 'center',
  328. dataIndex: 'assigneeDate'
  329. },
  330. {
  331. title: '转户人绩效结束时间',
  332. align: 'center',
  333. dataIndex: 'transferorDate'
  334. },
  335. {
  336. title: '操作',
  337. dataIndex: 'action',
  338. align: 'center',
  339. scopedSlots: {
  340. customRender: 'action'
  341. }
  342. }
  343. ],
  344. dataProject: [],
  345. dataAccount: [],
  346. dataSource: [],
  347. dataElse: [],
  348. loading: false,
  349. memberList: [],
  350. visibleAdd: false,
  351. member: [],
  352. itemJson: null,
  353. visibleBind: false,
  354. bindAccountLoginUrl: '/ctop/bindAccountLogin/login',
  355. bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization',
  356. appId: [],
  357. list: [],
  358. options: [],
  359. visibleAccount: false,
  360. confirmLoading: false
  361. }
  362. },
  363. computed: {
  364. importExcelUrl: function () {
  365. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  366. }
  367. },
  368. filters: {
  369. roleCode(value) {
  370. var state = {
  371. clip: '剪辑',
  372. shot: '拍摄',
  373. plan: '策划',
  374. plane: '平面',
  375. admin: '管理员',
  376. operator: '运营专员',
  377. kuaishouOperationManager: '快手运营经理',
  378. designTeamLeader: '设计组长',
  379. planeLeader: '平面组长',
  380. touTiaoOperationManager: '头条运营经理',
  381. operationAssistant: '运营助理'
  382. }
  383. if (value) {
  384. return state[value]
  385. } else {
  386. return '暂无'
  387. }
  388. },
  389. getDate(value) {
  390. let date = new Date(value)
  391. let y = date.getFullYear()
  392. let MM = date.getMonth() + 1
  393. MM = MM < 10 ? '0' + MM : MM
  394. let d = date.getDate()
  395. d = d < 10 ? '0' + d : d
  396. return y + '-' + MM + '-' + d
  397. }
  398. },
  399. methods: {
  400. // /ctop/userAllocation/getAccountsByProjectId projectId userId
  401. projectLook(item) {
  402. var params = {}
  403. params.projectId = item.id
  404. params.status = 0
  405. getAction('/ctop/transferAccount/list', params).then(res => {
  406. console.log(res)
  407. if (res.success) {
  408. this.projectVisible = true
  409. this.dataProject = res.result.map((item, index) => {
  410. return {
  411. ...item,
  412. key: index
  413. }
  414. })
  415. this.ipaginationAccount.total = res.result.length
  416. }
  417. })
  418. },
  419. projectEdit(item, status) {
  420. var params = {}
  421. params.id = item.id
  422. params.status = status
  423. params.auditor = this.userInfo().id
  424. putAction('/ctop/transferAccount/edit', params).then(res => {
  425. console.log(res)
  426. if (res.success) {
  427. this.projectVisible = false
  428. this.getResponsibleList()
  429. }
  430. })
  431. },
  432. handleOkProject() {},
  433. ...mapGetters(['nickname', 'avatar', 'userInfo']),
  434. add(value, key) {
  435. var dataValue = value.split(',')
  436. var dataKey = key.split(',')
  437. var jsonArr = []
  438. for (let i = 0; i < dataValue.length; i++) {
  439. jsonArr.push({
  440. userId: dataKey[i],
  441. userName: dataValue[i]
  442. })
  443. }
  444. this.member = jsonArr
  445. },
  446. log(id) {
  447. deleteAction('/ctop/projectMember/delete', {
  448. id: id
  449. }).then(res => {
  450. if (res.success) {
  451. this.getMemberList(this.projectId)
  452. this.$message.success('删除成功')
  453. } else {
  454. this.$message.error(res.message)
  455. }
  456. })
  457. },
  458. onTabChange(key, type) {
  459. console.log(key, type)
  460. this[type] = key
  461. this.keyWord = ''
  462. if (key == 'myProject') {
  463. this.getResponsibleList()
  464. } else {
  465. this.getParticipateList()
  466. }
  467. },
  468. getResponsibleList() {
  469. //我管理的
  470. this.dataSource = []
  471. this.dataElse = []
  472. this.loading = true
  473. getAction('/ctop/project/responsibleList', {
  474. userId: this.userInfo().id
  475. }).then(res => {
  476. if (res.code == 0) {
  477. this.dataSource = res.result
  478. this.dataElse = res.result
  479. this.loading = false
  480. }
  481. })
  482. },
  483. getParticipateList() {
  484. //我参与的
  485. this.dataSource = []
  486. this.dataElse = []
  487. this.loading = true
  488. getAction('/ctop/projectMember/participateList', {
  489. userId: this.userInfo().id
  490. }).then(res => {
  491. if (res.code == 0) {
  492. this.dataSource = res.result
  493. this.dataElse = res.result
  494. this.loading = false
  495. }
  496. })
  497. },
  498. getMemberList(projectId) {
  499. //成员查看
  500. this.memberList = []
  501. getAction('/ctop/projectMember/getMemberList', {
  502. projectId: projectId
  503. }).then(res => {
  504. if (res.code == 0) {
  505. this.visible = true
  506. this.memberList = res.result
  507. }
  508. })
  509. },
  510. handleOk(e) {
  511. this.visible = false
  512. },
  513. handleOkAdd(e) {
  514. var params = {}
  515. params.projectId = this.itemJson.id
  516. params.projectName = this.itemJson.projectName
  517. params.memberArr = this.appId
  518. this.confirmLoading = true
  519. httpAction('/ctop/projectMember/batchAdd', params, 'post').then(res => {
  520. this.confirmLoading = false
  521. if (res.success) {
  522. this.visibleAdd = false
  523. this.appId = []
  524. this.$message.success('添加成功')
  525. } else {
  526. this.$message.error('添加失败')
  527. }
  528. })
  529. },
  530. addParams(item) {
  531. if (this.noTitleKey == 'myProject') {
  532. this.visibleAdd = true
  533. this.itemJson = item
  534. console.log(this.itemJson)
  535. getAction('/sys/user/getAllUserList', '').then(res => {
  536. if (res.success) {
  537. this.list = res.result
  538. this.options = res.result
  539. }
  540. })
  541. } else {
  542. this.visibleAccount = true
  543. this.titleAccount = item.projectName
  544. this.loadingAccount = true
  545. getAction('/ctop/userAllocation/getAccountsByProjectId', {
  546. projectId: item.projectId,
  547. userId: this.userInfo().id
  548. }).then(res => {
  549. if (res.success) {
  550. this.dataAccount = res.result
  551. this.loadingAccount = false
  552. this.ipaginationAccount.total = res.result.length
  553. }
  554. })
  555. }
  556. },
  557. handleAdd() {},
  558. handleEdit(item) {
  559. if (this.noTitleKey == 'myProject') {
  560. console.log(item)
  561. this.title = item.projectName
  562. this.projectId = item.id
  563. this.getMemberList(item.id)
  564. } else {
  565. console.log(item)
  566. this.mode = 'authorization'
  567. this.loginType = item.mediaId == '1' ? 'bytedance' : 'kuaishou'
  568. this.record = item
  569. this.visibleBind = true
  570. }
  571. },
  572. handleDelete(id) {},
  573. onChageLogin(e) {
  574. console.log(this.mode)
  575. if (this.mode == 'login') {
  576. this.loginType = 'pangolin'
  577. } else {
  578. this.loginType = 'kuaishou'
  579. this.systemType = '不限'
  580. }
  581. },
  582. handleSubmit() {
  583. let params = {}
  584. params.advertiserId = this.record.advertiserId
  585. params.advertiser_name = this.record.advertiserName
  586. params.userId = this.userInfo().id
  587. params.userName = this.userInfo().realname
  588. params.projectId = this.record.projectId
  589. params.projectName = this.record.projectName
  590. params.systemType = this.systemType == '4' ? this.systemTypeName : this.systemType
  591. // 触发表单验证
  592. this.form.validateFields((err, values) => {
  593. if (!err) {
  594. if (this.mode == 'login') {
  595. params.accountName = this.accountName
  596. params.password = this.password
  597. params.loginType = this.loginType
  598. httpAction(this.bindAccountLoginUrl, params, 'post').then(res => {
  599. if (res.success) {
  600. alert('绑定成功')
  601. this.accountName = ''
  602. this.password = ''
  603. this.loginType = 'kuaishou'
  604. this.visibleBind = false
  605. } else {
  606. alert(res.message)
  607. }
  608. })
  609. }
  610. // 授权登录
  611. if (this.mode == 'authorization') {
  612. params.authorizationType = this.loginType
  613. if (this.loginType == 'kuaishou') {
  614. params.mediaId = this.mediaId
  615. params.agentType = this.agentType
  616. } else if (this.loginType == 'bytedance') {
  617. params.mediaId = 1
  618. }
  619. params.warningAmount = values.warningAmount
  620. params.warningProportion = values.warningProportion
  621. httpAction(this.bindAuthorizationUrl, params, 'post').then(res => {
  622. if (res.success) {
  623. window.open(res.message, '_blank')
  624. this.visibleBind = false
  625. } else {
  626. alert('绑定失败')
  627. }
  628. })
  629. }
  630. }
  631. })
  632. },
  633. searchReset() {
  634. this.keyWord = ''
  635. this.dataSource = this.dataElse
  636. },
  637. searchQuery() {
  638. this.dataSource = this.dataElse.filter(item => {
  639. return item.projectName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
  640. })
  641. },
  642. handleChange(value, options) {
  643. console.log(value, options)
  644. // this.appId = value
  645. },
  646. getElseData(value) {
  647. this.getStatistics()
  648. },
  649. handleBlur() {
  650. console.log('blur')
  651. },
  652. handleFocus() {
  653. console.log('focus')
  654. if (this.appId.length > 0) {
  655. this.options = []
  656. for (let i = 0; i < this.list.length; i++) {
  657. for (let j = 0; j < this.appId.length; j++) {
  658. if (this.list[i].userId == this.appId[j]) {
  659. this.options.push(this.list[i])
  660. }
  661. }
  662. }
  663. } else {
  664. this.options = this.list
  665. }
  666. },
  667. search(value) {
  668. this.options = []
  669. if (value != '') {
  670. this.options = this.list.filter(item => {
  671. var data = item.realName + ' ' + item.roleName
  672. return data.toLowerCase().indexOf(value.toLowerCase()) > -1
  673. })
  674. this.options = [...this.options]
  675. console.log(this.options)
  676. } else {
  677. if (this.appId.length > 0) {
  678. this.options = []
  679. for (let i = 0; i < this.list.length; i++) {
  680. for (let j = 0; j < this.appId.length; j++) {
  681. if (this.list[i].userId == this.appId[j]) {
  682. this.options.push(this.list[i])
  683. }
  684. }
  685. }
  686. } else {
  687. this.options = this.list
  688. }
  689. }
  690. }
  691. },
  692. mounted() {
  693. this.$nextTick(() => {
  694. this.getParticipateList()
  695. })
  696. }
  697. }
  698. </script>
  699. <style scoped>
  700. @import '~@assets/less/common.less';
  701. </style>