index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798
  1. <template>
  2. <div class="app-container">
  3. <el-row :gutter="10">
  4. <!--机构数据-->
  5. <!-- <el-col :span="4" :xs="24">
  6. <org-tree
  7. v-model="queryParams.orgId"
  8. @defaultKey="getDefaultKey"
  9. @checkChange="checkChange"
  10. @click="clickTreeNode"
  11. :defaultCheckSub="false"
  12. hangsheTree
  13. ></org-tree>
  14. </el-col> -->
  15. <el-col :span="24" :xs="24">
  16. <div class="main-right-box">
  17. <!-- 搜索条件 -->
  18. <div class="main-search-box">
  19. <el-form
  20. :model="queryParams"
  21. ref="search"
  22. size="small"
  23. :inline="true"
  24. v-show="showSearch"
  25. >
  26. <el-form-item label="行社名称">
  27. <org-tree
  28. v-model="queryParams.orgId"
  29. @defaultKey="getDefaultKey"
  30. @checkChange="checkChange"
  31. @click="clickTreeNode"
  32. :defaultCheckSub="false"
  33. hangsheTree
  34. ref="orgTree"
  35. ></org-tree>
  36. </el-form-item>
  37. <el-form-item prop="planType" label="任务类型">
  38. <el-select
  39. prop="planType"
  40. label="任务类型"
  41. v-model="queryParams.planType"
  42. placeholder="请选择任务类型"
  43. clearable
  44. >
  45. <el-option
  46. v-for="dict in dict.type.resumption_plan_type"
  47. :key="dict.value"
  48. :label="dict.label"
  49. :value="dict.value"
  50. />
  51. </el-select>
  52. </el-form-item>
  53. <el-form-item prop="resumptionRole" label="履职人员">
  54. <el-select
  55. @visible-change="getRolesByOrg"
  56. prop="resumptionRole"
  57. label="履职人员"
  58. v-model="queryParams.resumptionRole"
  59. placeholder="请选择用户角色"
  60. clearable
  61. >
  62. <el-option
  63. v-for="dict in resumptionRoles"
  64. :key="dict.index"
  65. :label="dict.roleName"
  66. :value="dict.id"
  67. />
  68. </el-select>
  69. </el-form-item>
  70. <el-form-item prop="planCycle" label="任务周期">
  71. <el-select
  72. prop="planCycle"
  73. label="任务周期"
  74. v-model="queryParams.planCycle"
  75. placeholder="请选择任务周期"
  76. clearable
  77. >
  78. <el-option
  79. v-for="item in dict.type.resumption_plan_cycle"
  80. :key="item.value"
  81. :label="item.label"
  82. :value="item.value"
  83. >
  84. </el-option>
  85. </el-select>
  86. </el-form-item>
  87. <el-form-item prop="planStatus" label="任务状态">
  88. <el-select
  89. prop="planStatus"
  90. label="任务状态"
  91. v-model="queryParams.planStatus"
  92. placeholder="请选择任务状态"
  93. clearable
  94. >
  95. <el-option
  96. v-for="item in dict.type.resumption_plan_status"
  97. :key="item.value"
  98. :label="item.label"
  99. :value="item.value"
  100. >
  101. </el-option>
  102. </el-select>
  103. <!-- <el-switch v-model="queryParams.planStatus" active-value="1" inactive-value="0"></el-switch> -->
  104. </el-form-item>
  105. <el-form-item prop="planName" label="任务名称">
  106. <el-input
  107. v-model="queryParams.planName"
  108. :maxlength="50"
  109. name="planName"
  110. placeholder="请输入任务名称"
  111. clearable
  112. />
  113. </el-form-item>
  114. <!-- <el-row :gutter="10" >
  115. <el-col :span="1.5"> </el-col>
  116. </el-row> -->
  117. </el-form>
  118. <el-row>
  119. <el-button
  120. type="primary"
  121. icon="el-icon-search"
  122. size="mini"
  123. @click="getList"
  124. >搜索</el-button
  125. >
  126. <el-button
  127. type="primary"
  128. icon="el-icon-refresh"
  129. size="mini"
  130. @click="resetQuery"
  131. >重置</el-button
  132. >
  133. <el-button
  134. type="primary"
  135. icon="el-icon-plus"
  136. size="mini"
  137. @click="handleAdd()"
  138. v-hasPermi="['core:plan:edit']"
  139. >新增任务</el-button
  140. >
  141. <right-toolbar
  142. :showSearch.sync="showSearch"
  143. @queryTable="getList"
  144. ></right-toolbar>
  145. </el-row>
  146. </div>
  147. <!-- 按纽 -->
  148. <el-table
  149. border
  150. height="594"
  151. size="small"
  152. v-loading="loading"
  153. :data="pageData"
  154. @selection-change="handleSelectionChange"
  155. row-key="id"
  156. >
  157. <el-table-column
  158. label="序号"
  159. fixed
  160. type="index"
  161. align="center"
  162. width="80px"
  163. v-if="columns[0].visible"
  164. ></el-table-column>
  165. <el-table-column
  166. prop="planName"
  167. label="任务名称"
  168. width="250px"
  169. :show-overflow-tooltip="true"
  170. v-if="columns[1].visible"
  171. ></el-table-column>
  172. <el-table-column
  173. prop="planType"
  174. label="任务类型"
  175. align="center"
  176. width="180px"
  177. v-if="columns[2].visible"
  178. >
  179. <template slot-scope="r"
  180. >{{
  181. getLabel(dict.type.resumption_plan_type, `${r.row.planType}`)
  182. }}
  183. </template>
  184. </el-table-column>
  185. <el-table-column
  186. prop="planCreateOrgName"
  187. label="创建机构"
  188. align="center"
  189. width="180px"
  190. v-if="columns[3].visible"
  191. >
  192. <!-- <template slot-scope="r"
  193. >{{ getLabel(dict.type.sys_org_type, r.row.execOrgType) }}
  194. </template> -->
  195. </el-table-column>
  196. <el-table-column
  197. prop="planOfOrgName"
  198. label="行社名称"
  199. align="center"
  200. width="180px"
  201. v-if="columns[4].visible"
  202. ></el-table-column>
  203. <el-table-column
  204. prop="execOrgType"
  205. label="机构类型"
  206. align="center"
  207. width="180px"
  208. v-if="columns[5].visible"
  209. >
  210. <template slot-scope="r"
  211. >{{ getLabel(dict.type.sys_org_type, `${r.row.execOrgType}`) }}
  212. </template>
  213. </el-table-column>
  214. <el-table-column
  215. prop="roleNames"
  216. label="履职人员"
  217. align="center"
  218. width="180px"
  219. v-if="columns[6].visible"
  220. ></el-table-column>
  221. <el-table-column
  222. prop="planCycle"
  223. label="任务周期"
  224. align="center"
  225. width="180px"
  226. v-if="columns[7].visible"
  227. >
  228. <template slot-scope="r"
  229. >{{
  230. getLabel(
  231. dict.type.resumption_plan_cycle,
  232. `${r.row.planCycle}`
  233. )
  234. }}
  235. </template>
  236. </el-table-column>
  237. <el-table-column
  238. prop="planExec"
  239. label="任务时间"
  240. align="center"
  241. width="180px"
  242. v-if="columns[8].visible"
  243. >
  244. <template slot-scope="r"
  245. >{{
  246. getLabel(dict.type.resumption_plan_exec, `${r.row.planExec}`)
  247. }}
  248. </template>
  249. </el-table-column>
  250. <el-table-column
  251. prop="count"
  252. label="任务次数"
  253. align="center"
  254. width="180px"
  255. v-if="columns[7].visible"
  256. ></el-table-column>
  257. <el-table-column
  258. prop="planStatus"
  259. label="任务状态"
  260. align="center"
  261. width="180px"
  262. v-if="columns[10].visible"
  263. >
  264. <template slot-scope="r"
  265. >{{
  266. getLabel(
  267. dict.type.resumption_plan_status,
  268. `${r.row.planStatus}`
  269. )
  270. }}
  271. </template>
  272. </el-table-column>
  273. <el-table-column
  274. prop="updateName"
  275. label="修改人"
  276. align="center"
  277. width="180px"
  278. v-if="false"
  279. ></el-table-column>
  280. <el-table-column fixed="right" width="210" label="操作">
  281. <template slot-scope="r">
  282. <el-button
  283. size="mini"
  284. type="text"
  285. icon="el-icon-arrow-down"
  286. v-if="showPublish(r.row)"
  287. @click="showDialogDistribute(r.row)"
  288. v-hasPermi="['core:plan:distribute']"
  289. >下发</el-button
  290. >
  291. <el-button
  292. size="mini"
  293. type="text"
  294. icon="el-icon-top-left"
  295. v-if="showWithDraw(r.row)"
  296. @click="chhuile(r.row)"
  297. v-hasPermi="['core:plan:distribute']"
  298. >撤回</el-button
  299. >
  300. <el-button
  301. v-if="showEditBtn(r.row)"
  302. size="mini"
  303. type="text"
  304. icon="el-icon-edit-outline"
  305. @click="onEdit(r.row.id)"
  306. v-hasPermi="['core:plan:edit']"
  307. >编辑</el-button
  308. >
  309. <el-button
  310. v-if="!showEditBtn(r.row)"
  311. size="mini"
  312. type="text"
  313. icon="el-icon-edit-outline"
  314. @click="onDetail(r.row.id)"
  315. >详情</el-button
  316. >
  317. <el-button
  318. v-if="showDelete(r.row)"
  319. size="mini"
  320. type="text"
  321. icon="el-icon-delete"
  322. @click="onDel(r.row)"
  323. v-hasPermi="['core:plan:delete']"
  324. >删除</el-button
  325. >
  326. </template>
  327. </el-table-column>
  328. </el-table>
  329. <pagination
  330. v-show="total > 0"
  331. :total="total"
  332. :page.sync="queryParams.pageNum"
  333. :limit.sync="queryParams.pageSize"
  334. @pagination="getList"
  335. />
  336. </div>
  337. </el-col>
  338. </el-row>
  339. <dialog-edit
  340. ref="editDialog"
  341. @success="getList()"
  342. :orgTypeOptions="orgTypeOptions"
  343. :ruleTypeOptions="dict.type.rule_type"
  344. ></dialog-edit>
  345. <dialog-detail
  346. ref="detailDialog"
  347. :orgTypeOptions="orgTypeOptions"
  348. :ruleTypeOptions="dict.type.rule_type"
  349. ></dialog-detail>
  350. <DialogDistribute ref="dialogDistribute" @select="sel"></DialogDistribute>
  351. <DialogThreeState ref="DialogThreeState"> </DialogThreeState>
  352. </div>
  353. </template>
  354. <script>
  355. import DialogDistribute from "@/views/resumption/plan/distribute.vue";
  356. import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
  357. import { mapState, mapMutations, mapGetters } from "vuex";
  358. import DialogEdit from "./dialog.edit";
  359. import DialogDetail from "./dialog.detail";
  360. import * as api from "@/api/resumption/plan";
  361. import { statusOptions, getLabel } from "./../../commonOption";
  362. import { allRole } from "@/api/system/role";
  363. import DialogThreeState from "@/components/message/threeStateMessageBox.vue";
  364. export default {
  365. name: "resumptionplan",
  366. dicts: [
  367. "sys_org_type",
  368. "rule_type",
  369. "resumption_plan_type",
  370. "resumption_plan_cycle",
  371. "resumption_plan_status",
  372. "resumption_plan_exec",
  373. ],
  374. components: {
  375. DialogEdit,
  376. OrgTree,
  377. DialogDistribute,
  378. DialogThreeState,
  379. DialogDetail
  380. },
  381. data() {
  382. const { params, query } = this.$route;
  383. return {
  384. isShow: false,
  385. loading: false,
  386. ids: [],
  387. // 非单个禁用
  388. single: true,
  389. // 非多个禁用
  390. multiple: true,
  391. // 显示搜索条件
  392. showSearch: true,
  393. resumptionRoles: [],
  394. total: 0,
  395. queryParams: {
  396. orgId: null,
  397. planType: null,
  398. resumptionRole: null,
  399. planCycle: null,
  400. planStatus: null,
  401. planName: null,
  402. pageNum: 1,
  403. pageSize: 10,
  404. checkSub: false,
  405. roleList: [],
  406. ...query,
  407. },
  408. pageData: [],
  409. // 列信息
  410. columns: [
  411. { key: 0, label: `序号`, visible: true },
  412. { key: 1, label: `计划名称`, visible: true },
  413. { key: 2, label: `计划类型`, visible: true },
  414. { key: 3, label: `计划创建机构`, visible: true },
  415. { key: 4, label: `计划所属机构`, visible: true },
  416. { key: 5, label: `履职机构类型`, visible: true },
  417. { key: 6, label: `履职角色`, visible: true },
  418. { key: 7, label: `履职周期`, visible: true },
  419. // { key: 8, label: `履职次数`, visible: true },
  420. { key: 8, label: `履职时间`, visible: true },
  421. { key: 9, label: `修改人`, visible: true },
  422. { key: 10, label: `计划状态`, visible: true },
  423. ],
  424. };
  425. },
  426. props: {},
  427. watch: {},
  428. computed: {
  429. ...mapGetters(["orgId", "orgName"]),
  430. orgTypeOptions() {
  431. if (!this.dict || !this.dict.type.sys_org_type == null) {
  432. return [];
  433. }
  434. return this.dict.type.sys_org_type.filter(
  435. (t) => !["1", "2", "7", "8"].includes(t.value)
  436. );
  437. },
  438. },
  439. methods: {
  440. ...mapMutations([]),
  441. //是否显示编辑按钮
  442. showEditBtn(row) {
  443. if (row == null || row == undefined) {
  444. return false;
  445. }
  446. //只能编辑所属机构是自己的
  447. return row.planOfOrgId == this.orgId;
  448. // console.log(row.planOfOrgId,"row.planOfOrgId");
  449. // console.log(this.orgId,"this.orgId");
  450. },
  451. showPublish(row) {
  452. //有父计划且父计划不是使用中状态,不能下发
  453. if (row.parentStatus != 1 && row.parentId > 0) {
  454. return false;
  455. }
  456. //可以下发:本机构创建+状态为草稿、停用的计划
  457. if (
  458. row.planCreateOrgId == this.orgId &&
  459. (row.planStatus == 0 || row.planStatus == 2)
  460. ) {
  461. return true;
  462. }
  463. // if (
  464. // row.planOfOrgId == this.orgId &&
  465. // row.planCreateOrgId != this.orgId &&
  466. // (row.planStatus == 0 || row.planStatus == 2) &&
  467. // row.distributePlanStatus == 0
  468. // ) {
  469. // return true;
  470. // }
  471. return false;
  472. },
  473. showDelete(row) {
  474. //本机构创建的计划,才能删除
  475. return row.planCreateOrgId == this.orgId && row.planOfOrgId == this.orgId;
  476. },
  477. showWithDraw(row) {
  478. //本机构创建是自己+状态为使用中
  479. if (row.planCreateOrgId == this.orgId && row.planStatus == 1) {
  480. return true;
  481. }
  482. // if (
  483. // row.planOfOrgId == this.orgId &&
  484. // row.planCreateOrgId != this.orgId &&
  485. // row.planStatus == 1 &&
  486. // row.distributePlanStatus == 0
  487. // ) {
  488. // return true;
  489. // }
  490. return false;
  491. },
  492. // //已完成下发的计划不显示下发按钮
  493. // checkCanPublish(row) {
  494. // // console.log(row.planStatus,"row.planStatus")
  495. // if (row.planOfOrgType == "1" && row.distribute == 0) {
  496. // return true;
  497. // }
  498. // return false;
  499. // },
  500. // newcheckCanPublish(row) {
  501. // //如果计划所属机构类型为行社并且计划不为进行中并且计划创建机构为当前机构或者
  502. // //计划状态为停用并且不属于子计划并且计划所属机构类型为省联社
  503. // if (
  504. // (row.planOfOrgType == 3 &&
  505. // row.planStatus != 1 &&
  506. // row.planCreateOrgId == this.orgId) ||
  507. // (row.planStatus == 2 && row.parentId != -1 && row.planOfOrgType == 1)
  508. // ) {
  509. // return true;
  510. // }
  511. // return false;
  512. // },
  513. //开始撤回
  514. chhuile(row) {
  515. let msg = "";
  516. if (row.taskHasCompleted != 1) {
  517. msg = "因不存在已完成任务,撤回后将删除所有生成任务?";
  518. } else {
  519. msg = "因存在已完成任务,撤回后下周期起将不再生成任务?";
  520. }
  521. this.$modal
  522. .confirm(msg, "提示")
  523. .then(() => {
  524. // 用户点击了确认按钮
  525. // console.log("执行操作...");
  526. this.loading = true;
  527. api.cheHui(row.id).then((response) => {
  528. this.getList();
  529. this.loading = false;
  530. });
  531. })
  532. .catch(() => {
  533. // 用户点击了取消按钮
  534. // console.log("取消操作...");
  535. });
  536. },
  537. //已下发的显示撤回
  538. // chehui(row) {
  539. // if (row.distribute == 1 && row.planCreateOrgId == this.orgId) {
  540. // return true;
  541. // }
  542. // return false;
  543. // },
  544. sel(selectList, row) {
  545. let msg = "";
  546. if (row.planStatus == 0) {
  547. msg = "请选择下发后立即生成或下周期生成任务。";
  548. this.$refs["DialogThreeState"].show(
  549. msg,
  550. (state) => {
  551. if (state == 0 || state == 1) {
  552. this.distributeInner(selectList, state == 1);
  553. }
  554. },
  555. {
  556. yesText: "立即生成",
  557. noText: "下周期",
  558. cancelText: "取消",
  559. }
  560. );
  561. } else if (row.planStatus == 2) {
  562. this.$modal
  563. .confirm("因存在已完成任务,是否确定从下周期生成任务?")
  564. .then(() => {
  565. this.distributeInner(selectList, false);
  566. });
  567. } else {
  568. this.distributeInner(selectList, false);
  569. }
  570. },
  571. distributeInner(selectList, imme) {
  572. this.loading = true;
  573. api
  574. .distribute(selectList, imme)
  575. .then((response) => {
  576. this.getList();
  577. this.loading = false;
  578. })
  579. .catch(() => {
  580. this.loading = false;
  581. });
  582. },
  583. onHSPlanDistribute(row) {
  584. if (row.planStatus == 0) {
  585. let msg = "请选择下发后立即生成或下周期生成任务。";
  586. this.$refs["DialogThreeState"].show(
  587. msg,
  588. (state) => {
  589. if (state == 0 || state == 1) {
  590. this.distributeHS(row.id, state == 1);
  591. }
  592. },
  593. {
  594. yesText: "立即生成",
  595. noText: "下周期",
  596. cancelText: "取消",
  597. }
  598. );
  599. } else if (row.planStatus == 2) {
  600. this.$modal
  601. .confirm("因存在已完成任务,是否确定从下周期生成任务?")
  602. .then(() => {
  603. this.distributeHS(row.id, false);
  604. });
  605. } else {
  606. this.distributeHS(row.id, false);
  607. }
  608. },
  609. distributeHS(id, immediateEffect) {
  610. this.loading = true;
  611. api
  612. .distributeHS(id, immediateEffect)
  613. .then((response) => {
  614. // console.log(response, "then");
  615. if (response.data == 0) {
  616. this.loading = false;
  617. } else {
  618. this.getList();
  619. this.loading = false;
  620. }
  621. })
  622. .catch((response) => {
  623. // console.log(response, "catch");
  624. this.getList();
  625. this.loading = false;
  626. });
  627. },
  628. showDialogDistribute(row) {
  629. if (row.planOfOrgType == 3) {
  630. this.onHSPlanDistribute(row);
  631. } else {
  632. this.$refs.dialogDistribute.show(row);
  633. }
  634. // this.loading = true;
  635. // api
  636. // .distributeCheHui(row.id)
  637. // .then((response) => {
  638. // // console.log(response, "then");
  639. // if (response.data == 0) {
  640. // this.loading = false;
  641. // this.$refs.dialogDistribute.show(row);
  642. // } else {
  643. // this.getList();
  644. // this.loading = false;
  645. // }
  646. // })
  647. // .catch((response) => {
  648. // // console.log(response, "catch");
  649. // this.getList();
  650. // this.loading = false;
  651. // this.$refs.dialogDistribute.show(row);
  652. // });
  653. },
  654. async getRolesByOrg() {
  655. await allRole().then((res) => {
  656. // console.info(res);
  657. this.resumptionRoles = res.data;
  658. });
  659. },
  660. getList() {
  661. this.loading = true;
  662. this.queryParams.roleList = [];
  663. if (
  664. this.queryParams.resumptionRole != null &&
  665. this.queryParams.resumptionRole != ""
  666. ) {
  667. this.queryParams.roleList.push(this.queryParams.resumptionRole);
  668. }
  669. console.info(this.dict.type);
  670. api
  671. .list(this.queryParams)
  672. .then((response) => {
  673. this.pageData = response.rows;
  674. this.total = response.total;
  675. this.loading = false;
  676. })
  677. .catch(() => {
  678. this.loading = false;
  679. });
  680. },
  681. getDefaultKey(key) {
  682. this.queryParams.orgId = key;
  683. this.getList();
  684. },
  685. handleAdd(id, other = {}) {
  686. this.$refs.editDialog.show(id, other);
  687. },
  688. onEdit(id, other = {}) {
  689. this.$refs.editDialog.show(id, other);
  690. },
  691. onDetail(id) {
  692. this.$refs.detailDialog.show(id);
  693. },
  694. async onDel(row) {
  695. let msg = "";
  696. if (row.planStatus == 0) {
  697. msg = '是否确认删除名称为"' + row.planName + '"的任务?';
  698. } else if (row.planStatus == 1) {
  699. if (row.planCycle == 2) {
  700. msg = "本次删除将强制删除今日所有任务?";
  701. } else {
  702. msg = "本次删除将强制删除当前任务时间及以后所有任务";
  703. }
  704. } else if (row.planStatus == 2) {
  705. if (row.hasTaskCurrentCycle) {
  706. if (row.planCycle == 2) {
  707. msg = "本次删除将强制删除今日所有任务?";
  708. } else {
  709. msg = "本次删除将强制删除当前任务时间及以后所有任务";
  710. }
  711. } else {
  712. msg = '是否确认删除名称为"' + row.planName + '"的任务?';
  713. }
  714. }
  715. this.$modal
  716. .confirm(msg)
  717. .then(() => {
  718. // 用户点击了确认按钮
  719. console.log("执行操作...");
  720. this.loading = true;
  721. api
  722. .del(row.id)
  723. .then(() => {
  724. this.getList();
  725. this.loading = false;
  726. this.$modal.msgSuccess("删除成功");
  727. })
  728. .catch(() => {
  729. this.loading = false;
  730. });
  731. })
  732. .catch(() => {
  733. // 用户点击了取消按钮
  734. console.log("取消操作...");
  735. this.loading = false;
  736. });
  737. },
  738. // 多选框选中数据
  739. handleSelectionChange(selection) {
  740. this.ids = selection.map((item) => item.userId);
  741. this.single = selection.length != 1;
  742. this.multiple = !selection.length;
  743. },
  744. /** 重置按钮操作 */
  745. resetQuery() {
  746. this.resetForm("search");
  747. this.queryParams.orgId = this.orgId;
  748. this.queryParams.checkSub = false;
  749. this.$refs["orgTree"].setCheckSub(this.queryParams.checkSub);
  750. // this.$refs.tree.setCurrentKey(null);
  751. this.getList();
  752. },
  753. //单选框状态改变
  754. checkChange(state) {
  755. this.queryParams.checkSub = state;
  756. this.getList();
  757. },
  758. // 节点单击事件
  759. clickTreeNode(data) {
  760. this.queryParams.orgId = data.id;
  761. this.getList();
  762. },
  763. getStatusLabel(value) {
  764. return getLabel(statusOptions, value);
  765. },
  766. getLabel(options, value) {
  767. return getLabel(options, value);
  768. },
  769. //apimark//
  770. },
  771. mounted() {},
  772. };
  773. </script>
  774. <style lang="scss" scoped>
  775. .brand {
  776. }
  777. </style>