index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  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="defaultKeys"
  9. @checkChange="checkChange"
  10. @click="handleNodeClick"
  11. ></org-tree>
  12. </el-col>
  13. <!--用户数据-->
  14. <el-col :span="20" :xs="24">
  15. <div class="main-right-box">
  16. <!-- 搜索条件 -->
  17. <div class="main-search-box">
  18. <el-form
  19. :model="queryParams"
  20. ref="queryForm"
  21. size="small"
  22. :inline="true"
  23. v-show="showSearch"
  24. >
  25. <el-form-item label="机构名称" prop="name">
  26. <el-input
  27. v-model="queryParams.name"
  28. placeholder="请输入机构名称"
  29. clearable
  30. @keyup.enter.native="handleQuery"
  31. maxlength="50"
  32. @input="inputRestriction"
  33. />
  34. </el-form-item>
  35. <el-form-item label="机构编码" prop="code">
  36. <el-input
  37. v-model="queryParams.code"
  38. placeholder="请输入机构编码"
  39. clearable
  40. @keyup.enter.native="handleQuery"
  41. maxlength="50"
  42. />
  43. </el-form-item>
  44. <el-form-item label="机构类型" prop="type">
  45. <el-select
  46. v-model="queryParams.type"
  47. placeholder="请选择机构类型"
  48. clearable
  49. >
  50. <el-option
  51. v-for="dict in dict.type.sys_org_type"
  52. :key="dict.value"
  53. :label="dict.label"
  54. :value="dict.value"
  55. />
  56. </el-select>
  57. </el-form-item>
  58. <el-form-item label="机构状态" prop="isLock">
  59. <el-select
  60. v-model="queryParams.isLock"
  61. placeholder="请选择机构状态"
  62. clearable
  63. >
  64. <el-option
  65. v-for="dict in dict.type.sys_normal_disable"
  66. :key="dict.value"
  67. :label="dict.label"
  68. :value="dict.value"
  69. />
  70. </el-select>
  71. </el-form-item>
  72. </el-form>
  73. <el-row :gutter="10">
  74. <el-col :span="1.5">
  75. <el-button
  76. type="primary"
  77. icon="el-icon-search"
  78. size="mini"
  79. @click="handleQuery"
  80. >搜索</el-button
  81. >
  82. </el-col>
  83. <el-col :span="1.5">
  84. <el-button
  85. type="primary"
  86. icon="el-icon-refresh"
  87. size="mini"
  88. @click="resetQuery"
  89. >重置</el-button
  90. >
  91. </el-col>
  92. <el-col :span="1.5">
  93. <el-button
  94. type="primary"
  95. icon="el-icon-plus"
  96. size="mini"
  97. @click="handleAdd"
  98. v-hasPermi="['system:dept:add']"
  99. >新增机构</el-button
  100. >
  101. </el-col>
  102. <right-toolbar
  103. :showSearch.sync="showSearch"
  104. @queryTable="getList"
  105. ></right-toolbar>
  106. </el-row>
  107. </div>
  108. <el-table
  109. border
  110. height="646"
  111. size="small"
  112. v-loading="loading"
  113. :data="deptList"
  114. >
  115. <el-table-column label="序号" align="center" width="80">
  116. <template v-slot:default="scope">
  117. <span v-text="getPageIndex(scope.$index)"> </span>
  118. </template>
  119. </el-table-column>
  120. <el-table-column
  121. v-if="false"
  122. prop="name"
  123. label="机构名称"
  124. ></el-table-column>
  125. <el-table-column
  126. align="center"
  127. prop="shortName"
  128. label="机构简称"
  129. ></el-table-column>
  130. <el-table-column align="center" prop="type" label="机构类型">
  131. <template v-slot="scope">
  132. <dict-tag
  133. :options="dict.type.sys_org_type"
  134. :value="scope.row.type"
  135. />
  136. </template>
  137. </el-table-column>
  138. <el-table-column
  139. prop="code"
  140. align="center"
  141. label="机构编码"
  142. ></el-table-column>
  143. <el-table-column prop="isLock" align="center" label="机构状态">
  144. <template v-slot="scope">
  145. <dict-tag
  146. :options="dict.type.sys_normal_disable"
  147. :value="scope.row.isLock"
  148. />
  149. </template>
  150. </el-table-column>
  151. <el-table-column
  152. align="center"
  153. prop="sort"
  154. label="排序"
  155. ></el-table-column>
  156. <el-table-column
  157. v-if="false"
  158. align="center"
  159. prop="weatherCityCode"
  160. label="城市天气区域"
  161. >
  162. <template slot-scope="r">
  163. <span>{{ getCode(r.row.weatherCityCode) }}</span>
  164. </template>
  165. </el-table-column>
  166. <!-- <el-table-column prop="address" label="地址"></el-table-column> -->
  167. <!-- <el-table-column label="负责人" align="center">
  168. <template v-slot:default="scope">
  169. <span v-text="scope.row.manager"></span>-
  170. <span v-text="scope.row.managerPhone"> </span>
  171. </template>
  172. </el-table-column> -->
  173. <el-table-column
  174. v-if="false"
  175. align="center"
  176. prop="manager"
  177. label="负责人"
  178. ></el-table-column>
  179. <el-table-column
  180. v-if="false"
  181. align="center"
  182. prop="managerPhone"
  183. label="负责人电话"
  184. ></el-table-column>
  185. <el-table-column
  186. label="操作"
  187. align="left"
  188. width="280"
  189. class-name="small-padding fixed-width"
  190. >
  191. <template slot-scope="scope">
  192. <!-- <router-link
  193. :to="'/system/dept-extend/extend/' + scope.row.id"
  194. class="link-type"
  195. > -->
  196. <el-button
  197. v-if="
  198. scope.row.type == 4 ||
  199. scope.row.type == 10 ||
  200. scope.row.type == 5
  201. "
  202. size="mini"
  203. type="text"
  204. icon="el-icon-plus"
  205. v-hasPermi="['system:dept:extend']"
  206. @click="handleReplenish(scope.row.id)"
  207. >补充信息</el-button
  208. >
  209. <el-button
  210. size="mini"
  211. type="text"
  212. icon="el-icon-edit-outline"
  213. @click="handleUpdate(scope.row)"
  214. v-hasPermi="['system:dept:edit']"
  215. >编辑</el-button
  216. >
  217. <el-button
  218. v-if="!scope.row.source"
  219. size="mini"
  220. type="text"
  221. icon="el-icon-delete"
  222. @click="handleDelete(scope.row)"
  223. v-hasPermi="['system:dept:remove']"
  224. >删除</el-button
  225. >
  226. </template>
  227. </el-table-column>
  228. </el-table>
  229. <pagination
  230. :total="total"
  231. :page.sync="queryParams.pageNum"
  232. :limit.sync="queryParams.pageSize"
  233. @pagination="getList"
  234. />
  235. </div>
  236. </el-col>
  237. </el-row>
  238. <!-- 添加或修改机构对话框 -->
  239. <DialogCom
  240. :title="title"
  241. :visible.sync="open"
  242. width="700px"
  243. @close="closeHandler"
  244. append-to-body
  245. >
  246. <el-form ref="form" :model="form" :rules="rules" label-width="90px">
  247. <el-row>
  248. <el-col :span="24">
  249. <el-form-item
  250. v-if="this.pId != -1 && !form.source"
  251. label="所属机构"
  252. prop="parentId"
  253. >
  254. <treeselect
  255. noResultsText="暂无符合条件的数据"
  256. clearValueText="清除"
  257. v-model="form.parentId"
  258. :options="deptOptions2"
  259. :normalizer="tenantIdnormalizer"
  260. placeholder="请选择所属机构"
  261. />
  262. </el-form-item>
  263. </el-col>
  264. </el-row>
  265. <el-row>
  266. <el-col :span="24">
  267. <el-form-item label="机构名称" prop="name">
  268. <el-input
  269. :maxlength="50"
  270. @input="editRestriction"
  271. v-model="form.name"
  272. placeholder="请输入机构名称"
  273. :disabled="form.source == 1"
  274. />
  275. </el-form-item>
  276. </el-col>
  277. <el-col :span="24">
  278. <el-form-item label="机构简称" prop="shortName">
  279. <el-input
  280. v-model="form.shortName"
  281. :maxlength="50"
  282. @input="shorteditRestriction"
  283. placeholder="请输入机构简称"
  284. :disabled="form.source == 1"
  285. />
  286. </el-form-item>
  287. </el-col>
  288. </el-row>
  289. <el-row>
  290. <el-col :span="12">
  291. <el-form-item label="机构类型" prop="type">
  292. <el-select
  293. prop="type"
  294. label="机构类型"
  295. v-model="form.type"
  296. placeholder="请选择机构类型"
  297. style="width: 100%"
  298. clearable
  299. >
  300. <el-option
  301. v-for="dict in dict.type.sys_org_type"
  302. :key="dict.value"
  303. :label="dict.label"
  304. :value="dict.value"
  305. v-show="
  306. addIndex == 2 ||
  307. (addIndex == 3 && dict.value == 5) ||
  308. (addIndex == 3 && dict.value == 10) ||
  309. (addIndex == 3 && dict.value == 6) ||
  310. (addIndex == 3 && dict.value == 7)
  311. "
  312. />
  313. </el-select>
  314. </el-form-item>
  315. </el-col>
  316. <el-col :span="12">
  317. <el-form-item label="负责人" prop="manager" v-if="false">
  318. <el-input
  319. v-model="form.manager"
  320. placeholder="请输入负责人"
  321. maxlength="20"
  322. :disabled="form.source == 1"
  323. />
  324. </el-form-item>
  325. </el-col>
  326. <el-col :span="12">
  327. <el-form-item label="排序号" prop="sort">
  328. <el-input-number
  329. v-model="form.sort"
  330. controls-position="right"
  331. style="width: 100%"
  332. :min="0"
  333. :max="999999"
  334. />
  335. </el-form-item>
  336. </el-col>
  337. </el-row>
  338. <el-row>
  339. <el-col :span="12" v-if="false">
  340. <el-form-item label="负责人电话" prop="managerPhone">
  341. <el-input
  342. v-model="form.managerPhone"
  343. placeholder="请输入负责人电话"
  344. maxlength="16"
  345. :disabled="form.source == 1"
  346. />
  347. </el-form-item>
  348. </el-col>
  349. </el-row>
  350. <el-row>
  351. <el-col :span="12" v-if="false">
  352. <el-form-item label="邮箱" prop="email">
  353. <el-input
  354. v-model="form.email"
  355. placeholder="请输入邮箱"
  356. maxlength="50"
  357. />
  358. </el-form-item>
  359. </el-col>
  360. <el-col :span="12">
  361. <el-form-item label="机构状态" prop="isLock">
  362. <el-radio-group v-model="form.isLock">
  363. <el-radio
  364. v-for="dict in dict.type.sys_normal_disable"
  365. :key="dict.value"
  366. :label="dict.value"
  367. :disabled="form.source == 1"
  368. >{{ dict.label }}</el-radio
  369. >
  370. </el-radio-group>
  371. </el-form-item>
  372. </el-col>
  373. </el-row>
  374. </el-form>
  375. <div slot="footer" class="dialog-footer">
  376. <el-button
  377. v-if="title == '编辑机构信息'"
  378. type="primary"
  379. @click="changeSubmitForm"
  380. >确 定</el-button
  381. >
  382. <el-button
  383. v-if="title == '新增机构信息'"
  384. type="primary"
  385. @click="addSubmitForm"
  386. >确 定</el-button
  387. >
  388. <el-button @click="cancel">取 消</el-button>
  389. </div>
  390. </DialogCom>
  391. <DialogEdit ref="dialogEdit" @success="refs"></DialogEdit>
  392. </div>
  393. </template>
  394. <script>
  395. import {
  396. listDept,
  397. getDept,
  398. delDept,
  399. addDept,
  400. updateDept,
  401. listDeptExcludeChild,
  402. } from "@/api/system/dept";
  403. import { deptTreeSelect } from "@/api/system/public";
  404. import Treeselect from "@riophae/vue-treeselect";
  405. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  406. import DialogEdit from "@/views/system/dept/dialog.edit.vue";
  407. import { findAreaList } from "@/api/core/weather";
  408. import OrgTree from "@/components/orgTree";
  409. export default {
  410. name: "Dept",
  411. dicts: ["sys_normal_disable", "sys_org_type"],
  412. components: { Treeselect, DialogEdit, OrgTree },
  413. data() {
  414. return {
  415. // 遮罩层
  416. loading: true,
  417. // 显示搜索条件
  418. showSearch: true,
  419. // 表格树数据
  420. deptList: [],
  421. // 总条数
  422. total: 0,
  423. //新增机构打开标识
  424. addIndex: 1,
  425. // 机构树选项
  426. deptOptions: [],
  427. deptOptions2: [],
  428. pId: 0,
  429. // 弹出层标题
  430. title: "",
  431. // 是否显示弹出层
  432. open: false,
  433. // 是否展开,默认全部展开
  434. isExpandAll: false,
  435. // 重新渲染表格状态
  436. refreshTable: true,
  437. // 机构名称
  438. deptName: undefined,
  439. //是否关联下级
  440. checked: false,
  441. defaultProps: {
  442. children: "children",
  443. label: "shortName",
  444. },
  445. // 查询参数
  446. queryParams: {
  447. pageNum: 1,
  448. pageSize: 10,
  449. name: undefined,
  450. status: undefined,
  451. parentId: undefined,
  452. checkSub: true,
  453. type: null,
  454. code: null,
  455. },
  456. // 表单参数
  457. form: {},
  458. // 表单校验
  459. rules: {
  460. parentId: [
  461. { required: true, message: "上级机构不能为空", trigger: "blur" },
  462. ],
  463. name: [
  464. { required: true, message: "机构名称不能为空", trigger: "blur" },
  465. ],
  466. type: [
  467. { required: true, message: "机构类型不能为空", trigger: "blur" },
  468. ],
  469. orderNum: [
  470. { required: true, message: "显示排序不能为空", trigger: "blur" },
  471. ],
  472. isLock: [{ required: true, message: "状态不能为空", trigger: "blur" }],
  473. email: [
  474. {
  475. type: "email",
  476. message: "请输入正确的邮箱地址",
  477. trigger: ["blur", "change"],
  478. },
  479. ],
  480. // 同步过来的机构存在座机号的情况
  481. // phone: [
  482. // {
  483. // pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
  484. // message: "请输入正确的手机号码",
  485. // trigger: "blur",
  486. // },
  487. // ],
  488. },
  489. //默认选中节点
  490. defaultKeys: [],
  491. areaList: [],
  492. };
  493. },
  494. computed: {
  495. isShow() {
  496. if (this.pId == null && this.pId != -1) {
  497. return true;
  498. }
  499. },
  500. },
  501. created() {
  502. this.getDeptTree();
  503. this.getList();
  504. this.getAreaList();
  505. },
  506. methods: {
  507. inputRestriction() {
  508. // 限制只允许输入汉字、英文和数字
  509. this.queryParams.name = this.queryParams.name.replace(
  510. /[^\u4e00-\u9fa5a-zA-Z0-9]/g,
  511. ""
  512. );
  513. },
  514. editRestriction() {
  515. // 限制只允许输入汉字、英文和数字
  516. this.form.name = this.form.name.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, "");
  517. },
  518. shorteditRestriction() {
  519. // 限制只允许输入汉字、英文和数字
  520. this.form.shortName = this.form.shortName.replace(
  521. /[^\u4e00-\u9fa5a-zA-Z0-9]/g,
  522. ""
  523. );
  524. },
  525. getCode(item) {
  526. if (item != null && item.length > 0) {
  527. let area = this.areaList.find((v) => v.key === item);
  528. if (area) {
  529. return area.value;
  530. } else {
  531. return "";
  532. }
  533. } else {
  534. return "";
  535. }
  536. },
  537. closeHandler() {
  538. // alert(11111)
  539. },
  540. getPageIndex($index) {
  541. //表格序号
  542. return (
  543. (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
  544. );
  545. },
  546. //自定义数据
  547. tenantIdnormalizer(node, instanceId) {
  548. if (node.children && !node.children.length) {
  549. delete node.children;
  550. }
  551. return {
  552. id: node.id,
  553. label: node.shortName,
  554. children: node.children,
  555. };
  556. },
  557. /** 下穿状态改变*/
  558. changeCheckBox() {
  559. this.getList();
  560. },
  561. /** 查询机构下拉树结构 */
  562. getDeptTree() {
  563. deptTreeSelect().then((response) => {
  564. this.deptOptions = response.data;
  565. this.defaultKeys.push(response.data[0].id);
  566. this.queryParams.parentId = response.data[0].id;
  567. this.handleQuery();
  568. });
  569. },
  570. getAreaList() {
  571. findAreaList({}).then((response) => {
  572. this.areaList = response.data;
  573. });
  574. },
  575. // 筛选节点
  576. filterNode(value, data) {
  577. if (!value) return true;
  578. return data.name.indexOf(value) !== -1;
  579. },
  580. // 节点单击事件
  581. handleNodeClick(data) {
  582. this.queryParams.parentId = data.id;
  583. this.handleQuery();
  584. },
  585. //单选框状态改变
  586. checkChange(state) {
  587. this.queryParams.checkSub = state;
  588. this.handleQuery();
  589. },
  590. /** 查询机构列表 */
  591. getList() {
  592. this.loading = true;
  593. listDept(this.queryParams).then((response) => {
  594. this.deptList = response.rows;
  595. this.total = response.total;
  596. this.loading = false;
  597. this.queryParams.pageNum = 1;
  598. });
  599. },
  600. /** 转换机构数据结构 */
  601. // normalizer(node) {
  602. // if (node.children && !node.children.length) {
  603. // delete node.children;
  604. // }
  605. // return {
  606. // id: node.id,
  607. // label: node.name,
  608. // children: node.children,
  609. // };
  610. // },
  611. // 取消按钮
  612. cancel() {
  613. this.open = false;
  614. this.reset();
  615. // this.getList();
  616. // this.getDeptTree();
  617. },
  618. // 表单重置
  619. reset() {
  620. this.form = {
  621. deptId: undefined,
  622. parentId: undefined,
  623. deptName: undefined,
  624. orderNum: undefined,
  625. leader: undefined,
  626. phone: undefined,
  627. email: undefined,
  628. status: "0",
  629. isLock: "0",
  630. type: null,
  631. };
  632. this.resetForm("form");
  633. },
  634. /** 搜索按钮操作 */
  635. handleQuery() {
  636. this.getList();
  637. },
  638. /** 重置按钮操作 */
  639. resetQuery() {
  640. this.resetForm("queryForm");
  641. // this.
  642. this.getList();
  643. },
  644. /** 新增按钮操作 */
  645. async handleAdd() {
  646. // console.log(this.queryParams.parentId, "this.queryParams.parentId");
  647. // console.log(this.form.parentId, "this.form.parentId");
  648. this.addIndex = 3;
  649. this.reset();
  650. if (this.queryParams.parentId != undefined) {
  651. if (this.pId != -1) {
  652. await deptTreeSelect().then((response) => {
  653. this.deptOptions2 = response.data;
  654. this.defaultKeys.push(response.data[0].id);
  655. });
  656. }
  657. this.form.parentId = this.queryParams.parentId;
  658. this.open = true;
  659. this.title = "新增机构信息";
  660. }
  661. },
  662. /** 展开/折叠操作 */
  663. toggleExpandAll() {
  664. this.refreshTable = false;
  665. this.isExpandAll = !this.isExpandAll;
  666. this.$nextTick(() => {
  667. this.refreshTable = true;
  668. });
  669. },
  670. handleReplenish(id) {
  671. let link = `/system/dept-extend/extend/${id}`;
  672. this.$router.push(link);
  673. },
  674. /** 修改按钮操作 */
  675. async handleUpdate(row) {
  676. this.addIndex = 2;
  677. this.reset();
  678. getDept(row.id).then((response) => {
  679. this.form = response.data;
  680. this.pId = response.data.parentId;
  681. });
  682. if (this.pId != -1) {
  683. this.pId = row.parentId;
  684. this.form.parentId = row.parentId;
  685. console.log(this.form, "this.form");
  686. console.log(this.form.parentId, "this.pId");
  687. await deptTreeSelect({ removeId: row.parentId, id: row.id }).then(
  688. (response) => {
  689. this.deptOptions2 = response.data;
  690. // this.defaultKeys.push(response.data[0].id);
  691. this.open = true;
  692. this.title = "编辑机构信息";
  693. }
  694. );
  695. }
  696. },
  697. /** 提交按钮 */
  698. changeSubmitForm() {
  699. this.addIndex = 2;
  700. this.$refs["form"].validate((valid) => {
  701. if (valid) {
  702. console.log(this.queryParams, "queryParams");
  703. updateDept(this.form).then((response) => {
  704. this.$modal.msgSuccess("处理成功");
  705. this.open = false;
  706. this.getList();
  707. this.$store.dispatch("getOrgTree");
  708. this.$store.dispatch("getDepTree");
  709. this.$store.dispatch("getBusinessTree");
  710. this.$store.dispatch("getWholeTree");
  711. // this.getDeptTree();
  712. });
  713. }
  714. });
  715. },
  716. addSubmitForm() {
  717. this.addIndex = 3;
  718. this.$refs["form"].validate((valid) => {
  719. if (valid) {
  720. addDept(this.form).then((response) => {
  721. this.$modal.msgSuccess("处理成功");
  722. this.open = false;
  723. this.getList();
  724. this.getDeptTree();
  725. this.$store.dispatch("getOrgTree");
  726. this.$store.dispatch("getDepTree");
  727. this.$store.dispatch("getBusinessTree");
  728. this.$store.dispatch("getWholeTree");
  729. });
  730. }
  731. });
  732. },
  733. /** 删除按钮操作 */
  734. handleDelete(row) {
  735. this.$modal
  736. .confirm('是否确认删除名称为"' + row.name + '"的数据项?')
  737. .then(function () {
  738. return delDept(row.id);
  739. })
  740. .then(() => {
  741. this.getList();
  742. this.$modal.msgSuccess("删除成功");
  743. this.getDeptTree();
  744. })
  745. .catch(() => {});
  746. },
  747. // 多选框选中数据
  748. handleSelectionChange(selection) {
  749. this.ids = selection.map((item) => item.userId);
  750. this.single = selection.length != 1;
  751. this.multiple = !selection.length;
  752. },
  753. showDialogEdit(row) {
  754. this.$refs.dialogEdit.show(row);
  755. },
  756. refs() {
  757. this.getList();
  758. this.getDeptTree();
  759. },
  760. },
  761. watch: {
  762. // 根据名称筛选机构树
  763. deptName(val) {
  764. this.$refs.tree.filter(val);
  765. },
  766. },
  767. };
  768. </script>
  769. <style lang="scss" scoped>
  770. .status_no_class {
  771. color: red;
  772. }
  773. </style>