Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

prescriptionTable.vue 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. <template>
  2. <div class="prescriptionTable">
  3. <el-table v-if="activeType == 1" :data="prescription.advices" border style="width: 99.9%;"
  4. :row-style="{ color: '#303133' }"
  5. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
  6. <el-table-column align="center" prop="day" width="70" label="序号">
  7. <template slot-scope="scope">
  8. <div style="display:flex;align-items:center;">
  9. <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.groupno" placeholder=""></el-input>
  10. </div>
  11. </template>
  12. </el-table-column>
  13. <el-table-column align="center" prop="drug_name" label="名称">
  14. <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span>
  15. </template>
  16. </el-table-column>
  17. <el-table-column label="规格" width="60">
  18. <template slot-scope="scope">
  19. <!-- {{ scope.row.drug_spec }} -->
  20. <span v-if="scope.row.drug.min_unit != scope.row.drug.dose_unit">{{scope.row.drug.dose}}{{scope.row.drug.dose_unit}}&nbsp;* &nbsp;</span>{{scope.row.drug.min_number}}{{scope.row.drug.min_unit}}/{{scope.row.drug.max_unit}}
  21. </template>
  22. </el-table-column>
  23. <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
  24. <template slot-scope="scope">
  25. <div style="display:flex;align-items:center;">
  26. <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.single_dose" @input="getAllChange(scope)"
  27. style="width:50%;"></el-input>
  28. <!-- <div>{{scope.row.single_dose_unit}}</div> -->
  29. <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
  30. @change="getAllChange(scope)">
  31. <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
  32. <el-option :label="scope.row.drug.dose_unit"
  33. v-if="scope.row.drug.dose_unit != scope.row.drug.min_unit"
  34. :value="scope.row.drug.dose_unit"></el-option>
  35. </el-select>
  36. </div>
  37. </template>
  38. </el-table-column>
  39. <el-table-column align="center" prop="delivery_way" width="100" label="用法">
  40. <template slot-scope="scope">
  41. <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.delivery_way" placeholder="请选择">
  42. <el-option
  43. v-for="(item,index) in drugways"
  44. :key="index"
  45. :label="item.name"
  46. :value="item.name">
  47. </el-option>
  48. </el-select>
  49. </template>
  50. </el-table-column>
  51. <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
  52. <template slot-scope="scope">
  53. <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChange(scope)">
  54. <el-option
  55. v-for="item,index in efs"
  56. :key="index"
  57. :label="item.name"
  58. :value="item.name">
  59. </el-option>
  60. </el-select>
  61. </template>
  62. </el-table-column>
  63. <el-table-column align="center" prop="day" width="70" label="天数">
  64. <template slot-scope="scope">
  65. <div style="display:flex;align-items:center;">
  66. <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
  67. {{'天'}}
  68. </div>
  69. </template>
  70. </el-table-column>
  71. <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
  72. <template slot-scope="scope">
  73. <div style="display:flex;align-items:center;">
  74. <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.prescribing_number" @input="changePrescribingNumber(scope)"
  75. style="width:50%" placeholder=""></el-input>
  76. <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
  77. <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
  78. @change="getPrescribingNumberUnit(scope)">
  79. <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
  80. <el-option :label="scope.row.drug.max_unit"
  81. v-if="scope.row.drug.min_unit != scope.row.drug.max_unit"
  82. :value="scope.row.drug.max_unit"></el-option>
  83. </el-select>
  84. </div>
  85. </template>
  86. </el-table-column>
  87. <el-table-column align="center" prop="retail_price" width="80" label="单价">
  88. <template slot-scope="scope">
  89. <div style="display:flex;align-items:center;">
  90. <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
  91. <div>{{'元'}}</div>
  92. </div>
  93. </template>
  94. </el-table-column>
  95. <el-table-column align="center" prop="hosp_appr_flag" width="100" label="医院审批标志">
  96. <template slot-scope="scope">
  97. <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.hosp_appr_flag" placeholder="请选择">
  98. <el-option label="审批通过" value="1"></el-option>
  99. <el-option label="无须审批" value="3"></el-option>
  100. <el-option label="审批不通过" value="2"></el-option>
  101. </el-select>
  102. </template>
  103. </el-table-column>
  104. <el-table-column align="center" prop="remark" width="50" label="备注">
  105. <template slot-scope="scope">
  106. <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
  107. </template>
  108. </el-table-column>
  109. <el-table-column align="center" width="40" prop="name" label="操作">
  110. <template slot-scope="scope">
  111. <i class="el-icon-delete" @click="deleteDrug(scope.$index, scope.row)"></i>
  112. </template>
  113. </el-table-column>
  114. </el-table>
  115. <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;"
  116. :row-style="{ color: '#303133' }"
  117. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
  118. <el-table-column align="center" type="index" width="40" label="序号">
  119. <template slot-scope="scope">{{scope.$index+1}}</template>
  120. </el-table-column>
  121. <el-table-column align="center" prop="project_name" label="名称">
  122. <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span>
  123. </template>
  124. </el-table-column>
  125. <el-table-column align="center" width="60" label="规格">
  126. <template slot-scope="scope">
  127. {{scope.row.type == 2?'':scope.row.good_info.specification_name}}
  128. </template>
  129. </el-table-column>
  130. <el-table-column align="center" prop="statistical_classification" width="100" label="组">
  131. <template slot-scope="scope">{{scope.row.type ==
  132. 2?scope.row.statistical_classification:scope.row.statistical_classification}}
  133. </template>
  134. </el-table-column>
  135. <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
  136. <template slot-scope="scope">
  137. <div style="display:flex;align-items:center;">
  138. <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)"
  139. placeholder=""></el-input>
  140. <div>{{scope.row.unit}}</div>
  141. </div>
  142. </template>
  143. </el-table-column>
  144. <el-table-column align="center" prop="delivery_way" width="80" label="用法">
  145. <template slot-scope="scope">
  146. <el-autocomplete
  147. style="width:100%;"
  148. class="inline-input"
  149. v-model="scope.row.delivery_way"
  150. :fetch-suggestions="querySearch2"
  151. placeholder="请输入内容"
  152. ></el-autocomplete>
  153. </template>
  154. </el-table-column>
  155. <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
  156. <template slot-scope="scope">
  157. <el-input v-model="scope.row.execution_frequency" @input="getProjectSingleDose(scope)"
  158. placeholder=""></el-input>
  159. </template>
  160. </el-table-column>
  161. <el-table-column align="center" prop="number_days" width="70" label="天数">
  162. <template slot-scope="scope">
  163. <div style="display:flex;align-items:center;">
  164. <el-input v-model="scope.row.number_days" @input="getProjectSingleDose(scope)"
  165. placeholder=""></el-input>
  166. <div>{{'天'}}</div>
  167. </div>
  168. </template>
  169. </el-table-column>
  170. <el-table-column align="center" prop="total" width="70" label="总量">
  171. <template slot-scope="scope">
  172. <div style="display:flex;align-items:center;">
  173. <el-input v-model="scope.row.total" style="width:60%" placeholder=""></el-input>
  174. <div>{{scope.row.unit}}</div>
  175. </div>
  176. </template>
  177. </el-table-column>
  178. <el-table-column align="center" prop="name" width="70" label="单价">
  179. <template slot-scope="scope">
  180. <div style="display:flex;align-items:center;">
  181. <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
  182. <div>{{'元'}}</div>
  183. </div>
  184. </template>
  185. </el-table-column>
  186. <el-table-column align="center" prop="name" width="50" label="备注">
  187. <template slot-scope="scope">
  188. <el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
  189. </template>
  190. </el-table-column>
  191. <el-table-column align="center" width="40" prop="name" label="操作">
  192. <template slot-scope="scope">
  193. <i class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)"></i>
  194. </template>
  195. </el-table-column>
  196. </el-table>
  197. <div class="additionalBox">
  198. <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
  199. <span :title="item.item_name">{{item.item_name}}</span>
  200. <el-input v-model="item.price" placeholder="" style="width:50px;"></el-input>
  201. <el-input v-model="item.count" placeholder="" style="width:50px;"></el-input>
  202. <i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>
  203. </div>
  204. </div>
  205. </div>
  206. </template>
  207. <script>
  208. import { getDictionaryDataConfig } from '@/utils/data'
  209. import { delHisAddition, delHisAdvice, delHisProject, getInitData } from '@/api/his/his'
  210. export default {
  211. props: {
  212. preDrugs: Array,
  213. activeType: Number,
  214. addtions_charge: Array,
  215. prescription: {
  216. type: Object,
  217. default: function() {
  218. return {
  219. name: '',
  220. advices: [],
  221. project: [],
  222. drugways: [],
  223. efs: []
  224. }
  225. }
  226. }
  227. },
  228. data() {
  229. return {
  230. advices: [],
  231. tableData: [],
  232. newoptions: [{
  233. value: '1',
  234. label: '1'
  235. }, {
  236. value: '2',
  237. label: '2'
  238. }, {
  239. value: '3',
  240. label: '3'
  241. }, {
  242. value: '4',
  243. label: '4'
  244. }, {
  245. value: '5',
  246. label: '5'
  247. }],
  248. value: '1',
  249. input: 1,
  250. efs: [],
  251. drugways: []
  252. }
  253. },
  254. methods: {
  255. createFilter(queryString) {
  256. return (restaurant) => {
  257. return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
  258. }
  259. },
  260. querySearch2(queryString, cb) {
  261. var restaurants = this.getDictionaryDataConfig('system', 'project_use')
  262. restaurants.map(item => {
  263. item.value = item.name
  264. })
  265. var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
  266. // 调用 callback 返回建议列表的数据
  267. cb(results)
  268. },
  269. delAddition(index, addition) {
  270. if (this.prescription.order_status == 2) {
  271. this.$message.error('该处方已经结算,无法删除')
  272. return
  273. }
  274. this.$confirm('附加费删除后不可恢复,是否确认删除', '删除', {
  275. confirmButtonText: '确 定',
  276. cancelButtonText: '取 消',
  277. type: 'warning'
  278. }).then(() => {
  279. this.$nextTick(function() {
  280. if (addition.id == 0) {
  281. this.prescription.addition.splice(index, 1)
  282. } else {
  283. let params = {
  284. 'id': addition.id
  285. }
  286. delHisAddition(params).then(response => {
  287. if (response.data.state == 0) {
  288. this.$message.error(response.data.msg)
  289. return false
  290. } else {
  291. var temp2 = this.deepClone(this.prescription.addition)
  292. temp2.splice(index, 1)
  293. this.prescription.addition = temp2
  294. this.$message.success(response.data.data.msg)
  295. }
  296. })
  297. }
  298. })
  299. })
  300. .catch(() => {
  301. })
  302. },
  303. getInitData() {
  304. getInitData().then(response => {
  305. if (response.data.state == 0) {
  306. this.$message.error(response.data.msg)
  307. return false
  308. } else {
  309. this.drugways = response.data.data.drugways
  310. this.efs = response.data.data.efs
  311. }
  312. })
  313. }, deleteDrug: function(index, row) {
  314. if (this.prescription.is_medicine_status){
  315. this.$message.error('该处方包含已发药的药品,无法删除')
  316. return
  317. }
  318. if (this.prescription.order_status == 2 || this.prescription.order_status == 4) {
  319. this.$message.error('该处方已经结算,无法删除')
  320. return
  321. }
  322. this.$confirm('药品删除后不可恢复,是否确认删除', '删除', {
  323. confirmButtonText: '确 定',
  324. cancelButtonText: '取 消',
  325. type: 'warning'
  326. }).then(() => {
  327. this.$nextTick(function() {
  328. if (row.advice_id == 0) {
  329. this.prescription.advices.splice(index, 1)
  330. } else {
  331. let params = {
  332. 'id': row.advice_id
  333. }
  334. delHisAdvice(params).then(response => {
  335. if (response.data.state == 0) {
  336. this.$message.error(response.data.msg)
  337. return false
  338. } else {
  339. var temp2 = this.deepClone(this.prescription.advices)
  340. temp2.splice(index, 1)
  341. this.prescription.advices = temp2
  342. this.$message.success(response.data.data.msg)
  343. this.$emit("getSunziValue",temp2)
  344. }
  345. })
  346. }
  347. })
  348. })
  349. .catch(() => {
  350. })
  351. }, deepClone(source) {
  352. if (!source && typeof source !== 'object') {
  353. throw new Error('error arguments', 'shallowClone')
  354. }
  355. const targetObj = source.constructor === Array ? [] : {}
  356. Object.keys(source).forEach((keys) => {
  357. if (source[keys] && typeof source[keys] === 'object') {
  358. targetObj[keys] = this.deepClone(source[keys])
  359. } else {
  360. targetObj[keys] = source[keys]
  361. }
  362. })
  363. return targetObj
  364. },
  365. setNewData: function(data) {
  366. this.prescription = data
  367. // this.prescription.advices = data.advices
  368. },
  369. getDictionaryDataConfig(module, filed_name) {
  370. return getDictionaryDataConfig(module, filed_name)
  371. },
  372. getGroup(id) {
  373. var name = ''
  374. var statistics_category = getDictionaryDataConfig('system', 'statistics_category')
  375. console.log('2235', statistics_category)
  376. for (let i = 0; i < statistics_category.length; i++) {
  377. if (id == statistics_category[i].id) {
  378. name = statistics_category[i].name
  379. }
  380. }
  381. return name
  382. },
  383. deleteProject(row, i) {
  384. if (this.prescription.order_status == 2 || this.prescription.order_status == 4) {
  385. this.$message.error('该处方已经结算,无法删除')
  386. return
  387. }
  388. this.$confirm('项目删除后不可恢复,是否确认删除', '删除', {
  389. confirmButtonText: '确 定',
  390. cancelButtonText: '取 消',
  391. type: 'warning'
  392. }).then(() => {
  393. if (row.id == 0) {
  394. this.prescription.project.splice(i, 1)
  395. } else {
  396. let params = {
  397. 'id': row.id
  398. }
  399. delHisProject(params).then(response => {
  400. if (response.data.state == 0) {
  401. this.$message.error(response.data.msg)
  402. return false
  403. } else {
  404. for (let i = 0; i < this.prescription.project.length; i++) {
  405. if (this.prescription.project[i].id == row.id) {
  406. this.prescription.project.splice(i, 1)
  407. }
  408. }
  409. this.$message.success(response.data.data.msg)
  410. }
  411. })
  412. }
  413. })
  414. .catch(() => {
  415. })
  416. },
  417. getAllChange(scope) {
  418. console.log("2332323232我的",scope.row.drug)
  419. if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
  420. if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
  421. scope.row.prescribing_number = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)
  422. } else {
  423. scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1)) * (scope.row.day ? scope.row.day : 1) / scope.row.drug.min_number)
  424. }
  425. } else {
  426. if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
  427. scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose)
  428. } else {
  429. scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose / scope.row.drug.min_number)
  430. }
  431. }
  432. if (scope.row.prescribing_number == 0) {
  433. scope.row.prescribing_number = 1
  434. }
  435. if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
  436. // scope.row.retail_price = scope.row.drug.min_number / scope.row.retail_price
  437. if (scope.row.prescribing_number > scope.row.drug.sum_count) {
  438. this.$message.error(scope.row.drug_name + '库存不足')
  439. }
  440. } else {
  441. if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.sum_count) {
  442. this.$message.error(scope.row.drug_name + '库存不足')
  443. }
  444. // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
  445. }
  446. },
  447. getPrescribingNumberUnit(scope) {
  448. console.log('scope9999999',scope)
  449. // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
  450. // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
  451. // scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
  452. // }else{
  453. // scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number)
  454. // }
  455. // }else{
  456. // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
  457. // scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose)
  458. // }else{
  459. // scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose / scope.row.drug.min_number)
  460. // }
  461. // }
  462. // if(scope.row.prescribing_number == 0){
  463. // scope.row.prescribing_number = 1
  464. // }
  465. if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
  466. scope.row.retail_price = scope.row.drug.min_price
  467. // if (scope.row.prescribing_number > scope.row.drug.total) {
  468. // this.$message.error(scope.row.drug_name + '库存不足')
  469. // }
  470. } else {
  471. // if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
  472. // this.$message.error(scope.row.drug_name + '库存不足')
  473. // }
  474. scope.row.retail_price = scope.row.drug.retail_price
  475. }
  476. },
  477. changePrescribingNumber(scope) {
  478. if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
  479. if (parseInt(scope.row.prescribing_number) > scope.row.drug.sum_count) {
  480. this.$message.error(scope.row.drug_name + '库存不足')
  481. }
  482. } else {
  483. if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.sum_count) {
  484. this.$message.error(scope.row.drug_name + '库存不足')
  485. }
  486. }
  487. },
  488. getProjectSingleDose(scope) {
  489. this.prescription.project[scope.$index].total = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.number_days ? scope.row.number_days : 1)
  490. if (this.prescription.project[scope.$index].total == 0) {
  491. this.prescription.project[scope.$index].total = 1
  492. }
  493. },
  494. getProjectDay(scope) {
  495. this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
  496. if (this.prescription.project[scope.$index].total == 0) {
  497. this.prescription.project[scope.$index].total = 1
  498. }
  499. },
  500. getNum(execution_frequency) {
  501. let arr = [
  502. { name: '立即执行', count: 1 },
  503. { name: '透析时', count: 1 },
  504. { name: '透析1h一次', count: 1 },
  505. { name: '透析2h一次', count: 1 },
  506. { name: '透析3h一次', count: 1 },
  507. { name: '每日一次', count: 1 },
  508. { name: '每日两次', count: 2 },
  509. { name: '每日三次', count: 3 },
  510. { name: '每晚一次', count: 1 },
  511. { name: '每晚', count: 1 },
  512. { name: '上机前', count: 1 },
  513. { name: '下机前', count: 1 },
  514. { name: '透析后立即', count: 1 },
  515. { name: '持续使用', count: 1 },
  516. { name: '临时开药', count: 1 },
  517. { name: '临睡前', count: 1 },
  518. { name: '隔日一次', count: 1 },
  519. { name: '隔三日一次', count: 1 },
  520. { name: '每二小时一次', count: 12 },
  521. { name: '每四小时一次', count: 6 },
  522. { name: '每六小时一次', count: 4 },
  523. { name: '每八小时一次', count: 3 }
  524. ]
  525. let num = ''
  526. arr.map(item => {
  527. if (item.name == execution_frequency) {
  528. num = item.count
  529. }
  530. })
  531. if (num == '') {
  532. num = 1
  533. }
  534. return num
  535. }
  536. }, mounted() {
  537. this.getInitData()
  538. },
  539. watch: {
  540. 'prescription.advices': {
  541. handler(newVal, oldVal) {
  542. },
  543. deep: true
  544. },
  545. // "prescription.project":{
  546. // handler(newVal,oldVal){
  547. // newVal.map((item,index) => {
  548. // if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
  549. // item.total = item.single_dose * item.number_days
  550. // }
  551. // })
  552. // },
  553. // deep:true
  554. // }
  555. }
  556. }
  557. </script>
  558. <style lang="scss">
  559. .prescriptionTable {
  560. .el-input__inner {
  561. padding: 0 5px;
  562. }
  563. .additionalBox {
  564. margin-top: 20px;
  565. display: flex;
  566. flex-wrap: wrap;
  567. .additionalOne {
  568. margin-right: 20px;
  569. margin-bottom: 10px;
  570. display: flex;
  571. align-items: center;
  572. > span {
  573. white-space: nowrap;
  574. overflow: hidden;
  575. text-overflow: ellipsis;
  576. width: 80px;
  577. display: inline-block;
  578. font-size: 14px;
  579. }
  580. }
  581. .deleteIcon {
  582. color: red;
  583. margin-left: 5px;
  584. }
  585. }
  586. .el-table th .cell, .el-table td .cell {
  587. padding: 0 2px;
  588. white-space: pre-line;
  589. }
  590. .el-icon-delete {
  591. color: red;
  592. }
  593. }
  594. </style>