You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

839 lines
26 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <div class="box">
  3. <div style="position: relative">
  4. <div class="middlebox">
  5. <div class="contenttitle">
  6. 基础资料 /
  7. <span class="contenttitleBold">危急值</span>
  8. </div>
  9. <div class="seachinput">
  10. <el-select
  11. v-model="department"
  12. placeholder="请选择危急值"
  13. filterable
  14. :filter-method="remoteMethodes"
  15. default-first-option
  16. @change="quckDepartments"
  17. clearable
  18. size="small"
  19. >
  20. <el-option
  21. v-for="item in quckDepartment"
  22. :key="item.id"
  23. :label="item.displayName"
  24. :value="item.id"
  25. >
  26. </el-option>
  27. </el-select>
  28. </div>
  29. </div>
  30. <div style="display: flex; margin-top: 7px">
  31. <div
  32. :style="
  33. 'width: 208px;overflow: scroll;height:' +
  34. (window.pageHeight < 600 ? 480 : window.pageHeight - 100) +
  35. 'px;background-color: #fff; border-radius: 8px'
  36. "
  37. >
  38. <div style="margin-top: 10px">
  39. <el-tree
  40. :data="criticalFollowValueTypeId"
  41. :props="treeprops"
  42. @node-click="treeclick"
  43. node-key="criticalFollowValueTypeId"
  44. ref="itemType"
  45. highlight-current
  46. auto-expand-parent
  47. >
  48. <span class="custom-tree-node" slot-scope="{ node, data }">
  49. <div>
  50. <span class="treeicons">
  51. <!-- <i
  52. class="el-icon-document-remove"
  53. v-if="data.parentId == null"
  54. ></i> -->
  55. <img
  56. style="width: 20px; height: 20px; vertical-align: sub"
  57. src="@/assets/images/order.png"
  58. v-if="!data.parentId"
  59. />
  60. </span>
  61. <span :class="!data.parentId ? 'maxtitle' : 'mintitle'">{{
  62. node.label
  63. }}</span>
  64. </div>
  65. </span>
  66. </el-tree>
  67. </div>
  68. </div>
  69. <div style="display: block">
  70. <div style="margin-left: 15px; display: flex">
  71. <div :style="'width:' +
  72. (window.pageWidth - 200 - 110 - 50 - 14) +
  73. 'px;padding: 15px;background-color: #fff;border-radius: 8px;'
  74. ">
  75. <div>
  76. <el-table
  77. :data="tableData"
  78. :height="
  79. window.pageHeight < 600 ? 450 : window.pageHeight - 130
  80. "
  81. row-key="id"
  82. class="el-table__body-wrapper tbody"
  83. @row-click="rowclick"
  84. highlight-current-row
  85. ref="tableData"
  86. >
  87. <el-table-column prop="id" label="编号" width="300">
  88. </el-table-column>
  89. <el-table-column prop="displayName" label="名称" width="">
  90. </el-table-column>
  91. <el-table-column
  92. prop="criticalFollowValueTypeId"
  93. label="危急值类别"
  94. width=""
  95. >
  96. <template slot-scope="scope">
  97. <div>
  98. {{
  99. getTreeName(
  100. criticalFollowValueTypeId,
  101. scope.row.criticalFollowValueTypeId
  102. )
  103. }}
  104. </div>
  105. </template>
  106. </el-table-column>
  107. <el-table-column
  108. prop="criticalFollowValueFlag"
  109. label="危急随访值标志"
  110. width="120"
  111. >
  112. <template slot-scope="scope">
  113. <div>
  114. {{
  115. dddw(
  116. criticalFollowValueFlag,
  117. "id",
  118. scope.row.criticalFollowValueFlag,
  119. "displayName"
  120. )
  121. }}
  122. </div>
  123. </template>
  124. </el-table-column>
  125. <el-table-column prop="creatorName" label="创建者" width="">
  126. </el-table-column>
  127. <el-table-column
  128. prop="creationTime"
  129. label="创建时间"
  130. width="200"
  131. >
  132. <template slot-scope="scope">
  133. {{ scope.row.creationTime | dateFormat }}
  134. </template>
  135. </el-table-column>
  136. <el-table-column
  137. prop="lastModifierName"
  138. label="修改者"
  139. width=""
  140. >
  141. </el-table-column>
  142. <el-table-column
  143. prop="lastModificationTime"
  144. label="修改时间"
  145. width="200"
  146. >
  147. <template slot-scope="scope">
  148. {{ scope.row.lastModificationTime | dateFormat }}
  149. </template>
  150. </el-table-column>
  151. <el-table-column label="操作" align="center">
  152. <template>
  153. <el-tag
  154. class="move"
  155. style="
  156. cursor: move;
  157. background-color: rgb(245, 245, 245);
  158. border: none;
  159. "
  160. draggable="true"
  161. >
  162. <i
  163. class="el-icon-d-caret"
  164. style="
  165. width: 1rem;
  166. height: 1rem;
  167. color: rgb(113, 113, 113);
  168. "
  169. ></i>
  170. </el-tag>
  171. </template>
  172. </el-table-column>
  173. </el-table>
  174. </div>
  175. </div>
  176. <!-- 按钮区域 -->
  177. <div style="margin-left: 10px">
  178. <el-button type="" @click="add" class="commonbutton"
  179. >新增</el-button
  180. >
  181. <div style="margin-top: 10px">
  182. <el-button type="" @click="editpopup" class="commonbutton"
  183. >编辑</el-button
  184. >
  185. </div>
  186. <div style="margin-top: 10px">
  187. <el-button type="" @click="delsrts" class="deleteButton"
  188. >删除</el-button
  189. >
  190. </div>
  191. <div style="margin-top: 10px">
  192. <el-button type="" @click="topping" class="commonbutton"
  193. >置顶</el-button
  194. >
  195. </div>
  196. <div style="margin-top: 10px">
  197. <el-button type="" @click="toppings" class="commonbutton"
  198. >置底</el-button
  199. >
  200. </div>
  201. <div style="margin-top: 10px">
  202. <el-button
  203. type=""
  204. :disabled="isshow"
  205. @click="assertion"
  206. class="commonbutton"
  207. >排序</el-button
  208. >
  209. </div>
  210. <div style="margin-top: 10px">
  211. <el-button
  212. type=""
  213. :disabled="isshow"
  214. @click="cancellation"
  215. class="commonbutton"
  216. >取消</el-button
  217. >
  218. </div>
  219. </div>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. <!-- 新增或者编辑弹框 -->
  225. <el-dialog
  226. :title="title == 1 ? '新增' : '编辑'"
  227. :visible.sync="dialogVisible"
  228. width="75%"
  229. :close-on-click-modal="false"
  230. >
  231. <el-form ref="form" :model="form" label-width="110px">
  232. <el-row>
  233. <el-col :span="9">
  234. <el-form-item label="编号">
  235. <el-input
  236. v-model="form.id"
  237. style="width: 90%"
  238. disabled
  239. size="small"
  240. ></el-input>
  241. </el-form-item>
  242. </el-col>
  243. <el-col :span="7">
  244. <el-form-item label="名称">
  245. <el-input
  246. ref="refinput"
  247. v-model="form.displayName"
  248. style="width: 80%"
  249. size="small"
  250. ></el-input>
  251. </el-form-item>
  252. </el-col>
  253. <el-col :span="8">
  254. <el-form-item label="危急值类别" prop="criticalFollowValueTypeId">
  255. <el-cascader
  256. v-model="form.criticalFollowValueTypeId"
  257. :options="criticalFollowValueTypeId"
  258. popper-class="example"
  259. ref="criticalFollowValueTypeId"
  260. @change="onchange"
  261. :props="{
  262. value: 'criticalFollowValueTypeId',
  263. label: 'displayName',
  264. children: 'treeChildren',
  265. checkStrictly: true,
  266. expandTrigger: 'hover',
  267. }"
  268. size="small"
  269. ></el-cascader>
  270. <!-- <el-select
  271. v-model="form.itemTypeId"
  272. placeholder="请选择"
  273. style="width: 100%"
  274. >
  275. <el-option
  276. v-for="item in itemTypeId"
  277. :key="item.id"
  278. :label="item.displayName"
  279. :value="item.id"
  280. >
  281. </el-option>
  282. </el-select> -->
  283. </el-form-item>
  284. </el-col>
  285. </el-row>
  286. <el-row>
  287. <el-col :span="8">
  288. <el-form-item label="危急随访值标志">
  289. <el-select
  290. v-model="form.criticalFollowValueFlag"
  291. placeholder="危急随访值标志"
  292. size="small"
  293. >
  294. <el-option
  295. v-for="item in criticalFollowValueFlag"
  296. :key="item.id"
  297. :label="item.displayName"
  298. :value="item.id"
  299. ></el-option>
  300. </el-select>
  301. </el-form-item>
  302. </el-col>
  303. </el-row>
  304. <el-row>
  305. <el-divider></el-divider>
  306. <el-col :span="4" style="margin-left: 15px">
  307. <el-form-item label="创建者">
  308. <el-input
  309. v-model="form.creatorName"
  310. disabled
  311. size="small"
  312. ></el-input>
  313. </el-form-item>
  314. </el-col>
  315. <el-col :span="6">
  316. <el-form-item label="创建时间">
  317. <el-input
  318. :value="form.creationTime | dateFormat"
  319. disabled
  320. style="width: 95%"
  321. size="small"
  322. ></el-input>
  323. </el-form-item>
  324. </el-col>
  325. <el-col :span="4">
  326. <el-form-item label="修改者">
  327. <el-input
  328. v-model="form.lastModifierName"
  329. disabled
  330. size="small"
  331. ></el-input>
  332. </el-form-item>
  333. </el-col>
  334. <el-col :span="6">
  335. <el-form-item label="修改时间">
  336. <el-input
  337. :value="form.lastModificationTime | dateFormat"
  338. disabled
  339. style="width: 95%"
  340. size="small"
  341. ></el-input>
  342. </el-form-item>
  343. </el-col>
  344. </el-row>
  345. </el-form>
  346. <span slot="footer" class="dialog-footer">
  347. <el-button @click="dialogVisible = false" class="difference"
  348. > </el-button
  349. >
  350. <el-button type="primary" @click="addoredit" class="commonbutton"
  351. > </el-button
  352. >
  353. </span>
  354. </el-dialog>
  355. </div>
  356. </template>
  357. <script>
  358. import { rowDrop, assertions } from "@/components/publicjs/public";
  359. import Sortable from "sortablejs";
  360. import { getapi, postapi, putapi } from "@/api/api";
  361. import { mapState } from "vuex";
  362. import { dddw } from "../../utlis/proFunc";
  363. import {
  364. physicallist,
  365. medicalconclusionlist,
  366. addconclusion,
  367. quersmedicalid,
  368. updateconlus,
  369. bottomtops,
  370. conlusiondraganddrop,
  371. tijiandetid,
  372. diagnosticediting,
  373. xiugaijielun,
  374. conclusionacquisition,
  375. } from "../../request/systemapi";
  376. import { criticalFollowValueType } from "@/request/commonapi";
  377. export default {
  378. data() {
  379. return {
  380. isshow: true,
  381. dialogVisible: false,
  382. form: {
  383. displayName: "",
  384. criticalFollowValueTypeId: "",
  385. criticalFollowValueFlag: "",
  386. },
  387. Selectacategory: [],
  388. Selectvalue: "",
  389. selars: "",
  390. value: "",
  391. criticalFollowValueTypeId: [],
  392. criticalFollowValueFlag: [
  393. {
  394. id: "0",
  395. displayName: "危急值",
  396. },
  397. {
  398. id: "1",
  399. displayName: "随访值",
  400. },
  401. ],
  402. title: 1,
  403. pages: {
  404. TypeId: "",
  405. SkipCount: 0,
  406. MaxResultCount: 100,
  407. Sorting: "displayOrder desc",
  408. },
  409. page: {
  410. Filter: "",
  411. SkipCount: 0,
  412. MaxResultCount: 100,
  413. Sorting: "displayOrder desc",
  414. },
  415. tableData: [],
  416. initTableData: [],
  417. item: {},
  418. curRow: {},
  419. treeprops: {
  420. label: "displayName",
  421. value: "id",
  422. children: "treeChildren",
  423. },
  424. criticalFollowTypeId:"",
  425. department:"",
  426. quckDepartment:""
  427. };
  428. },
  429. created() {
  430. this.getlist();
  431. },
  432. computed: {
  433. ...mapState(["window"]),
  434. },
  435. mounted() {
  436. this.rowDrop();
  437. this.typeid();
  438. },
  439. methods: {
  440. dddw,
  441. treeclick(data) {
  442. if(data){
  443. this.criticalFollowTypeId = data.criticalFollowValueTypeId;
  444. }
  445. postapi("/api/app/CriticalFollowValue/GetList",{
  446. criticalFollowValueTypeId:this.criticalFollowTypeId
  447. }).then((res) => {
  448. if (res.code != -1) {
  449. this.tableData = res.data;
  450. }
  451. });
  452. },
  453. remoteMethodes(keyWords) {
  454. if (keyWords) {
  455. this.quckDepartment = [];
  456. this.initTableData.forEach((item) => {
  457. if (
  458. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
  459. -1
  460. // ||
  461. // item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  462. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  463. ) {
  464. this.quckDepartment.push(item);
  465. }
  466. });
  467. } else {
  468. this.quckDepartment = deepCopy(this.initTableData);
  469. }
  470. },
  471. quckDepartments(e) {
  472. if (e) {
  473. let currentKey = "";
  474. this.quckDepartment.forEach((item) => {
  475. if (e == item.id) {
  476. currentKey = item.criticalFollowValueTypeId;
  477. this.initItemTypeId = item.criticalFollowValueTypeId;
  478. }
  479. });
  480. this.$refs["itemType"].setCurrentKey(currentKey);
  481. let selected = this.$refs["itemType"].getCurrentNode();
  482. if (
  483. this.$refs["itemType"].getNode(selected) &&
  484. this.$refs["itemType"].getNode(selected).parent
  485. ) {
  486. this.expandParents(this.$refs["itemType"].getNode(selected).parent);
  487. }
  488. postapi("/api/app/CriticalFollowValue/GetList",{
  489. criticalFollowValueTypeId:currentKey
  490. }).then((res) => {
  491. if (res.code != -1) {
  492. this.tableData = res.data;
  493. this.tableData.forEach((item, index) => {
  494. if (e == item.id) {
  495. this.$refs["tableData"].setCurrentRow(item);
  496. this.rowclick(item);
  497. this.tableScrollToRow(this.$refs.tableData, index);
  498. this.searchup(item, index)
  499. }
  500. });
  501. }
  502. });
  503. } else {
  504. this.remoteMethodes();
  505. }
  506. },
  507. tableScrollToRow(tableElement, rowIndex) {
  508. let theTableRows = tableElement.bodyWrapper.querySelectorAll(
  509. ".el-table__body tbody .el-table__row"
  510. );
  511. let scrollTop = 0;
  512. for (let i = 0; i < theTableRows.length; i++) {
  513. if (i === rowIndex) {
  514. break;
  515. }
  516. scrollTop += theTableRows[i].offsetHeight;
  517. }
  518. tableElement.bodyWrapper.scrollTop = scrollTop;
  519. },
  520. searchup(data, index) {
  521. this.$nextTick(() => {
  522. if (index == 0) {
  523. index = 1
  524. }
  525. const targetTop = this.$refs["tableData"].$el.querySelectorAll('.el-table__body tr')[index - 1].getBoundingClientRect().top
  526. const containerTop = this.$refs["tableData"].$el.querySelector('.el-table__body').getBoundingClientRect().top
  527. const scrollParent = this.$refs["tableData"].$el.querySelector('.el-table__body-wrapper')
  528. scrollParent.scrollTop = targetTop - containerTop
  529. })
  530. },
  531. expandParents(node) {
  532. node.expanded = true;
  533. if (node.parent) {
  534. this.expandParents(node.parent);
  535. }
  536. },
  537. getTreeName(list, id) {
  538. for (let i = 0; i < list.length; i++) {
  539. if (list[i].criticalFollowValueTypeId === id) {
  540. return list[i].displayName;
  541. } else if (list[i].treeChildren && list[i].treeChildren.length > 0) {
  542. let res = this.getTreeName(list[i].treeChildren, id);
  543. if (res) {
  544. return res;
  545. }
  546. }
  547. }
  548. },
  549. typeid() {
  550. criticalFollowValueType().then((res) => {
  551. if (res.code != -1) {
  552. this.criticalFollowValueTypeId = res.data;
  553. this.criticalFollowValueTypeId = this.formatData(
  554. this.criticalFollowValueTypeId
  555. );
  556. console.log(this.criticalFollowValueTypeId);
  557. }
  558. });
  559. },
  560. formatData(dataList) {
  561. for (let i = 0; i < dataList.length; i++) {
  562. if (dataList[i].treeChildren.length < 1) {
  563. dataList[i].treeChildren = undefined;
  564. } else {
  565. this.formatData(dataList[i].treeChildren);
  566. }
  567. }
  568. return dataList;
  569. },
  570. onchange(v) {
  571. if (v.length > 1) {
  572. this.form.criticalFollowValueTypeId =
  573. this.form.criticalFollowValueTypeId.slice(-1)[0];
  574. } else {
  575. this.form.criticalFollowValueTypeId =
  576. this.form.criticalFollowValueTypeId[0];
  577. }
  578. this.$refs.criticalFollowValueTypeId.toggleDropDownVisible();
  579. },
  580. //删除
  581. delsrts() {
  582. this.form = { ...this.curRow };
  583. if (this.form.id == undefined) {
  584. this.$message.warning("请选择删除的数据");
  585. } else {
  586. this.$confirm("是否确认删除,是否继续?", "提示", {
  587. confirmButtonText: "确定",
  588. cancelButtonText: "取消",
  589. type: "warning",
  590. cancelButtonClass: "difference",
  591. confirmButtonClass: "commonbutton",
  592. })
  593. .then(() => {
  594. postapi("/api/app/CriticalFollowValue/Delete", {
  595. criticalFollowValueId: this.form.id,
  596. }).then((res) => {
  597. if (res.code != -1) {
  598. //this.$message.success('删除成功')
  599. this.treeclick();
  600. this.curRow = this.$options.data().curRow;
  601. }
  602. });
  603. })
  604. .catch(() => {});
  605. }
  606. },
  607. //取消排序
  608. cancellation() {
  609. this.$message.info("取消操作");
  610. this.isshow = true;
  611. this.treeclick();
  612. },
  613. assertiona() {
  614. assertions(this.tableData, this.initTableData);
  615. },
  616. //确定拖拽
  617. assertion() {
  618. const result = [];
  619. this.tableData.forEach((item, index) => {
  620. // index 从0开始的, displayOrder从大到小排
  621. // const currentDisplayOrder = this.tableData.length -1
  622. // const currentDisplayOrder = this.initTableData[index].displayOrder;
  623. // if (item.displayOrder != currentDisplayOrder) {
  624. // 如果它的displayOrder和它当前所在的位置不同代表挪动过位置
  625. // result.push({ id: item.id, displayOrder: currentDisplayOrder });
  626. // }
  627. result.push({ id: item.id, displayOrder: index + 1 });
  628. });
  629. postapi("/api/app/CriticalFollowValue/UpdateSortMany", {
  630. itemList: result,
  631. }).then((res) => {
  632. if (res.code != -1) {
  633. this.isshow = true;
  634. this.treeclick();
  635. //this.$message.success('操作成功')
  636. }
  637. });
  638. },
  639. //初始化
  640. rowDrop() {
  641. this.$nextTick(() => {
  642. const tbody = document.querySelector(".el-table__body-wrapper tbody");
  643. const _this = this;
  644. Sortable.create(tbody, {
  645. handle: ".move",
  646. animation: 300,
  647. onChoose({ oldIndex }) {
  648. _this.$refs["tableData"].setCurrentRow(_this.tableData[oldIndex]);
  649. _this.rowclick(_this.tableData[oldIndex], false);
  650. },
  651. onEnd({ newIndex, oldIndex }) {
  652. _this.isshow = false;
  653. const currRow = _this.tableData.splice(oldIndex, 1)[0];
  654. _this.tableData.splice(newIndex, 0, currRow);
  655. _this.tableData.map((item, index) => {
  656. if (index == newIndex && index == oldIndex) {
  657. // console.log(item, "新数据");
  658. } else if (index == oldIndex) {
  659. } else if (index == newIndex) {
  660. }
  661. });
  662. },
  663. });
  664. });
  665. },
  666. //置低
  667. toppings() {
  668. this.form = { ...this.curRow };
  669. if (this.form.id == undefined) {
  670. this.$message.error("请点击选择操作的数据");
  671. } else {
  672. postapi("/api/app/CriticalFollowValue/UpdateManySort", {
  673. criticalFollowValueId: this.form.id,
  674. sortType: 2,
  675. }).then((res) => {
  676. if (res.code != -1) {
  677. this.treeclick();
  678. //this.$message.success('操作成功')
  679. }
  680. });
  681. }
  682. },
  683. //置顶
  684. topping() {
  685. this.form = { ...this.curRow };
  686. if (this.form.id == undefined) {
  687. this.$message.error("请点击选择操作的数据");
  688. } else {
  689. postapi("/api/app/CriticalFollowValue/UpdateManySort", {
  690. criticalFollowValueId: this.form.id,
  691. sortType: 1,
  692. }).then((res) => {
  693. if (res.code != -1) {
  694. this.treeclick();
  695. //this.$message.success('操作成功')
  696. }
  697. });
  698. }
  699. },
  700. //编辑弹框
  701. editpopup() {
  702. this.form = { ...this.curRow };
  703. if (this.form.id == undefined) {
  704. this.$message.warning("请点击选择操作的数据");
  705. } else {
  706. this.dialogVisible = true;
  707. this.title = 2;
  708. if (this.$refs.form !== undefined) {
  709. this.$refs.form.resetFields();
  710. }
  711. this.$nextTick(() => {
  712. this.$refs.refinput.focus();
  713. });
  714. }
  715. },
  716. //点击列表通过id查询
  717. rowclick(row) {
  718. this.curRow = { ...row };
  719. // quersmedicalid(row.id).then((res) => {
  720. // if(res.code!=-1){
  721. // this.curRow = { ...res.data };
  722. // }
  723. // });
  724. },
  725. //确定新增或者编辑
  726. addoredit() {
  727. if (this.form.displayName == "") {
  728. this.$message.warning("请输入名称");
  729. } else if (this.form.criticalFollowValueTypeId == "") {
  730. this.$message.warning("请选择危急值类别");
  731. } else if (this.form.criticalFollowValueFlag == "") {
  732. this.$message.warning("危急随访值标志");
  733. } else {
  734. if (this.title == 1) {
  735. postapi("/api/app/CriticalFollowValue/Create", {
  736. displayName: this.form.displayName,
  737. criticalFollowValueTypeId: this.form.criticalFollowValueTypeId,
  738. criticalFollowValueFlag: this.form.criticalFollowValueFlag,
  739. }).then((res) => {
  740. if (res.code != -1) {
  741. this.treeclick();
  742. this.dialogVisible = false;
  743. //this.$message.success('新增成功')
  744. }
  745. });
  746. } else if (this.title == 2) {
  747. //diagnosticediting updateconlus
  748. postapi("/api/app/CriticalFollowValue/Update", {
  749. criticalFollowValueId: this.form.id,
  750. displayName: this.form.displayName,
  751. criticalFollowValueTypeId: this.form.criticalFollowValueTypeId,
  752. criticalFollowValueFlag: this.form.criticalFollowValueFlag,
  753. }).then((res) => {
  754. if (res.code != -1) {
  755. this.treeclick();
  756. this.dialogVisible = false;
  757. //this.$message.success('修改成功')
  758. }
  759. });
  760. }
  761. }
  762. },
  763. //新增弹框
  764. add() {
  765. if (this.criticalFollowTypeId == undefined || this.criticalFollowTypeId == "") {
  766. this.$message.warning("请选择危急类别");
  767. } else {
  768. this.title = 1;
  769. this.dialogVisible = true;
  770. if (this.$refs.form !== undefined) {
  771. this.$refs.form.resetFields();
  772. }
  773. this.form = this.$options.data().form;
  774. this.form.criticalFollowValueTypeId = this.criticalFollowTypeId;
  775. this.$nextTick(() => {
  776. this.$refs.refinput.focus();
  777. });
  778. }
  779. },
  780. getlist() {
  781. // conclusionacquisition(this.pages).then((res) => {
  782. // console.log(res);
  783. // this.initTableData = [...res.data.items];
  784. // this.tableData = res.data.items;
  785. // });
  786. this.getlistM();
  787. },
  788. getlistM(rowsid) {
  789. postapi("/api/app/CriticalFollowValue/GetList").then((res) => {
  790. if (res.code != -1) {
  791. this.initTableData = [...res.data];
  792. this.quckDepartment = res.data;
  793. }
  794. });
  795. },
  796. },
  797. };
  798. </script>
  799. <style scoped>
  800. @import "../../assets/css/global_button.css";
  801. @import "../../assets/css/global_dialog.css";
  802. @import "../../assets/css/global_table.css";
  803. @import "../../assets/css/global_form.css";
  804. @import "../../assets/css/global_input.css";
  805. @import "../../assets/css/global.css";
  806. .box {
  807. display: flex;
  808. flex-direction: column;
  809. }
  810. :deep .el-form-item {
  811. margin-bottom: 14px;
  812. }
  813. /* el-dialog的头部样式 */
  814. :deep .el-dialog__header {
  815. padding: 11px 20px 11px;
  816. }
  817. /* el-dialog的主体样式 */
  818. :deep .el-dialog__body {
  819. padding: 0px 20px 0px;
  820. }
  821. /* el-divider样式 */
  822. :deep .el-divider--horizontal {
  823. margin: 0px 0 12px;
  824. }
  825. /* el-dialog的底部样式 */
  826. :deep .el-dialog__footer {
  827. padding: 0px 20px 14px;
  828. }
  829. .seachinput {
  830. width: 250px;
  831. margin-right: 110px;
  832. }
  833. :deep .seachinput .el-select {
  834. width: 100%;
  835. }
  836. </style>