csx 2 lat temu
rodzic
commit
13e105a1fe

Plik diff jest za duży
+ 106 - 292
package-lock.json


+ 9 - 9
src/utils/request.js Wyświetl plik

11
 })
11
 })
12
 
12
 
13
 // request interceptor
13
 // request interceptor
14
-// service.interceptors.request.use(config => {
14
+service.interceptors.request.use(config => {
15
 //   Do something before request is sent
15
 //   Do something before request is sent
16
-//   if (store.getters.token) {
16
+  if (store.getters.token) {
17
 //     让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
17
 //     让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
18
-//     config.headers['X-Token'] = getToken()
19
-//   }
20
-//   return config
21
-// }, error => {
18
+    config.headers['token_cookie'] = ""
19
+  }
20
+  return config
21
+}, error => {
22
 //   Do something with request error
22
 //   Do something with request error
23
-//   console.log(error) // for debug
24
-//   Promise.reject(error)
25
-// })
23
+  console.log(error) // for debug
24
+  Promise.reject(error)
25
+})
26
 
26
 
27
 // respone interceptor
27
 // respone interceptor
28
 service.interceptors.response.use(
28
 service.interceptors.response.use(

+ 12 - 9
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue Wyświetl plik

1089
         //   this.$message.error('该处方已经结算或者退费,无法继续添加处方')
1089
         //   this.$message.error('该处方已经结算或者退费,无法继续添加处方')
1090
         //   return
1090
         //   return
1091
         // }
1091
         // }
1092
-        if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
1093
-          this.$message.error('当前处方无数据,新增数据后才能新增处方')
1094
-          return
1092
+        // if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
1093
+        //   this.$message.error('当前处方无数据,新增数据后才能新增处方')
1094
+        //   return
1095
+        // }
1096
+        if (this.prescriptions.length == 0){
1097
+          this.tabIndex = 1
1098
+        }else{
1099
+          var str = this.prescriptions[this.prescriptions.length - 1].name
1100
+          var reg =/[\u4e00-\u9fa5]/g;
1101
+          this.tabIndex = parseInt(str.replace(reg, ""))
1102
+          ++this.tabIndex
1095
         }
1103
         }
1096
-
1097
-        this.tabIndex = this.prescriptions.length
1098
-
1099
-        ++this.tabIndex
1100
         let newTabName = '处方' + this.tabIndex
1104
         let newTabName = '处方' + this.tabIndex
1101
-
1102
         var nowDate = new Date()
1105
         var nowDate = new Date()
1103
         var nowYear = nowDate.getFullYear()
1106
         var nowYear = nowDate.getFullYear()
1104
         var nowMonth = nowDate.getMonth() + 1
1107
         var nowMonth = nowDate.getMonth() + 1
1122
           advices: [],
1125
           advices: [],
1123
           project: [],
1126
           project: [],
1124
           addition: [],
1127
           addition: [],
1125
-          pre_time: this.prescriptions[0].pre_time
1128
+          pre_time: nowTime,
1126
 
1129
 
1127
           // pre_time: nowTime
1130
           // pre_time: nowTime
1128
 
1131