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.

2100 lines
73 KiB

3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
1 year ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="box">
  3. <div>
  4. <div class="middlebox">
  5. <div class="contenttitle">
  6. 基础资料 /
  7. <span class="contenttitleBold">组合项目</span>
  8. </div>
  9. <div class="seachinput">
  10. <el-select v-model="department" placeholder="请选择组合项目" filterable :filter-method="remoteMethodes"
  11. default-first-option @change="quckDepartments" clearable size="small">
  12. <el-option v-for="item in quckDepartment" :key="item.id" :label="item.displayName" :value="item.id">
  13. </el-option>
  14. </el-select>
  15. </div>
  16. </div>
  17. <div style="display: flex; margin-top: 7px">
  18. <div :style="'width: 208px;overflow: scroll;height:' +
  19. (window.pageHeight < 600 ? 505 : window.pageHeight - 100) +
  20. 'px;background-color: #fff; border-radius: 8px'
  21. ">
  22. <div style="margin-top: 10px">
  23. <el-tree :data="itemTypeId" :props="treeprops" @node-click="treeclick" node-key="id" ref="itemType"
  24. highlight-current auto-expand-parent>
  25. <span class="custom-tree-node" slot-scope="{ node, data }">
  26. <div>
  27. <span class="treeicons">
  28. <!-- <i
  29. class="el-icon-document-remove"
  30. v-if="data.parentId == null"
  31. ></i> -->
  32. <img style="width: 20px; height: 20px; vertical-align: sub" src="@/assets/images/order.png"
  33. v-if="!data.parentId" />
  34. </span>
  35. <span :class="!data.parentId ? 'maxtitle' : 'mintitle'">{{
  36. node.label
  37. }}</span>
  38. </div>
  39. </span>
  40. </el-tree>
  41. </div>
  42. </div>
  43. <div style="display: block">
  44. <div style="margin-left: 15px; display: flex; flex-direction: column">
  45. <div style="display: flex; margin-bottom: 15px">
  46. <div :style="'width:' +
  47. (window.pageWidth - 200 - 110 - 50 - 14) +
  48. 'px;padding: 15px;background-color: #fff;border-radius: 8px;'
  49. ">
  50. <el-table :data="tableData" style="width: 100%" row-key="id" :height="window.pageHeight < 600
  51. ? 190
  52. : Math.floor((window.pageHeight - 260) / 2)
  53. " class="el-table__body-wrapper tbody" @row-click="rowick" highlight-current-row
  54. :row-style="{ height: '36px' }" ref="tableData">
  55. <el-table-column prop="id" label="编号" width="320">
  56. </el-table-column>
  57. <el-table-column prop="displayName" label="名称" width="">
  58. </el-table-column>
  59. <el-table-column prop="price" label="价格" width="">
  60. </el-table-column>
  61. <el-table-column prop="forPregnantFlag" label="备怀孕禁检" align="center">
  62. <template slot-scope="scope">
  63. <div style="font-family: 'Microsoft YaHei'">
  64. {{ dddw(forPregnantFlag, "id", scope.row.forPregnantFlag, "displayName") }}
  65. </div>
  66. </template>
  67. </el-table-column>
  68. <el-table-column prop="maritalStatusId" label="婚姻状况" align="center">
  69. <template slot-scope="scope">
  70. <div style="font-family: 'Microsoft YaHei'">
  71. {{ dddw(dict.forMaritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  72. </div>
  73. </template>
  74. </el-table-column>
  75. <el-table-column prop="creatorName" label="创建者" width="">
  76. </el-table-column>
  77. <el-table-column prop="lastModifierName" label="修改者" width="">
  78. </el-table-column>
  79. <el-table-column prop="creationTime" label="创建时间" width="200">
  80. <template slot-scope="scope">
  81. {{ scope.row.creationTime | dateFormat }}
  82. </template>
  83. </el-table-column>
  84. <el-table-column prop="lastModificationTime" label="修改时间" width="200">
  85. <template slot-scope="scope">
  86. {{ scope.row.lastModificationTime | dateFormat }}
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="操作" align="center">
  90. <template>
  91. <el-tag class="move" style="
  92. cursor: move;
  93. background-color: rgb(245, 245, 245);
  94. border: none;
  95. " draggable="true">
  96. <i class="el-icon-d-caret" style="
  97. width: 1rem;
  98. height: 1rem;
  99. color: rgb(113, 113, 113);
  100. "></i>
  101. </el-tag>
  102. </template>
  103. </el-table-column>
  104. </el-table>
  105. </div>
  106. </div>
  107. <!-- table页 -->
  108. <div style="display: flex">
  109. <div :style="'width:' +
  110. (window.pageWidth - 200 - 110 - 50 - 14) +
  111. 'px;padding: 15px;background-color: #fff;border-radius: 8px;'
  112. ">
  113. <el-tabs v-model="activeName">
  114. <el-tab-pane label="项目明细" name="first">
  115. <div class="mainbox">
  116. <div class="" :style="'width:' +
  117. Math.floor(
  118. (window.pageWidth - 200 - 110 - 50 - 14 - 130) / 2
  119. ) +
  120. 'px;'
  121. ">
  122. <div>
  123. <span style="
  124. padding: 5px;
  125. font-size: 14px;
  126. font-weight: 400;
  127. color: #232748;
  128. font-family: NotoSansSC-Regular;
  129. margin-bottom: 10px;
  130. ">项目类别</span>
  131. <el-cascader v-model="values" :options="itemTypeId" ref="example" popper-class="example"
  132. @change="ischangs" :props="{
  133. value: 'id',
  134. label: 'displayName',
  135. children: 'treeChildren',
  136. checkStrictly: true,
  137. expandTrigger: 'hover',
  138. }" size="small">
  139. </el-cascader>
  140. </div>
  141. <el-table :data="leftdata" :height="window.pageHeight < 600
  142. ? 170
  143. : Math.floor((window.pageHeight - 230) / 2)
  144. " @row-dblclick="dbClickChoosedAsb" @selection-change="handleSelectionChange"
  145. @row-click="chooseAsbItem" highlight-current-row :row-style="{ height: '28px' }">
  146. <el-table-column type="index" align="center" label="序号" />
  147. <el-table-column prop="displayName" label="未选项目" />
  148. </el-table>
  149. </div>
  150. <div class="Selectbutton">
  151. <div style="">
  152. <el-button @click="addAbs" style="width: 100px" class="commonbutton">添加<i
  153. class="el-icon-caret-right"></i>
  154. </el-button>
  155. </div>
  156. <div style="margin-top: 18px">
  157. <el-button @click="addall" class="difference">全添加<i class="el-icon-caret-right"></i><i
  158. class="el-icon-caret-right"></i></el-button>
  159. </div>
  160. <div style="margin-top: 18px">
  161. <el-button @click="delAbs" style="width: 100px" class="commonbutton">移除<i
  162. class="el-icon-caret-left"></i>
  163. </el-button>
  164. </div>
  165. <div style="margin-top: 18px">
  166. <el-button @click="allclear" class="difference">全移除<i class="el-icon-caret-left"></i><i
  167. class="el-icon-caret-left"></i>
  168. </el-button>
  169. </div>
  170. </div>
  171. <div class="" :style="'width:' +
  172. Math.floor(
  173. (window.pageWidth - 200 - 110 - 50 - 14 - 130) / 2
  174. ) +
  175. 'px;'
  176. ">
  177. <div>
  178. <span style="
  179. padding: 5px;
  180. font-size: 14px;
  181. font-weight: 400;
  182. color: #232748;
  183. font-family: NotoSansSC-Regular;
  184. margin-bottom: 10px;
  185. ">搜索选择</span>
  186. <el-select value-key="id" @change="selectitem" filterable v-model="flitvalues"
  187. placeholder="请选择" :filter-method="remoteMethods" default-first-option clearable
  188. ref="quickAsbOCX" size="small">
  189. <el-option v-for="item in filetelists" :key="item.id" :label="item.displayName"
  190. :value="item">
  191. </el-option>
  192. </el-select>
  193. </div>
  194. <el-table :data="rightdata" :height="window.pageHeight < 600
  195. ? 170
  196. : Math.floor((window.pageHeight - 230) / 2)
  197. " width="100%" @row-dblclick="removeAbs" @selection-change="selecteditems"
  198. @row-click="removeAsbItem" highlight-current-row :row-style="{ height: '28px' }"
  199. :summary-method="getSummaries" show-summary ref="table">
  200. <el-table-column type="index" align="center" label="序号" />
  201. <el-table-column label="已选项目" prop="displayName" />
  202. </el-table>
  203. </div>
  204. </div>
  205. </el-tab-pane>
  206. <!-- 指引单信息 -->
  207. <el-tab-pane label="指引信息" name="second">
  208. <div style="display: flex; width: 100%">
  209. <div :style="'width:' +
  210. (window.pageWidth - 200 - 110 - 50 - 10 - 110 - 10) +
  211. 'px;'
  212. ">
  213. <el-form ref="guidanceinformation" :rules="guidelinesRules" :model="formdata">
  214. <el-table :data="formdata.guidanceinformationdata" style="width: 100%" highlight-current-row
  215. @row-click="guiderow" :row-class-name="tableRowClassName" :height="window.pageHeight < 600
  216. ? 215
  217. : Math.floor((window.pageHeight - 174) / 2)
  218. " ref="guidanceinformationdata" class="guidelines" border>
  219. <el-table-column label="体检中心" width="200">
  220. <template slot-scope="scope">
  221. <el-form-item :prop="'guidanceinformationdata.' +
  222. scope.$index +
  223. '.medicalCenterId'
  224. " :rules="guidelinesRules.medicalCenterId">
  225. <el-select v-model="scope.row.medicalCenterId">
  226. <el-option v-for="item in organizationUnitdata" :key="item.id"
  227. :label="item.displayName" :value="item.id" />
  228. </el-select>
  229. </el-form-item>
  230. </template>
  231. </el-table-column>
  232. <el-table-column label="适用性别" width="200">
  233. <template slot-scope="scope">
  234. <el-form-item :prop="'guidanceinformationdata.' +
  235. scope.$index +
  236. '.forSexId'
  237. " :rules="guidelinesRules.forSexId">
  238. <el-select v-model="scope.row.forSexId">
  239. <el-option v-for="item in forsexdata" :key="item.id" :label="item.displayName"
  240. :value="item.id" />
  241. </el-select>
  242. </el-form-item>
  243. </template>
  244. </el-table-column>
  245. <el-table-column label="指引信息">
  246. <template slot-scope="scope">
  247. <el-form-item :prop="'guidanceinformationdata.' +
  248. scope.$index +
  249. '.guide'
  250. " :rules="guidelinesRules.guide">
  251. <el-input v-model="scope.row.guide" required />
  252. </el-form-item>
  253. </template>
  254. </el-table-column>
  255. </el-table>
  256. </el-form>
  257. </div>
  258. <div style="margin-left: 15px">
  259. <el-button type="" @click="createabulletbox" style="margin-top: 50px"
  260. class="commonbutton">新增</el-button>
  261. <div style="margin-top: 10px">
  262. <el-button type="" @click="deleteguidelines" class="deleteButton">删除</el-button>
  263. </div>
  264. <div style="margin-top: 10px">
  265. <el-button type="" @click="saveguidelines" class="commonbutton">保存</el-button>
  266. </div>
  267. </div>
  268. </div>
  269. <!-- 科室改为体检中心 -->
  270. </el-tab-pane>
  271. </el-tabs>
  272. </div>
  273. </div>
  274. </div>
  275. </div>
  276. <!-- 按钮区域 -->
  277. <div style="margin-left: 10px">
  278. <el-button type="" @click="addll" class="commonbutton">新增</el-button>
  279. <div style="margin-top: 10px">
  280. <el-button type="" @click="editpopup" class="commonbutton">编辑</el-button>
  281. </div>
  282. <div style="margin-top: 10px">
  283. <el-button type="" @click="deleteid" class="deleteButton">删除</el-button>
  284. </div>
  285. <div style="margin-top: 10px">
  286. <el-button type="" @click="topping" class="commonbutton">置顶</el-button>
  287. </div>
  288. <div style="margin-top: 10px">
  289. <el-button type="" @click="setlow" class="commonbutton">置底</el-button>
  290. </div>
  291. <div style="margin-top: 10px">
  292. <el-button type="" :disabled="isshow" @click="assertion" class="commonbutton">排序</el-button>
  293. </div>
  294. <div style="margin-top: 10px">
  295. <el-button type="" :disabled="isshow" @click="cancellation" class="commonbutton">取消</el-button>
  296. </div>
  297. <div style="margin-top: 10px">
  298. <el-button type="" :disabled="isdislob" @click="Onsubmit" class="commonbutton">确定项目</el-button>
  299. </div>
  300. <div style="margin-top: 10px">
  301. <el-button type="" :disabled="isdislob" @click="projectCancellation" class="commonbutton">取消项目</el-button>
  302. </div>
  303. </div>
  304. </div>
  305. </div>
  306. <!-- 新增或者编辑弹框 -->
  307. <el-dialog :title="title == 1 ? '新增' : '编辑'" :visible.sync="dialogVisible" width="800px" @close="bindidclose"
  308. :close-on-click-modal="false">
  309. <el-form :model="form" :rules="rules" ref="ruleForm" label-width="70px">
  310. <el-row>
  311. <el-col :span="10">
  312. <el-form-item label="项目编号" prop="">
  313. <el-input v-model="form.id" :disabled="true" size="small"></el-input>
  314. </el-form-item>
  315. </el-col>
  316. <el-col :span="6">
  317. <el-form-item label="项目类别" prop="itemTypeId">
  318. <el-cascader v-model="form.itemTypeId" :options="itemTypeId" popper-class="example" ref="itemTypeIds"
  319. @change="ischangsItemTypeId" :props="{
  320. value: 'id',
  321. label: 'displayName',
  322. children: 'treeChildren',
  323. checkStrictly: true,
  324. expandTrigger: 'hover',
  325. }" size="small">
  326. </el-cascader>
  327. </el-form-item>
  328. </el-col>
  329. <el-col :span="8">
  330. <el-form-item label="名称" prop="displayName">
  331. <el-input v-model="form.displayName" ref="refinput"
  332. @input="($event) => changeUpdate($event, 'displayName')" size="small"></el-input>
  333. </el-form-item>
  334. </el-col>
  335. <el-col :span="8">
  336. <el-form-item label="简称" prop="">
  337. <el-input v-model="form.shortName" @input="($event) => changeUpdate($event, 'shortName')"
  338. size="small"></el-input>
  339. </el-form-item>
  340. </el-col>
  341. <el-col :span="8">
  342. <el-form-item label="适用性别" prop="">
  343. <el-select v-model="form.forSexId" placeholder="请选择" size="small" @change="quckRusetform">
  344. <el-option v-for="item in forSexId" :key="item.id" :label="item.displayName" :value="item.id">
  345. </el-option>
  346. </el-select>
  347. </el-form-item>
  348. </el-col>
  349. <el-col :span="8">
  350. <el-form-item label="婚姻状况">
  351. <el-select v-model="form.maritalStatusId" placeholder="请选择" style="width: 100%" size="small">
  352. <el-option v-for="item in dict.forMaritalStatus" :key="item.id" :label="item.displayName"
  353. :value="item.id">
  354. </el-option>
  355. </el-select>
  356. </el-form-item>
  357. </el-col>
  358. <el-col :span="5">
  359. <el-form-item label="价格" prop="">
  360. <el-input v-model="form.price" type="nember" @input="($event) => changeUpdate($event, 'price')"
  361. size="small"></el-input>
  362. </el-form-item>
  363. </el-col>
  364. <el-col :span="6">
  365. <el-form-item label="仪器类别" prop="">
  366. <el-select v-model="form.deviceTypeId" placeholder="请选择" size="small" @change="quckRusetform">
  367. <el-option v-for="item in deviceTypeId" :key="item.id" :label="item.displayName" :value="item.id">
  368. </el-option>
  369. </el-select>
  370. </el-form-item>
  371. </el-col>
  372. <el-col :span="6">
  373. <el-form-item label="汇总项目类别" prop="collectItemTypeId" label-width="100px">
  374. <el-select v-model="form.collectItemTypeId" placeholder="请选择" size="small" @change="quckRusetform">
  375. <el-option v-for="item in collectItemType" :key="item.id" :label="item.displayName" :value="item.id">
  376. </el-option>
  377. </el-select>
  378. </el-form-item>
  379. </el-col>
  380. <el-col :span="4">
  381. <el-form-item label="项目结果合并" prop="" label-width="100px">
  382. <!-- <el-select
  383. v-model="form.isItemResultMerger"
  384. placeholder="请选择"
  385. >
  386. <el-option
  387. v-for="item in isItemResultMerger"
  388. :key="item.value"
  389. :label="item.label"
  390. :value="item.value"
  391. >
  392. </el-option>
  393. </el-select> -->
  394. <el-checkbox v-model="form.isItemResultMerger" true-label="Y" false-label="N" />
  395. </el-form-item>
  396. </el-col>
  397. <el-col :span="3">
  398. <el-form-item label="餐前项目" prop="">
  399. <!-- <el-select v-model="form.isBeforeEat" placeholder="请选择">
  400. <el-option
  401. v-for="item in isBeforeEat"
  402. :key="item.value"
  403. :label="item.label"
  404. :value="item.value"
  405. >
  406. </el-option>
  407. </el-select> -->
  408. <el-checkbox v-model="form.isBeforeEat" true-label="Y" false-label="N" />
  409. </el-form-item>
  410. </el-col>
  411. <el-col :span="24">
  412. <el-form-item label="推荐理由" prop="">
  413. <el-input v-model="form.suggestReason" type="textarea" :autosize="{ minRows: 2, maxRows: 2 }"
  414. @input="($event) => changeUpdate($event, 'suggestReason')" />
  415. </el-form-item>
  416. </el-col>
  417. <el-col :span="24">
  418. <el-form-item label="临床意义" prop="">
  419. <el-input v-model="form.clinicalMeaning" type="textarea" :autosize="{ minRows: 2, maxRows: 2 }"
  420. @input="($event) => changeUpdate($event, 'clinicalMeaning')" />
  421. </el-form-item>
  422. </el-col>
  423. <el-col :span="24">
  424. <el-form-item label="警告事项" prop="">
  425. <el-input v-model="form.warn" type="textarea" :autosize="{ minRows: 2, maxRows: 2 }"
  426. @input="($event) => changeUpdate($event, 'warn')" />
  427. </el-form-item>
  428. </el-col>
  429. <el-col :span="16">
  430. <el-form-item label="默认结果" prop="" class="my-el-form-item">
  431. <!-- <el-input v-model="form.defaultResult"></el-input> -->
  432. <div style="display: flex; justify-content: center">
  433. <el-input v-model="form.defaultResult" type="textarea" :autosize="{ minRows: 1, maxRows: 1 }"
  434. @input="($event) => changeUpdate($event, 'defaultResult')" />
  435. <el-select v-model="form.defaultResult" style="width: 40px" class="downText" @change="quckRusetform">
  436. <el-option v-for="item in defaultResult" :key="item.value" :label="item.label" :value="item.label">
  437. </el-option>
  438. </el-select>
  439. </div>
  440. </el-form-item>
  441. </el-col>
  442. <el-col :span="8">
  443. <el-form-item label="备怀孕期间禁检" prop="" label-width="110px">
  444. <el-select v-model="form.forPregnantFlag" placeholder="请选择" size="small" @change="quckRusetform">
  445. <el-option v-for="item in forPregnantFlag" :key="item.id" :label="item.displayName" :value="item.id">
  446. </el-option>
  447. </el-select>
  448. </el-form-item>
  449. </el-col>
  450. <el-col :span="4">
  451. <el-form-item label="启用诊断" prop="">
  452. <el-checkbox v-model="form.isDiagnosisFunctionBox" @change="changeBox('isDiagnosisFunction')" />
  453. </el-form-item>
  454. </el-col>
  455. <el-col :span="8">
  456. <el-form-item label="诊断函数" prop="">
  457. <el-input v-model="form.diagnosisFunction" :disabled="disableddiagnosisFunction" size="small">
  458. <el-button slot="append" icon="el-icon-more" v-if="form.isDiagnosisFunctionBox" @click="
  459. (diagnosisFunctionBox = true),
  460. (diagnosisFunctionText = form.diagnosisFunction)
  461. " size="small"></el-button>
  462. </el-input>
  463. </el-form-item>
  464. </el-col>
  465. <el-col :span="4">
  466. <el-form-item label="函数处理完毕" prop="" label-width="100px">
  467. <el-checkbox v-model="form.isContinueProcess" true-label="Y" false-label="N" />
  468. </el-form-item>
  469. </el-col>
  470. <el-col :span="8">
  471. <el-form-item label="候诊时间" prop="">
  472. <el-input v-model="form.queueTime" type="nember" @input="($event) => changeUpdate($event, 'queueTime')"
  473. size="small"></el-input>
  474. </el-form-item>
  475. </el-col>
  476. <el-col :span="4">
  477. <el-form-item label="启用危急值" prop="" label-width="85px">
  478. <el-checkbox v-model="form.isCriticalValueFunction" true-label="Y" false-label="N" />
  479. </el-form-item>
  480. </el-col>
  481. <el-col :span="8">
  482. <el-form-item label="危急值函数" prop="" label-width="85px">
  483. <el-input v-model="form.criticalValueFunction" disabled size="small">
  484. <el-button slot="append" icon="el-icon-more" v-if="form.isCriticalValueFunction == 'Y'"
  485. @click="dialogCriticalValueFunction = true" size="small"></el-button>
  486. </el-input>
  487. </el-form-item>
  488. </el-col>
  489. <el-col :span="4">
  490. <el-form-item label="启用随访" prop="">
  491. <el-checkbox v-model="form.isFollowUpFunction" true-label="Y" false-label="N" />
  492. </el-form-item>
  493. </el-col>
  494. <el-col :span="8">
  495. <el-form-item label="随访函数" prop="">
  496. <el-input v-model="form.followUpFunction" disabled size="small">
  497. <el-button slot="append" icon="el-icon-more" v-if="form.isFollowUpFunction == 'Y'"
  498. @click="dialogFollowUpFunction = true" size="small"></el-button>
  499. </el-input>
  500. </el-form-item>
  501. </el-col>
  502. <el-col :span="6">
  503. <el-form-item label="条码模式" prop="">
  504. <el-select v-model="form.barcodeMode" placeholder="请选择" size="small" @change="quckRusetform">
  505. <el-option v-for="item in barcodeMode" :key="item.id" :label="item.displayName" :value="item.id">
  506. </el-option>
  507. </el-select>
  508. </el-form-item>
  509. </el-col>
  510. <el-col :span="3">
  511. <el-form-item label="体检报告" prop="">
  512. <el-checkbox v-model="form.isPictureRotate" true-label="Y" false-label="N" />
  513. </el-form-item>
  514. </el-col>
  515. <el-col :span="3">
  516. <el-form-item label="网上预约" prop="">
  517. <!-- <el-select v-model="form.isCheck" placeholder="请选择">
  518. <el-option
  519. v-for="item in isCheck"
  520. :key="item.value"
  521. :label="item.label"
  522. :value="item.value"
  523. >
  524. </el-option>
  525. </el-select> -->
  526. <el-checkbox v-model="form.isWebAppoint" true-label="Y" false-label="N" />
  527. </el-form-item>
  528. </el-col>
  529. <el-col :span="6">
  530. <el-form-item label="疾病筛查类别" prop="" label-width="100px">
  531. <el-select v-model="form.diseaseScreeningTypeId" placeholder="请选择" size="small" @change="quckRusetform">
  532. <el-option v-for="item in diseaseScreeningType" :key="item.id" :label="item.displayName"
  533. :value="item.id">
  534. </el-option>
  535. </el-select>
  536. </el-form-item>
  537. </el-col>
  538. <el-col :span="3">
  539. <el-form-item label="检查项目" prop="">
  540. <!-- <el-select v-model="form.isCheck" placeholder="请选择">
  541. <el-option
  542. v-for="item in isCheck"
  543. :key="item.value"
  544. :label="item.label"
  545. :value="item.value"
  546. >
  547. </el-option>
  548. </el-select> -->
  549. <el-checkbox v-model="form.isCheck" true-label="Y" false-label="N" />
  550. </el-form-item>
  551. </el-col>
  552. <el-col :span="3">
  553. <el-form-item label="启用" prop="">
  554. <!-- <el-select v-model="form.isActive" placeholder="请选择">
  555. <el-option
  556. v-for="item in isActive"
  557. :key="item.value"
  558. :label="item.label"
  559. :value="item.value"
  560. >
  561. </el-option>
  562. </el-select> -->
  563. <el-checkbox v-model="form.isActive" true-label="Y" false-label="N" />
  564. </el-form-item>
  565. </el-col>
  566. </el-row>
  567. <el-divider></el-divider>
  568. <el-row>
  569. <el-col :span="5">
  570. <el-form-item label="创建者">
  571. <el-input v-model="form.creatorName" disabled size="small"></el-input>
  572. </el-form-item>
  573. </el-col>
  574. <el-col :span="7">
  575. <el-form-item label="创建时间" style="margin-left: -5%">
  576. <el-input :value="form.creationTime | dateFormat" disabled style="width: 90%" size="small"></el-input>
  577. </el-form-item>
  578. </el-col>
  579. <el-col :span="5">
  580. <el-form-item label="修改者" style="margin-left: -25%">
  581. <el-input v-model="form.creatorName" disabled size="small"></el-input>
  582. </el-form-item>
  583. </el-col>
  584. <el-col :span="7">
  585. <el-form-item label="修改时间" style="margin-left: -5%">
  586. <el-input :value="form.lastModificationTime | dateFormat" disabled style="width: 90%"
  587. size="small"></el-input>
  588. </el-form-item>
  589. </el-col>
  590. </el-row>
  591. </el-form>
  592. <span slot="footer" class="dialog-footer">
  593. <el-button @click="editcancellation" class="difference"> </el-button>
  594. <el-button type="primary" @click="addoredit" class="commonbutton"> </el-button>
  595. </span>
  596. </el-dialog>
  597. <!-- 指引信息新增修改弹框 -->
  598. <el-dialog :title="guidetitle == 1 ? '指引信息新增' : '指引信息修改'" :visible.sync="guidetitledialogVisible" width="50%">
  599. <el-row>
  600. <el-form :model="guideform" :rules="guiderules" ref="ruleForms" label-width="100px" class="demo-ruleForm">
  601. <el-col :span="12">
  602. <el-form-item label="体检中心" prop="medicalCenterId">
  603. <el-select v-model="guideform.medicalCenterId" placeholder="请选择">
  604. <el-option v-for="item in organizationUnitdata" :key="item.id" :label="item.displayName"
  605. :value="item.id">
  606. </el-option>
  607. </el-select>
  608. </el-form-item>
  609. </el-col>
  610. <!-- <el-col :span="12">
  611. <el-form-item label="组合项目" prop="asbitemId">
  612. <el-select v-model="guideform.asbitemId" placeholder="请选择">
  613. <el-option
  614. v-for="item in asbitemdata"
  615. :key="item.id"
  616. :label="item.displayName"
  617. :value="item.id"
  618. >
  619. </el-option>
  620. </el-select>
  621. </el-form-item>
  622. </el-col> -->
  623. <el-col :span="12">
  624. <el-form-item label="适用性别" prop="forSexId">
  625. <el-select v-model="guideform.forSexId" placeholder="请选择">
  626. <el-option v-for="item in forsexdata" :key="item.id" :label="item.displayName" :value="item.id">
  627. </el-option>
  628. </el-select>
  629. </el-form-item>
  630. </el-col>
  631. <el-col :span="24">
  632. <el-form-item label="指引内容" prop="guide">
  633. <el-input v-model="guideform.guide" placeholder="请输入内容"></el-input>
  634. </el-form-item>
  635. </el-col>
  636. </el-form>
  637. </el-row>
  638. <span slot="footer" class="dialog-footer">
  639. <el-button @click="guidetitledialogVisible = false"> </el-button>
  640. <el-button type="primary" @click="determineguidelines"> </el-button>
  641. </span>
  642. </el-dialog>
  643. <!-- 诊断函数弹框 -->
  644. <el-dialog title="诊断函数设置" :visible.sync="diagnosisFunctionBox" width="50%" :close-on-click-modal="false" fullscreen>
  645. <el-form label-width="110px">
  646. <el-row>
  647. <el-col :span="24">
  648. <el-form-item label="诊断函数">
  649. <el-input type="textarea" v-model="diagnosisFunctionText"
  650. :autosize="{ minRows: 29, maxRows: 29 }"></el-input>
  651. </el-form-item>
  652. </el-col>
  653. </el-row>
  654. </el-form>
  655. <span slot="footer" class="dialog-footer">
  656. <el-button @click="(diagnosisFunctionBox = false), (diagnosisFunctionText = '')" class="difference">
  657. </el-button>
  658. <el-button type="primary" @click="OnsubmitDiagnosis" class="commonbutton"> </el-button>
  659. </span>
  660. </el-dialog>
  661. </div>
  662. </template>
  663. <script>
  664. import { mapState } from "vuex";
  665. import Sortable from "sortablejs";
  666. import { getapi, postapi, deletapi } from "@/api/api";
  667. import { examinationgender, instrumentlist } from "@/request/systemapi";
  668. import { deepCopy, objCopy, dddw } from "../../utlis/proFunc";
  669. import {
  670. getporjectlists,
  671. groupsandlist,
  672. projectlist,
  673. invoicetypelist,
  674. newcombination,
  675. asbitemgetid,
  676. updateombination,
  677. samplesetlow,
  678. deletescombinationprojectid,
  679. combination,
  680. } from "@/request/commonapi";
  681. export default {
  682. data() {
  683. return {
  684. guiderules: {
  685. medicalCenterId: [
  686. {
  687. required: true,
  688. message: "请选择体检单位",
  689. trigger: "change",
  690. },
  691. ],
  692. asbitemId: [
  693. {
  694. required: true,
  695. message: "请选择组合项目",
  696. trigger: "change",
  697. },
  698. ],
  699. forSexId: [
  700. {
  701. required: true,
  702. message: "请选择组适用性别",
  703. trigger: "change",
  704. },
  705. ],
  706. guide: [{ required: true, message: "请输入指引内容", trigger: "blur" }],
  707. },
  708. guidetitle: 1,
  709. guideform: {
  710. medicalCenterId: "",
  711. asbitemId: "",
  712. forSexId: "",
  713. guide: "",
  714. }, //指引信息的数据对象
  715. organizationUnitdata: [], //体检中心
  716. guidetitledialogVisible: false,
  717. formdata: {
  718. guidanceinformationdata: [],
  719. },
  720. activeName: "first",
  721. isdislob: true,
  722. filetelists: [],
  723. flitvalues: [],
  724. num: 0,
  725. isshow: true,
  726. values: [],
  727. projectid: [],
  728. initprojectid: [],
  729. rules: {
  730. displayName: [
  731. { required: true, message: "请输入名称", trigger: "blur" },
  732. ],
  733. shortName: [{ required: true, message: "请输入简称", trigger: "blur" }],
  734. forSexId: [
  735. { required: true, message: "请选择适用性别", trigger: "blur" },
  736. ],
  737. itemTypeId: [
  738. { required: true, message: "请选择项目类别", trigger: "blur" },
  739. ],
  740. price: [{ required: true, message: "请输入价格", trigger: "blur" }],
  741. deviceTypeId: [
  742. { required: true, message: "请选择仪器类别", trigger: "blur" },
  743. ],
  744. invoiceItemTypeId: [
  745. { required: true, message: "请选择发票类别", trigger: "blur" },
  746. ],
  747. collectItemTypeId: [
  748. { required: true, message: "请选择汇总项目类别", trigger: "blur" },
  749. ],
  750. isItemResultMerger: [
  751. { required: true, message: "请选择项目结果", trigger: "blur" },
  752. ],
  753. isBeforeEat: [
  754. { required: true, message: "请选择餐前项目", trigger: "change" },
  755. ],
  756. clinicalMeaning: [
  757. { required: true, message: "请输入临床意义", trigger: "blur" },
  758. ],
  759. defaultResult: [
  760. { required: true, message: "请输入默认结果", trigger: "blur" },
  761. ],
  762. queueTime: [
  763. { required: true, message: "请输入候诊时间", trigger: "blur" },
  764. ],
  765. isDiagnosisFunction: [
  766. { required: true, message: "请选择启用诊断函数", trigger: "blur" },
  767. ],
  768. diagnosisFunction: [
  769. { required: true, message: "请输入诊断函数", trigger: "blur" },
  770. ],
  771. isContinueProcess: [
  772. {
  773. required: true,
  774. message: "请选择诊断函数处理完毕后继续处理",
  775. trigger: "blur",
  776. },
  777. ],
  778. isPictureRotate: [
  779. { required: true, message: "请选择体检报告图片旋", trigger: "blur" },
  780. ],
  781. isCheck: [
  782. { required: true, message: "请选择是检查项目", trigger: "blur" },
  783. ],
  784. isActive: [
  785. { required: true, message: "请选择是否启用", trigger: "blur" },
  786. ],
  787. }, //表单校验对象
  788. form: {
  789. displayName: "",
  790. shortName: "",
  791. forSexId: "A",
  792. itemTypeId: "",
  793. price: "0",
  794. deviceTypeId: null,
  795. invoiceItemTypeId: "",
  796. isItemResultMerger: "N",
  797. isBeforeEat: "N",
  798. clinicalMeaning: "",
  799. defaultResult: "未见异常",
  800. queueTime: "0",
  801. isDiagnosisFunction: "N",
  802. diagnosisFunction: "",
  803. isContinueProcess: "N",
  804. isPictureRotate: "N",
  805. isCheck: "N",
  806. isActive: "Y",
  807. collectItemTypeId: "",
  808. barcodeMode: "0",
  809. isWebAppoint: "Y",
  810. warn: "",
  811. diseaseScreeningTypeId: null,
  812. isDiagnosisFunctionBox: false,
  813. forPregnantFlag: "A",
  814. maritalStatusId: "A",
  815. suggestReason: "",
  816. isCriticalValueFunction:'N',
  817. criticalValueFunction:'',
  818. isFollowUpFunction:'N',
  819. followUpFunction:''
  820. },
  821. forSexId: [], //性别
  822. forPregnantFlag: [
  823. {
  824. id: "A",
  825. displayName: "允许",
  826. },
  827. {
  828. id: "1",
  829. displayName: "备孕和怀孕期间禁检",
  830. },
  831. {
  832. id: "2",
  833. displayName: "怀孕期间禁检",
  834. },
  835. ],
  836. itemTypeId: [], //项目类别
  837. deviceTypeId: [], //仪器类别
  838. invoiceItemTypeId: [], //发票类别
  839. isItemResultMerger: [
  840. {
  841. value: "Y",
  842. label: "是",
  843. },
  844. {
  845. value: "N",
  846. label: "否",
  847. },
  848. ], //项目结果合并
  849. isBeforeEat: [
  850. {
  851. value: "Y",
  852. label: "是",
  853. },
  854. {
  855. value: "N",
  856. label: "否",
  857. },
  858. ], //餐前项目
  859. isDiagnosisFunction: [
  860. {
  861. value: "Y",
  862. label: "是",
  863. },
  864. {
  865. value: "N",
  866. label: "否",
  867. },
  868. ], //启用诊断函数
  869. isContinueProcess: [
  870. {
  871. value: "Y",
  872. label: "是",
  873. },
  874. {
  875. value: "N",
  876. label: "否",
  877. },
  878. ], //诊断函数处理完毕
  879. isContinueProcess: [
  880. {
  881. value: "Y",
  882. label: "是",
  883. },
  884. {
  885. value: "N",
  886. label: "否",
  887. },
  888. ], //诊断函数处理完毕后继续处理
  889. isPictureRotate: [
  890. {
  891. value: "Y",
  892. label: "是",
  893. },
  894. {
  895. value: "N",
  896. label: "否",
  897. },
  898. ], //体检报告图片旋转
  899. isCheck: [
  900. {
  901. value: "Y",
  902. label: "是",
  903. },
  904. {
  905. value: "N",
  906. label: "否",
  907. },
  908. ], //是检查项目
  909. isActive: [
  910. {
  911. value: "Y",
  912. label: "是",
  913. },
  914. {
  915. value: "N",
  916. label: "否",
  917. },
  918. ], //是否启用
  919. title: 1,
  920. dialogVisible: false,
  921. isshow: true,
  922. tableHeight: window.innerHeight - 180, //表格动态高度
  923. screenHeight: window.innerHeight, //内容区域高度
  924. pages: {
  925. Filter: "",
  926. SkipCount: 0,
  927. MaxResultCount: 100,
  928. Sorting: "displayOrder desc",
  929. },
  930. tableData: [],
  931. initTableData: [],
  932. leftdata: [],
  933. ary2: [],
  934. ary1: [],
  935. rightobj: {},
  936. rightdata: [],
  937. rightobj: {},
  938. nums: 0,
  939. itemid: "", //项目id
  940. curRow: {},
  941. asbitemdata: [], //组合项目
  942. forsexdata: [], //适用性别
  943. department: "",
  944. quckDepartment: [],
  945. treeprops: {
  946. label: "displayName",
  947. value: "id",
  948. children: "treeChildren",
  949. },
  950. defaultResult: [
  951. {
  952. value: "1",
  953. label: "未见异常",
  954. },
  955. {
  956. value: "2",
  957. label: "正常",
  958. },
  959. {
  960. value: "3",
  961. label: "阴性",
  962. },
  963. {
  964. value: "4",
  965. label: "无",
  966. },
  967. {
  968. value: "5",
  969. label: "(—)",
  970. },
  971. {
  972. value: "6",
  973. label: "­-",
  974. },
  975. ],
  976. diagnosisFunctionBox: false,
  977. diagnosisFunctionText: "",
  978. disableddiagnosisFunction: true,
  979. initfiletelists: [],
  980. initItemTypeId: "",
  981. guidelinesRules: {
  982. medicalCenterId: [
  983. { required: true, message: "请选择体检中心", trigger: "change" },
  984. ],
  985. forSexId: [
  986. { required: true, message: "请选择性别", trigger: "change" },
  987. ],
  988. guide: [{ required: true, message: "请输入指引信息", trigger: "blur" }],
  989. },
  990. collectItemType: [],
  991. diseaseScreeningType: [],
  992. barcodeMode: [
  993. {
  994. id: "0",
  995. displayName: "使用项目类别设置",
  996. },
  997. {
  998. id: "1",
  999. displayName: "打印人员登记号",
  1000. },
  1001. {
  1002. id: "2",
  1003. displayName: "不打印",
  1004. },
  1005. ],
  1006. };
  1007. },
  1008. created() {
  1009. // this.getlist();
  1010. this.gitprojectcategory();
  1011. },
  1012. mounted() {
  1013. this.rowDrop();
  1014. this.gitfleslist();
  1015. this.typeid();
  1016. },
  1017. updated() {
  1018. this.$nextTick(() => {
  1019. this.$refs.table.doLayout();
  1020. });
  1021. },
  1022. computed: {
  1023. ...mapState(["window", "dict"]),
  1024. },
  1025. methods: {
  1026. dddw,
  1027. changeBox(type) {
  1028. //赋值
  1029. if (this.form[type + "Box"]) {
  1030. this.$delete(this.form, type);
  1031. this.$set(this.form, type, "Y");
  1032. } else {
  1033. this.$delete(this.form, type);
  1034. this.$set(this.form, type, "N");
  1035. }
  1036. },
  1037. removeAsbItem(row) {
  1038. this.ary2 = [row];
  1039. },
  1040. chooseAsbItem(row) {
  1041. this.ary1 = [row];
  1042. },
  1043. changeUpdate(e, k) {
  1044. this.$delete(this.form, k);
  1045. this.$set(this.form, k, e);
  1046. },
  1047. projectCancellation() {
  1048. if (this.form.id == undefined || this.form.id == "") {
  1049. this.$message.warning("请选择组合项目");
  1050. this.isdislob = true;
  1051. } else {
  1052. this.rowick(this.form);
  1053. this.isdislob = true;
  1054. }
  1055. },
  1056. remoteMethods(keyWords) {
  1057. if (keyWords) {
  1058. this.filetelists = [];
  1059. this.initfiletelists.forEach((item) => {
  1060. if (
  1061. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
  1062. -1 ||
  1063. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  1064. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1065. ) {
  1066. this.filetelists.push(item);
  1067. }
  1068. });
  1069. } else {
  1070. this.filetelists = deepCopy(this.initfiletelists);
  1071. }
  1072. },
  1073. remoteMethod(keyWords) {
  1074. if (keyWords) {
  1075. this.projectid = [];
  1076. this.initprojectid.forEach((item) => {
  1077. if (
  1078. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
  1079. -1 ||
  1080. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  1081. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1082. ) {
  1083. this.projectid.push(item);
  1084. }
  1085. });
  1086. } else {
  1087. this.projectid = deepCopy(this.initprojectid);
  1088. }
  1089. },
  1090. OnsubmitDiagnosis() {
  1091. this.form.diagnosisFunction = this.diagnosisFunctionText;
  1092. this.diagnosisFunctionText = "";
  1093. this.diagnosisFunctionBox = false;
  1094. //this.$message.success("设置诊断函数成功");
  1095. },
  1096. quckRusetform(e) {
  1097. this.$forceUpdate();
  1098. },
  1099. typeid() {
  1100. projectlist().then((res) => {
  1101. if (res.code != -1) {
  1102. this.itemTypeId = res.data;
  1103. this.itemTypeId = this.formatData(this.itemTypeId);
  1104. }
  1105. });
  1106. },
  1107. formatData(dataList) {
  1108. for (let i = 0; i < dataList.length; i++) {
  1109. if (dataList[i].treeChildren.length < 1) {
  1110. dataList[i].treeChildren = undefined;
  1111. } else {
  1112. this.formatData(dataList[i].treeChildren);
  1113. }
  1114. }
  1115. return dataList;
  1116. },
  1117. treeclick(data) {
  1118. this.initItemTypeId = data.id;
  1119. postapi("/api/app/asbitem/getasbitemlist", { itemTypeId: data.id }).then(
  1120. (res) => {
  1121. if (res.code != -1) {
  1122. this.tableData = res.data;
  1123. // this.initTableData = [...res.data];
  1124. }
  1125. }
  1126. );
  1127. this.curRow = this.$options.data().curRow;
  1128. this.leftdata = this.$options.data().leftdata;
  1129. this.rightdata = this.$options.data().rightdata;
  1130. this.formdata = this.$options.data().formdata;
  1131. this.values = this.$options.data().values;
  1132. this.flitvalues = this.$options.data().flitvalues;
  1133. },
  1134. remoteMethodes(keyWords) {
  1135. if (keyWords) {
  1136. this.quckDepartment = [];
  1137. this.initTableData.forEach((item) => {
  1138. if (
  1139. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
  1140. -1 ||
  1141. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  1142. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1143. ) {
  1144. this.quckDepartment.push(item);
  1145. }
  1146. });
  1147. } else {
  1148. this.quckDepartment = deepCopy(this.initTableData);
  1149. }
  1150. },
  1151. quckDepartments(e) {
  1152. if (e) {
  1153. let currentKey = "";
  1154. this.quckDepartment.forEach((item) => {
  1155. if (e == item.id) {
  1156. currentKey = item.itemTypeId;
  1157. this.initItemTypeId = item.itemTypeId;
  1158. }
  1159. });
  1160. this.$refs["itemType"].setCurrentKey(currentKey);
  1161. let selected = this.$refs["itemType"].getCurrentNode();
  1162. if (
  1163. this.$refs["itemType"].getNode(selected) &&
  1164. this.$refs["itemType"].getNode(selected).parent
  1165. ) {
  1166. this.expandParents(this.$refs["itemType"].getNode(selected).parent);
  1167. }
  1168. // getapi(`/api/app/asbitem/in-item-type/${currentKey}`)
  1169. postapi("/api/app/asbitem/getasbitemlist", {
  1170. itemTypeId: currentKey,
  1171. }).then((res) => {
  1172. if (res.code != -1) {
  1173. this.tableData = res.data;
  1174. this.tableData.forEach((item, index) => {
  1175. if (e == item.id) {
  1176. this.$refs["tableData"].setCurrentRow(item);
  1177. this.rowick(item);
  1178. this.tableScrollToRow(this.$refs.tableData, index);
  1179. this.searchup(item, index);
  1180. }
  1181. });
  1182. }
  1183. });
  1184. } else {
  1185. this.remoteMethodes();
  1186. }
  1187. },
  1188. searchup(data, index) {
  1189. this.$nextTick(() => {
  1190. if (index == 0) {
  1191. index = 1;
  1192. }
  1193. const targetTop = this.$refs["tableData"].$el
  1194. .querySelectorAll(".el-table__body tr")
  1195. [index - 1].getBoundingClientRect().top;
  1196. const containerTop = this.$refs["tableData"].$el
  1197. .querySelector(".el-table__body")
  1198. .getBoundingClientRect().top;
  1199. const scrollParent = this.$refs["tableData"].$el.querySelector(
  1200. ".el-table__body-wrapper"
  1201. );
  1202. scrollParent.scrollTop = targetTop - containerTop;
  1203. });
  1204. },
  1205. expandParents(node) {
  1206. node.expanded = true;
  1207. if (node.parent) {
  1208. this.expandParents(node.parent);
  1209. }
  1210. },
  1211. tableScrollToRow(tableElement, rowIndex) {
  1212. let theTableRows = tableElement.bodyWrapper.querySelectorAll(
  1213. ".el-table__body tbody .el-table__row"
  1214. );
  1215. let scrollTop = 0;
  1216. for (let i = 0; i < theTableRows.length; i++) {
  1217. if (i === rowIndex) {
  1218. break;
  1219. }
  1220. scrollTop += theTableRows[i].offsetHeight;
  1221. }
  1222. tableElement.bodyWrapper.scrollTop = scrollTop;
  1223. },
  1224. guiderow(row) {
  1225. this.guideform = row;
  1226. },
  1227. tableRowClassName({ row, rowIndex }) {
  1228. row.index = rowIndex;
  1229. },
  1230. //指引信息删除
  1231. deleteguidelines() {
  1232. if (this.curRow.id == undefined || this.curRow.id == "") {
  1233. this.$message.warning("请先选择组合项目");
  1234. } else {
  1235. if (
  1236. this.guideform.asbitemId == "" ||
  1237. this.guideform.asbitemId == undefined
  1238. ) {
  1239. this.$message.warning("请选择删除的数据");
  1240. } else {
  1241. this.$confirm("此操作确定后将永久删除该记录, 是否继续?", "提示", {
  1242. confirmButtonText: "是",
  1243. cancelButtonText: "否",
  1244. type: "warning",
  1245. cancelButtonClass: "difference",
  1246. confirmButtonClass: "commonbutton",
  1247. })
  1248. .then(() => {
  1249. this.formdata.guidanceinformationdata.splice(
  1250. this.guideform.index,
  1251. 1
  1252. );
  1253. })
  1254. .catch((err) => {
  1255. if (err == "cancel") {
  1256. this.$message.info("已取消删除");
  1257. }
  1258. });
  1259. }
  1260. }
  1261. },
  1262. //确定新增或者修改指引ruleForm
  1263. determineguidelines() {
  1264. this.$refs.ruleForms.validate((v) => {
  1265. if (v) {
  1266. postapi("/api/app/asbitem-guide", this.guideform).then((res) => {
  1267. if (res.code != -1) {
  1268. this.guidetitledialogVisible = false;
  1269. this.getobtainguidance();
  1270. //this.$message.success("创建成功");
  1271. }
  1272. });
  1273. }
  1274. });
  1275. },
  1276. //新增或者编辑需要的api中的id
  1277. publicapi() {
  1278. //获取体检中心
  1279. getapi("/api/app/organization-units/by-code-all").then((res) => {
  1280. if (res.code != -1) {
  1281. this.organizationUnitdata = res.data;
  1282. }
  1283. });
  1284. //获取组合项目
  1285. // getapi("/api/app/asbitem/in-filter").then((res) => {
  1286. // this.asbitemdata = res.data.items;
  1287. // });
  1288. postapi("/api/app/asbitem/getasbitemlist").then((res) => {
  1289. if (res.code != -1) {
  1290. this.asbitemdata = res.data;
  1291. }
  1292. });
  1293. //获取适用性别
  1294. getapi("/api/app/for-sex").then((res) => {
  1295. if (res.code != -1) {
  1296. this.forsexdata = res.data;
  1297. }
  1298. });
  1299. },
  1300. //创建弹框
  1301. createabulletbox() {
  1302. // this.guidetitledialogVisible = true;
  1303. // this.guideform = {};
  1304. // this.guidetitle = 1;
  1305. // this.publicapi();
  1306. if (this.curRow.id == undefined || this.curRow.id == "") {
  1307. this.$message.warning("请先选择组合项目");
  1308. } else {
  1309. let peisid = "";
  1310. if (
  1311. window.sessionStorage.getItem("peisid") === "null" ||
  1312. window.sessionStorage.getItem("peisid") === undefined ||
  1313. window.sessionStorage.getItem("peisid") === null
  1314. ) {
  1315. peisid = "";
  1316. } else {
  1317. peisid = window.sessionStorage.getItem("peisid");
  1318. }
  1319. this.formdata.guidanceinformationdata.push({
  1320. medicalCenterId: peisid,
  1321. asbitemId: this.curRow.id,
  1322. forSexId: "A",
  1323. guide: "",
  1324. });
  1325. }
  1326. },
  1327. saveguidelines() {
  1328. this.$refs["guidanceinformation"].validate((valid, fields) => {
  1329. if (!valid) {
  1330. this.$message.warning(fields[Object.keys(fields)[0]][0].message);
  1331. return false;
  1332. }
  1333. if (this.curRow.id == undefined || this.curRow.id == "") {
  1334. this.$message.warning("请先选择组合项目");
  1335. } else {
  1336. let sampleGroupId = this.curRow.id;
  1337. let sdate = [];
  1338. this.formdata.guidanceinformationdata.forEach((element) => {
  1339. sdate.push({
  1340. medicalCenterId: element.medicalCenterId,
  1341. forSexId: element.forSexId,
  1342. guide: element.guide,
  1343. });
  1344. });
  1345. postapi("/api/app/asbitemguide/createasbitemguidemany", {
  1346. asbitemId: sampleGroupId,
  1347. deatils: sdate,
  1348. }).then((res) => {
  1349. if (res.code != -1) {
  1350. //this.$message.success("保存成功");
  1351. }
  1352. });
  1353. }
  1354. });
  1355. },
  1356. //获取指引信息guidanceinformationdata
  1357. getobtainguidance(e) {
  1358. if (e != undefined || e != "") {
  1359. getapi(`/api/app/asbitemguide/getlistinasbitemid?AsbitemId=${e}`).then(
  1360. (res) => {
  1361. if (res.data != -1) {
  1362. this.formdata.guidanceinformationdata = [...res.data];
  1363. }
  1364. }
  1365. );
  1366. } else {
  1367. this.$message.warning("请先选择组合项目");
  1368. }
  1369. },
  1370. //获取项目
  1371. gitfleslist() {
  1372. getporjectlists().then((res) => {
  1373. if (res.code != -1) {
  1374. this.filetelists = res.data;
  1375. this.initfiletelists = [...res.data];
  1376. }
  1377. });
  1378. },
  1379. //搜索选择
  1380. selectitem(v) {
  1381. if (v) {
  1382. if (this.curRow.id == undefined || this.curRow.id == "") {
  1383. this.$message.warning("请先选择组合项目");
  1384. } else {
  1385. this.itemid = v.id;
  1386. if (this.rightdata.length < 1) {
  1387. this.rightdata.push({ displayName: v.displayName, id: v.id });
  1388. this.isdislob = false;
  1389. } else {
  1390. for (let i = 0; i < this.rightdata.length; i++) {
  1391. if (v.id === this.rightdata[i].id) {
  1392. return this.$message.warning("已有该项目");
  1393. }
  1394. }
  1395. this.rightdata.push({ displayName: v.displayName, id: v.id });
  1396. this.isdislob = false;
  1397. }
  1398. this.$nextTick(() => {
  1399. this.$refs["quickAsbOCX"].blur(); //total asbItemId
  1400. this.flitvalues = "";
  1401. this.filetelists = deepCopy(this.initfiletelists);
  1402. this.$refs["quickAsbOCX"].focus(); //total asbItemId
  1403. });
  1404. }
  1405. } else {
  1406. this.remoteMethods();
  1407. }
  1408. },
  1409. Onsubmit() {
  1410. let sampleGroupId = this.form.id;
  1411. let sdate = [];
  1412. // let sss = { itemId: this.itemid, asbitemId: sampleGroupId };
  1413. // sdate.push(sss);
  1414. this.rightdata.forEach((element) => {
  1415. sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
  1416. });
  1417. // this.leftdata.forEach((element) => {
  1418. // sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
  1419. // });
  1420. // this.leftdata.forEach((element) => {
  1421. // let sss = { sampleGroupId: sampleGroupId, asbitemId: element.id };
  1422. // sdate.push(sss);
  1423. // });
  1424. // sdate.push(sss);
  1425. if (sampleGroupId == undefined || sampleGroupId == "") {
  1426. this.$message.warning("请选择组合项目");
  1427. this.isdislob = true;
  1428. } else {
  1429. postapi("/api/app/asbitemdetail/createasbitemdetailmany", {
  1430. asbitemId: sampleGroupId,
  1431. details: sdate,
  1432. }).then((res) => {
  1433. if (res.code != -1) {
  1434. this.isdislob = true;
  1435. //this.$message.success("确定成功!");
  1436. }
  1437. });
  1438. }
  1439. // console.log(sdate);
  1440. // if (sampleGroupId == undefined) {
  1441. // this.$message.warning("请选择列表");
  1442. // } else if (this.itemid == "") {
  1443. // this.$message.warning("请选择项目");
  1444. // } else {
  1445. // postapi("/api/app/asbitem-detail/many", sdate).then((res) => {
  1446. // console.log("操作成功");
  1447. // this.isdislob = true;
  1448. // });
  1449. // }
  1450. },
  1451. dbClickChoosedAsb(row, column, event) {
  1452. let index = this.leftdata.findIndex((arr) => arr.id == row.id);
  1453. this.leftdata.splice(index, 1);
  1454. this.rightdata.push(row);
  1455. this.isdislob = false;
  1456. this.ary1 = [];
  1457. },
  1458. handleSelectionChange(val) {
  1459. this.ary1 = val;
  1460. },
  1461. addAbs() {
  1462. if (this.curRow.id == undefined || this.curRow.id == "") {
  1463. this.$message.warning("请先选择组合项目");
  1464. } else {
  1465. if (this.ary1.length < 1) {
  1466. this.$message.warning("请选择要添加的项目");
  1467. } else {
  1468. let temporaryLeft = [];
  1469. temporaryLeft = this.leftdata.filter(
  1470. (item) => !this.ary1.some((ele) => ele.id === item.id)
  1471. );
  1472. this.leftdata = [...temporaryLeft];
  1473. this.ary1.forEach((item) => {
  1474. this.rightdata.push(item);
  1475. });
  1476. this.isdislob = false;
  1477. this.ary1 = [];
  1478. }
  1479. }
  1480. },
  1481. removeAbs(row) {
  1482. let index = this.rightdata.findIndex((arr) => arr.id == row.id);
  1483. this.rightdata.splice(index, 1);
  1484. this.leftdata.push(row);
  1485. this.isdislob = false;
  1486. this.ary2 = [];
  1487. },
  1488. selecteditems(val) {
  1489. this.ary2 = val;
  1490. },
  1491. delAbs() {
  1492. if (this.curRow.id == undefined || this.curRow.id == "") {
  1493. this.$message.warning("请先选择组合项目");
  1494. } else {
  1495. if (this.ary2.length < 1) {
  1496. this.$message.warning("请选择要移除的项目");
  1497. } else {
  1498. let temporaryRight = [];
  1499. temporaryRight = this.rightdata.filter(
  1500. (item) => !this.ary2.some((ele) => ele.id === item.id)
  1501. );
  1502. this.rightdata = [...temporaryRight];
  1503. this.ary2.forEach((item) => {
  1504. this.leftdata.push(item);
  1505. });
  1506. this.isdislob = false;
  1507. this.ary2 = [];
  1508. }
  1509. }
  1510. },
  1511. //右侧双击移动删除
  1512. rightdelite(item, index) {
  1513. this.isdislob = false;
  1514. this.rightdata.splice(index, 1);
  1515. this.leftdata.push(item);
  1516. // this.updatedate();
  1517. },
  1518. //右侧点击选中
  1519. rightindex(item, index) {
  1520. this.nums = index;
  1521. this.leftobj = item;
  1522. // console.log(this.leftobj);
  1523. },
  1524. //左侧添加按钮
  1525. addobj() {
  1526. if (this.leftdata.length > 0) {
  1527. this.leftdata.splice(this.num, 1);
  1528. this.rightdata.push(this.rightobj);
  1529. this.isdislob = false;
  1530. }
  1531. },
  1532. //右移动
  1533. removeright() {
  1534. if (this.rightdata.length > 0) {
  1535. this.rightdata.splice(this.num, 1);
  1536. this.leftdata.push(this.leftobj);
  1537. this.isdislob = false;
  1538. // this.isdislob=false
  1539. this.updatedate();
  1540. }
  1541. },
  1542. //q全移去
  1543. allclear() {
  1544. if (this.curRow.id == undefined || this.curRow.id == "") {
  1545. this.$message.warning("请先选择组合项目");
  1546. } else {
  1547. if (this.rightdata.length > 0) {
  1548. this.rightdata.forEach((item) => {
  1549. this.leftdata.push(item);
  1550. });
  1551. this.rightdata = [];
  1552. this.isdislob = false;
  1553. } else {
  1554. this.$message.warning("没有可移除的项目");
  1555. }
  1556. }
  1557. },
  1558. //全添加
  1559. addall() {
  1560. if (this.curRow.id == undefined || this.curRow.id == "") {
  1561. this.$message.warning("请先选择组合项目");
  1562. } else {
  1563. if (this.leftdata.length > 0) {
  1564. this.leftdata.forEach((item) => {
  1565. this.rightdata.push(item);
  1566. });
  1567. this.leftdata = [];
  1568. this.isdislob = false;
  1569. } else {
  1570. this.$message.warning("没有可添加的项目");
  1571. }
  1572. }
  1573. },
  1574. //左侧双击事件
  1575. shuanji(item, index) {
  1576. this.leftdata.splice(index, 1);
  1577. this.rightdata.push(item);
  1578. this.isdislob = false;
  1579. },
  1580. clickPaixu(item, index) {
  1581. this.rightobj = item;
  1582. this.num = index;
  1583. },
  1584. //获取项目类别 3a0b0b10-719f-5824-6956-8cb70f204013 /api/app/item-type/by-code-all
  1585. gitprojectcategory() {
  1586. getapi("/api/app/item-type/by-code-all").then((res) => {
  1587. if (res.code != -1) {
  1588. this.projectid = res.data;
  1589. this.initprojectid = [...res.data];
  1590. }
  1591. });
  1592. postapi("/api/app/asbitem/getasbitemlist").then((res) => {
  1593. if (res.code != -1) {
  1594. this.initTableData = res.data;
  1595. this.quckDepartment = [...res.data];
  1596. }
  1597. });
  1598. postapi("/api/app/DiseaseScreeningType/GetList").then((res) => {
  1599. if (res.code != -1) {
  1600. this.diseaseScreeningType = [...res.data];
  1601. }
  1602. });
  1603. // groupsandlist(this.pages).then((res) => {
  1604. // if(res.code!=-1){
  1605. // this.initTableData = [...res.data.items];
  1606. // this.quckDepartment=res.data.items;
  1607. // initTableData
  1608. // }
  1609. // });
  1610. },
  1611. //ary1 需要追加的数据 ary2目标数组
  1612. updatedate() {
  1613. this.ary1.forEach((item) => {
  1614. let iscz = false;
  1615. this.ary2.forEach((item2) => {
  1616. if (item2.id == item.id) {
  1617. iscz = true;
  1618. }
  1619. });
  1620. if (!iscz) {
  1621. this.ary2.push(item);
  1622. // this.allid.push({ id: item.id });
  1623. }
  1624. });
  1625. },
  1626. ischangsItemTypeId(v) {
  1627. if (v.length > 1) {
  1628. this.form.itemTypeId = this.form.itemTypeId.slice(-1)[0];
  1629. } else {
  1630. this.form.itemTypeId = this.form.itemTypeId[0];
  1631. }
  1632. this.$refs.itemTypeIds.toggleDropDownVisible();
  1633. },
  1634. //项目类别选择
  1635. ischangs(v) {
  1636. if (v) {
  1637. if (this.curRow.id == undefined || this.curRow.id == "") {
  1638. this.$message.warning("请先选择组合项目");
  1639. } else {
  1640. this.$refs.example.toggleDropDownVisible();
  1641. let last = v.slice(-1)[0];
  1642. getapi(`/api/app/item/in-item-type/${last}`).then((res) => {
  1643. if (res.code != -1) {
  1644. let bq = [];
  1645. bq = res.data.filter(
  1646. (item) => !this.rightdata.some((ele) => ele.id === item.id)
  1647. );
  1648. this.leftdata = [...bq];
  1649. }
  1650. });
  1651. }
  1652. } else {
  1653. this.remoteMethod();
  1654. }
  1655. },
  1656. bindidclose() {
  1657. this.form = this.$options.data().form;
  1658. },
  1659. rowDrop() {
  1660. this.$nextTick(() => {
  1661. const tbody = document.querySelector(".el-table__body-wrapper tbody");
  1662. const _this = this;
  1663. Sortable.create(tbody, {
  1664. handle: ".move",
  1665. animation: 300,
  1666. onChoose({ oldIndex }) {
  1667. _this.$refs["tableData"].setCurrentRow(_this.tableData[oldIndex]);
  1668. },
  1669. onEnd({ newIndex, oldIndex }) {
  1670. _this.isshow = false;
  1671. const currRow = _this.tableData.splice(oldIndex, 1)[0];
  1672. _this.tableData.splice(newIndex, 0, currRow);
  1673. _this.rowick(_this.tableData[newIndex]);
  1674. _this.tableData.map((item, index) => {
  1675. if (index == newIndex && index == oldIndex) {
  1676. } else if (index == oldIndex) {
  1677. } else if (index == newIndex) {
  1678. }
  1679. });
  1680. },
  1681. });
  1682. });
  1683. },
  1684. //取消按钮
  1685. cancellation() {
  1686. postapi("/api/app/asbitem/getasbitemlist", {
  1687. itemTypeId: this.initItemTypeId,
  1688. }).then((res) => {
  1689. if (res.code != -1) {
  1690. this.tableData = res.data;
  1691. this.$message.info("操作取消");
  1692. this.isshow = true;
  1693. }
  1694. });
  1695. },
  1696. //确定排序
  1697. assertion() {
  1698. const result = [];
  1699. this.tableData.forEach((item, index) => {
  1700. // const currentDisplayOrder = this.initTableData[index].displayOrder;
  1701. // if (item.displayOrder != currentDisplayOrder) {
  1702. result.push({ id: item.id, displayOrder: index + 1 });
  1703. // }
  1704. });
  1705. combination({ itemList: result }).then((res) => {
  1706. if (res.code != -1) {
  1707. //this.$message.success("操作成功");
  1708. this.isshow = true;
  1709. }
  1710. // this.getlist();
  1711. });
  1712. },
  1713. //置底
  1714. setlow() {
  1715. this.form = { ...this.curRow };
  1716. if (this.form.id == undefined) {
  1717. this.$message.warning("请选择操作的数据");
  1718. } else {
  1719. samplesetlow(this.form.id, 2).then((res) => {
  1720. if (res.code != -1) {
  1721. this.getItemIdList();
  1722. //this.$message.success("操作成功");
  1723. }
  1724. });
  1725. }
  1726. },
  1727. //置顶
  1728. topping() {
  1729. this.form = { ...this.curRow };
  1730. if (this.form.id == undefined) {
  1731. this.$message.warning("请选择操作的数据");
  1732. } else {
  1733. samplesetlow(this.form.id, 1).then((res) => {
  1734. if (res.code != -1) {
  1735. this.getItemIdList();
  1736. //this.$message.success("操作成功");
  1737. }
  1738. });
  1739. }
  1740. },
  1741. //删除
  1742. deleteid() {
  1743. this.form = { ...this.curRow };
  1744. if (this.form.id == undefined) {
  1745. this.$message.warning("请选择操作的数据");
  1746. } else {
  1747. this.$confirm("是否确认删除, 是否继续?", "提示", {
  1748. confirmButtonText: "确定",
  1749. cancelButtonText: "取消",
  1750. type: "warning",
  1751. cancelButtonClass: "difference",
  1752. confirmButtonClass: "commonbutton",
  1753. }).then(() => {
  1754. deletescombinationprojectid(this.form.id).then((res) => {
  1755. if (res.code != -1) {
  1756. this.getItemIdList();
  1757. this.curRow = this.$options.data().curRow;
  1758. //this.$message.success("删除成功");
  1759. }
  1760. });
  1761. });
  1762. // deletescombinationprojectid(this.form.id).then((res) => {
  1763. // console.log("删除成功");
  1764. // this.getlist();
  1765. // });
  1766. }
  1767. },
  1768. //编辑弹框
  1769. editpopup() {
  1770. this.form = { ...this.curRow };
  1771. if (this.form.id == undefined) {
  1772. this.$message.warning("请点击选择操作的数据");
  1773. } else {
  1774. this.form.price = Number(this.form.price);
  1775. this.title = 2;
  1776. this.dialogVisible = true;
  1777. if (this.$refs.ruleForm !== undefined) {
  1778. this.$refs.ruleForm.resetFields();
  1779. }
  1780. asbitemgetid(this.form.id).then((res) => {
  1781. if (res.code != -1) {
  1782. this.form = { ...res.data };
  1783. if (res.data.isDiagnosisFunction == "Y") {
  1784. this.form.isDiagnosisFunctionBox = true;
  1785. } else {
  1786. this.form.isDiagnosisFunctionBox = false;
  1787. }
  1788. }
  1789. });
  1790. //性别
  1791. // examinationgender().then((res) => {
  1792. // this.forSexId = res.data;
  1793. // });
  1794. //适用性别
  1795. getapi("/api/app/for-sex").then((res) => {
  1796. if (res.code != -1) {
  1797. this.forSexId = res.data;
  1798. }
  1799. });
  1800. //项目类别
  1801. // projectlist().then((res) => {
  1802. // this.itemTypeId = res.data;
  1803. // });
  1804. //仪器类别
  1805. instrumentlist().then((res) => {
  1806. if (res.code != -1) {
  1807. this.deviceTypeId = res.data;
  1808. }
  1809. });
  1810. // //发票项目类别
  1811. // invoicetypelist().then((res) => {
  1812. // if (res.code != -1) {
  1813. // this.invoiceItemTypeId = res.data;
  1814. // }
  1815. // });
  1816. postapi("/api/app/CollectItemType/GetList").then((res) => {
  1817. if (res.code != -1) {
  1818. this.collectItemType = [...res.data];
  1819. }
  1820. });
  1821. }
  1822. },
  1823. editcancellation() {
  1824. this.dialogVisible = false;
  1825. // this.$refs.itemTypeIds.toggleDropDownVisible();
  1826. },
  1827. //确定新增或者编辑
  1828. addoredit() {
  1829. this.$refs.ruleForm.validate((v) => {
  1830. if (v) {
  1831. let obj = Object.assign({}, this.form, { price: Number(this.form.price) })
  1832. if (this.title == 1) {
  1833. newcombination(obj).then((res) => {
  1834. if (res.code != -1) {
  1835. this.getItemIdList();
  1836. this.dialogVisible = false;
  1837. this.$nextTick(() => {
  1838. this.$refs["tableData"].setCurrentRow(res.data);
  1839. this.rowick(res.data);
  1840. });
  1841. //this.$message.success("新增成功");
  1842. // this.$refs.itemTypeIds.toggleDropDownVisible();
  1843. }
  1844. });
  1845. } else if (this.title == 2) {
  1846. updateombination(this.form.id, obj).then((res) => {
  1847. if (res.code != -1) {
  1848. this.tableData.forEach((item, index) => {
  1849. if (res.data.id == item.id) {
  1850. this.$set(this.tableData, index, res.data);
  1851. }
  1852. });
  1853. this.dialogVisible = false;
  1854. this.$nextTick(() => {
  1855. this.rowick(res.data);
  1856. });
  1857. //this.$message.success("修改成功");
  1858. // this.$refs.itemTypeIds.toggleDropDownVisible();
  1859. }
  1860. });
  1861. }
  1862. }
  1863. });
  1864. },
  1865. getItemIdList() {
  1866. postapi("/api/app/asbitem/getasbitemlist", {
  1867. itemTypeId: this.initItemTypeId,
  1868. }).then((res) => {
  1869. if (res.code != -1) {
  1870. this.tableData = res.data;
  1871. }
  1872. });
  1873. },
  1874. //新增弹框
  1875. addll() {
  1876. if (this.initItemTypeId == undefined || this.initItemTypeId == "") {
  1877. this.$message.warning("请选择项目类别");
  1878. } else {
  1879. this.dialogVisible = true;
  1880. this.title = 1;
  1881. if (this.$refs.ruleForm !== undefined) {
  1882. this.$refs.ruleForm.resetFields();
  1883. }
  1884. this.form = this.$options.data().form;
  1885. this.form.itemTypeId = this.initItemTypeId;
  1886. this.$nextTick(() => {
  1887. this.$refs.refinput.focus();
  1888. });
  1889. //性别
  1890. // examinationgender().then((res) => {
  1891. // if (res.code != -1) {
  1892. // this.forSexId = res.data;
  1893. // }
  1894. // });
  1895. getapi("/api/app/for-sex").then((res) => {
  1896. if (res.code != -1) {
  1897. this.forSexId = res.data;
  1898. }
  1899. });
  1900. // //项目类别
  1901. // projectlist().then((res) => {
  1902. // this.itemTypeId = res.data;
  1903. // });
  1904. //仪器类别
  1905. instrumentlist().then((res) => {
  1906. if (res.code != -1) {
  1907. this.deviceTypeId = res.data;
  1908. }
  1909. });
  1910. // //发票项目类别
  1911. // invoicetypelist().then((res) => {
  1912. // if (res.code != -1) {
  1913. // this.invoiceItemTypeId = res.data;
  1914. // }
  1915. // });
  1916. postapi("/api/app/CollectItemType/GetList").then((res) => {
  1917. if (res.code != -1) {
  1918. this.collectItemType = [...res.data];
  1919. }
  1920. });
  1921. }
  1922. },
  1923. rowick(row) {
  1924. this.curRow = { ...row };
  1925. this.form = { ...row };
  1926. // asbitemgetid(row.id).then((res) => {
  1927. // this.curRow = { ...res.data };
  1928. // this.form = res.data;
  1929. // });
  1930. this.values = row.itemTypeId;
  1931. getapi(
  1932. `/api/app/asbitem-detail/asbitem-detail-in-item?AsbitemId=${row.id}`
  1933. ).then((res) => {
  1934. if (res.code != -1) {
  1935. this.rightdata = [...res.data];
  1936. getapi(`/api/app/item/in-item-type/${this.values}`).then((res) => {
  1937. // this.leftdata = [...res.data];
  1938. if (res.code != -1) {
  1939. let bq = [];
  1940. bq = res.data.filter(
  1941. (item) => !this.rightdata.some((ele) => ele.id === item.id)
  1942. );
  1943. this.leftdata = [...bq];
  1944. }
  1945. });
  1946. }
  1947. });
  1948. this.getobtainguidance(this.curRow.id);
  1949. this.publicapi();
  1950. },
  1951. getSummaries(param) {
  1952. const { columns, data } = param;
  1953. const sums = [];
  1954. columns.forEach((column, index) => {
  1955. if (index === 0) {
  1956. sums[index] = "合计";
  1957. return;
  1958. }
  1959. if (index === 1) {
  1960. sums[index] = data.length + "个";
  1961. return;
  1962. }
  1963. });
  1964. return sums;
  1965. },
  1966. getlist() {
  1967. groupsandlist().then((res) => {
  1968. if (res.code != -1) {
  1969. this.initTableData = [...res.data];
  1970. this.tableData = [...res.data];
  1971. this.quckDepartment = [...res.data];
  1972. }
  1973. });
  1974. },
  1975. },
  1976. };
  1977. </script>
  1978. <style scoped>
  1979. @import "../../assets/css/global_button.css";
  1980. @import "../../assets/css/global_dialog.css";
  1981. @import "../../assets/css/global_table.css";
  1982. @import "../../assets/css/global_form.css";
  1983. @import "../../assets/css/global_input.css";
  1984. @import "../../assets/css/global.css";
  1985. .mainleftbox {
  1986. flex: 1;
  1987. }
  1988. .Selectbutton {
  1989. margin: 0 20px;
  1990. display: flex;
  1991. flex-direction: column;
  1992. justify-content: center;
  1993. align-items: center;
  1994. }
  1995. .mainbox {
  1996. display: flex;
  1997. justify-content: center;
  1998. margin-top: 5px;
  1999. }
  2000. .box {
  2001. display: flex;
  2002. flex-direction: column;
  2003. }
  2004. /* form表单每一项的下边距 */
  2005. :deep .el-form-item {
  2006. margin-bottom: 14px;
  2007. }
  2008. /* 去掉input textarea的手动扩张样式 */
  2009. :deep(.el-textarea__inner) {
  2010. resize: none;
  2011. }
  2012. /* el-dialog的头部样式 */
  2013. :deep .el-dialog__header {
  2014. padding: 11px 20px 11px;
  2015. }
  2016. /* el-dialog的主体样式 */
  2017. :deep .el-dialog__body {
  2018. padding: 0px 20px 0px;
  2019. }
  2020. /* el-divider样式 */
  2021. :deep .el-divider--horizontal {
  2022. margin: 0px 0 12px;
  2023. }
  2024. /* el-dialog的底部样式 */
  2025. :deep .el-dialog__footer {
  2026. padding: 0px 20px 14px;
  2027. }
  2028. /* 默认结果后面下拉框样式 */
  2029. :deep .downText .el-input--suffix .el-input__inner {
  2030. width: 0;
  2031. height: 100%;
  2032. padding: 0 19px;
  2033. }
  2034. /* 默认结果后面下拉框图标样式 */
  2035. :deep .downText .el-input--suffix .el-input__suffix {
  2036. right: 12px;
  2037. }
  2038. /* 默认结果后面下拉框 */
  2039. :deep .downText {
  2040. display: flex !important;
  2041. }
  2042. /* 诊断函数后面按钮样式 */
  2043. :deep .el-input-group__append {
  2044. padding: 0 11px;
  2045. }
  2046. /* 默认结果整体样式 */
  2047. .my-el-form-item :deep .el-form-item__content {
  2048. line-height: 0 !important;
  2049. }
  2050. .my-el-form-item :deep .el-input__icon {
  2051. line-height: 0 !important;
  2052. }
  2053. /* 指引信息 */
  2054. .guidelines :deep .el-form-item {
  2055. margin-bottom: 0;
  2056. }
  2057. .seachinput {
  2058. width: 250px;
  2059. margin-right: 110px;
  2060. }
  2061. :deep .seachinput .el-select {
  2062. width: 100%;
  2063. }
  2064. .layeredleftright {
  2065. width: 95%;
  2066. display: flex;
  2067. flex-direction: column;
  2068. }
  2069. :deep .el-tree-node>.el-tree-node__children {
  2070. overflow: visible;
  2071. }
  2072. :deep .el-form-item {
  2073. margin-bottom: 8px;
  2074. }
  2075. </style>