Browse Source

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 years ago
parent
commit
efbd848bf8

+ 45 - 0
src/api/data.js View File

@@ -62,3 +62,48 @@ export function getPrintTemplate() {
62 62
     method: 'get'
63 63
   })
64 64
 }
65
+
66
+
67
+
68
+
69
+export function createDictionaryConfig(params) {
70
+  console.log('params', params)
71
+  return request({
72
+    url: '/api/dictionary/createconfig',
73
+    method: 'post',
74
+    data: params
75
+  })
76
+}
77
+
78
+export function createDictionaryChildConfig(params) {
79
+  return request({
80
+    url: '/api/dictionary/createchildconfig',
81
+    method: 'post',
82
+    data: params
83
+  })
84
+}
85
+
86
+export function updateDictionaryChildConfig(params) {
87
+  console.log('params', params)
88
+  return request({
89
+    url: '/api/dictionary/updatechildconfig',
90
+    method: 'post',
91
+    data: params
92
+  })
93
+}
94
+
95
+export function deleteDictionaryChildConfig(params) {
96
+  return request({
97
+    url: '/api/dictionary/deletechildconfig',
98
+    method: 'post',
99
+    data: params
100
+  })
101
+}
102
+
103
+export function updateDictionaryTemplate(params) {
104
+  return request({
105
+    url: '/api/dictionary/updatetemplate',
106
+    method: 'post',
107
+    data: params
108
+  })
109
+}

+ 9 - 0
src/api/datastore.js View File

@@ -7,3 +7,12 @@ export function getConfigList(params) {
7 7
     data: params
8 8
   })
9 9
 }
10
+
11
+
12
+export function getDictionaryConfigList(params) {
13
+  return request({
14
+    url: '/api/dictionary/getconfiglist',
15
+    method: 'get',
16
+    data: params
17
+  })
18
+}

+ 3 - 0
src/store/getters.js View File

@@ -18,6 +18,9 @@ const getters = {
18 18
   data: state => state.data,
19 19
   configlist: state => state.data.configlist,
20 20
 
21
+  dictionary_configlist: state => state.data.dictionary_configlist,
22
+
23
+
21 24
   xt_permission: state => state.xt_permission,
22 25
   xt_user: state => state.xt_user,
23 26
   schedule_type_selected: state => state.xt_user.schedule_type_selected,

+ 123 - 4
src/store/modules/data.js View File

@@ -1,14 +1,17 @@
1
-import { getConfigList } from '@/api/datastore'
2
-import { getDataConfigList, setDataConfigList } from '@/utils/data_config' // getConfigList from sessionStorage
1
+import { getConfigList,getDictionaryConfigList } from '@/api/datastore'
2
+import { getDataConfigList, setDataConfigList,getDataDictionaryConfigList,setDataDictionaryConfigList } from '@/utils/data_config' // getConfigList from sessionStorage
3 3
 
4 4
 const data = {
5 5
   state: {
6
-    configlist: ''
6
+    configlist: '',
7
+    dictionary_configlist:'',
7 8
   },
8 9
 
9 10
   mutations: {
10 11
     SET_CONFIGLIST: (state, configlist) => {
11 12
       state.configlist = configlist
13
+    }, SET_DICTIONARY_CONFIGLIST: (state, configlist) => {
14
+      state.dictionary_configlist = configlist
12 15
     }
13 16
 
14 17
   },
@@ -34,6 +37,26 @@ const data = {
34 37
         }).catch(error => {
35 38
           reject(error)
36 39
         })
40
+
41
+
42
+        getDictionaryConfigList().then(response => {
43
+          if (!response.data) { // 由于mockjs 不支持自定义状态码只能这样hack
44
+            reject('error')
45
+          }
46
+          const list = response.data.data
47
+          // console.log('请求返回的数据:', list)
48
+          if (list) { // 验证返回的configlist是否是一个非空数组
49
+            // console.log('转换的configlist为:', list.configlist)
50
+            commit('SET_DICTIONARY_CONFIGLIST', list.configlist)
51
+            setDataDictionaryConfigList(JSON.stringify(list.configlist))
52
+            resolve()
53
+          } else {
54
+            reject('getInfo: configlist must be a non-null array !')
55
+          }
56
+        }).catch(error => {
57
+          reject(error)
58
+        })
59
+
37 60
       })
38 61
     },
39 62
     updateConfigList({ commit }, configArr) {
@@ -128,7 +151,103 @@ const data = {
128 151
         setDataConfigList(JSON.stringify(infoJSON))
129 152
         resolve()
130 153
       })
131
-    }
154
+    },
155
+    updateDictionaryConfigList({ commit }, configArr) {
156
+      var oldconfiglist = getDataDictionaryConfigList()
157
+      var infoJSON = JSON.parse(oldconfiglist)
158
+      return new Promise((resolve, reject) => {
159
+        var module = configArr.module
160
+        if (infoJSON[module] === undefined) {
161
+          infoJSON[module] = []
162
+        }
163
+        infoJSON[module].push(configArr)
164
+        commit('SET_DICTIONARY_CONFIGLIST', infoJSON)
165
+        setDataDictionaryConfigList(JSON.stringify(infoJSON))
166
+        resolve()
167
+      })
168
+    },
169
+    updateChildDictionaryConfigList({ commit }, param) {
170
+      var configArr = param[0]
171
+      var state = param[1]
172
+      var oldconfiglist = getDataDictionaryConfigList()
173
+      var infoJSON = JSON.parse(oldconfiglist)
174
+      return new Promise((resolve, reject) => {
175
+        var module = configArr.module
176
+        var parentConfig = infoJSON[module]
177
+        var parent_id = configArr.parent_id
178
+        for (var i = 0; i < parentConfig.length; i++) {
179
+          var newconfig = parentConfig[i]
180
+          if (parent_id === newconfig.id) {
181
+            if (state === 'create') {
182
+              if (infoJSON[module][i]['childs'] === null) {
183
+                infoJSON[module][i]['childs'] = []
184
+              }
185
+              infoJSON[module][i]['childs'].unshift(configArr)
186
+              break
187
+            } else {
188
+              for (var j = 0; j < newconfig['childs'].length; j++) {
189
+                var newchildconfig = newconfig['childs'][j]
190
+                if (newchildconfig.org_id === 0 && newchildconfig.id === configArr.delete_id_system && configArr.status === 1) {
191
+                  infoJSON[module][i]['childs'][j] = configArr
192
+                  break
193
+                }
194
+                if (newchildconfig.id === configArr.id) {
195
+                  if (state === 'update') {
196
+                    infoJSON[module][i]['childs'][j] = configArr
197
+                  } else if (state === 'delete') {
198
+                    infoJSON[module][i]['childs'].splice(j, 1)
199
+                  }
200
+                  break
201
+                }
202
+              }
203
+            }
204
+            break
205
+          }
206
+        }
207
+        commit('SET_DICTIONARY_CONFIGLIST', infoJSON)
208
+        setDataDictionaryConfigList(JSON.stringify(infoJSON))
209
+        resolve()
210
+      })
211
+    },
212
+    updateParentDictionaryConfigList({ commit }, param) {
213
+      var configArr = param[0]
214
+      var state = param[1]
215
+      var oldconfiglist = getDataDictionaryConfigList()
216
+      var infoJSON = JSON.parse(oldconfiglist)
217
+      return new Promise((resolve, reject) => {
218
+        var module = configArr.module
219
+        if (infoJSON[module] === undefined) {
220
+          infoJSON[module] = []
221
+        }
222
+        if (state === 'create') {
223
+          infoJSON[module].push(configArr)
224
+        } else {
225
+          for (var i = 0; i < infoJSON[module].length; i++) {
226
+            var parentConfig = infoJSON[module][i]
227
+            if (parentConfig.org_id === 0 && parentConfig.id === configArr.delete_id_system && configArr.status === 1) {
228
+              infoJSON[module][i] = configArr
229
+              break
230
+            }
231
+
232
+            if (parentConfig.id === configArr.id) {
233
+              if (state === 'update') {
234
+                infoJSON[module][i] = configArr
235
+                break
236
+              } else if (state === 'delete') {
237
+                infoJSON[module].splice(i, 1)
238
+                break
239
+              }
240
+            }
241
+          }
242
+        }
243
+        commit('SET_DICTIONARY_CONFIGLIST', infoJSON)
244
+        setDataDictionaryConfigList(JSON.stringify(infoJSON))
245
+        resolve()
246
+      })
247
+    },
248
+
249
+
250
+
132 251
 
133 252
   }
134 253
 }

+ 38 - 0
src/utils/data.js View File

@@ -36,3 +36,41 @@ export function getDataConfig(module, field) {
36 36
     }
37 37
   }
38 38
 }
39
+
40
+
41
+export function getDictionaryDataConfig(module, field) {
42
+  var storeConfigList = store.getters.dictionary_configlist
43
+  var moduleConfig = storeConfigList[module]
44
+  if (moduleConfig == undefined) {
45
+    return false
46
+  }
47
+  if (module === 'summary' || module === 'education' || module === 'nursing_record' || module === 'special_record') {
48
+    var Aresult = []
49
+    for (var j = 0; j < moduleConfig.length; j++) {
50
+      var Atemp = []
51
+      var Aconfig = moduleConfig[j]
52
+      Atemp['id'] = Aconfig.value
53
+      Atemp['value'] = Aconfig.content
54
+      Atemp['text'] = Aconfig.title
55
+      Aresult.push(Atemp)
56
+    }
57
+    return Aresult
58
+  } else {
59
+    for (var i = 0; i < moduleConfig.length; i++) {
60
+      var newConfig = moduleConfig[i]
61
+      if (newConfig.field_name === field) {
62
+        var result = []
63
+        if (newConfig.childs != null) {
64
+          for (var j = 0; j < newConfig.childs.length; j++) {
65
+            var tempconfig = newConfig.childs[j]
66
+            var temp = []
67
+            temp['id'] = tempconfig.value
68
+            temp['name'] = tempconfig.name
69
+            result.push(temp)
70
+          }
71
+        }
72
+        return result
73
+      }
74
+    }
75
+  }
76
+}

+ 19 - 0
src/utils/data_config.js View File

@@ -2,6 +2,9 @@ const dataConfigKey = 'data_config_list'
2 2
 
3 3
 const filedConfigKey = 'filed_config_list'
4 4
 
5
+const dataDictionaryConfigKey = 'data_dictionary_config_list'
6
+
7
+
5 8
 
6 9
 
7 10
 export function getDataConfigList() {
@@ -29,3 +32,19 @@ export function setFiledConfigList(infoJSONStr) {
29 32
 export function removeFiledConfigList() {
30 33
   window.sessionStorage.removeItem(filedConfigKey)
31 34
 }
35
+
36
+
37
+
38
+
39
+export function getDataDictionaryConfigList() {
40
+  return window.sessionStorage.getItem(dataDictionaryConfigKey)
41
+}
42
+
43
+export function setDataDictionaryConfigList(infoJSONStr) {
44
+  window.sessionStorage.setItem(dataDictionaryConfigKey, infoJSONStr)
45
+}
46
+
47
+export function removeDataDictionaryConfigList() {
48
+  window.sessionStorage.removeItem(dataDictionaryConfigKey)
49
+}
50
+

+ 33 - 21
src/xt_pages/data/components/configure.vue View File

@@ -5,28 +5,36 @@
5 5
                 <el-input style="width: 180px;margin-right:10px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
6 6
                 <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7 7
             </div>
8
-            <el-table :data="drugList" border style="width: 100%" :row-style="{ color: '#303133' }" 
9
-             :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}" 
10
-              highlight-current-row
11
-             @current-change="handleRowChange">
12
-                <el-table-column prop="name" label="名称" align="center">
13
-                    <template slot-scope="scope">
14
-                        {{scope.row.name}}
15
-                    </template>
16
-                </el-table-column>
17
-                <el-table-column prop="field_name" label="字段名" align="center">
18
-                   <template slot-scope="scope">
19
-                      {{scope.row.field_name}}
20
-                   </template>
21
-                </el-table-column>
22
-            </el-table>
8
+            <!--<el-table :data="drugList" border style="width: 100%" :row-style="{ color: '#303133' }" -->
9
+             <!--:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}" -->
10
+              <!--highlight-current-row-->
11
+             <!--@current-change="handleRowChange">-->
12
+                <!--<el-table-column prop="name" label="名称" align="center">-->
13
+                    <!--<template slot-scope="scope">-->
14
+                        <!--{{scope.row.name}}-->
15
+                    <!--</template>-->
16
+                <!--</el-table-column>-->
17
+                <!--<el-table-column prop="field_name" label="字段名" align="center">-->
18
+                   <!--<template slot-scope="scope">-->
19
+                      <!--{{scope.row.field_name}}-->
20
+                   <!--</template>-->
21
+                <!--</el-table-column>-->
22
+            <!--</el-table>-->
23
+          <keep-alive>
24
+            <div>
25
+              <drug-table></drug-table>
26
+            </div>
27
+          </keep-alive>
28
+
23 29
         </div>
24 30
         <div style="width:50%;padding-left:10px;">
25
-            <el-button style="margin-bottom:10px;float:right;" class="filter-item" type="primary" @click="toAdd">新增</el-button>
26
-            <el-table :data="tableData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}">
27
-                <el-table-column prop="date" label="名称" align="center"></el-table-column>
28
-                <el-table-column prop="date" label="字段名" align="center"></el-table-column>
29
-            </el-table>
31
+          <drug-table-son></drug-table-son>
32
+
33
+          <!--<el-button style="margin-bottom:10px;float:right;" class="filter-item" type="primary" @click="toAdd">新增</el-button>-->
34
+            <!--<el-table :data="tableData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}">-->
35
+                <!--<el-table-column prop="date" label="名称" align="center"></el-table-column>-->
36
+                <!--<el-table-column prop="date" label="字段名" align="center"></el-table-column>-->
37
+            <!--</el-table>-->
30 38
             <add-configure ref="addConfigure"></add-configure>
31 39
         </div>
32 40
     </div>
@@ -38,8 +46,12 @@
38 46
 
39 47
 <script>
40 48
 import addConfigure from './addConfigure'
49
+import DrugTable from './drugTable'
50
+import DrugTableSon from './drugTableSon'
41 51
 export default {
42 52
     components:{
53
+      DrugTableSon,
54
+      DrugTable,
43 55
         addConfigure
44 56
     },
45 57
     data(){
@@ -59,7 +71,7 @@ export default {
59 71
       },
60 72
       handleRowChange(currentRow, oldCurrentRow){
61 73
          console.log("currentrow",currentRow.id)
62
-         this.currentId = currentRow.id;  
74
+         this.currentId = currentRow.id;
63 75
       },
64 76
     },
65 77
     created(){

+ 363 - 0
src/xt_pages/data/components/drugTable.vue View File

@@ -0,0 +1,363 @@
1
+<template>
2
+  <div class="" style="margin-right:20px;">
3
+    <el-table
4
+      style="margin-top: 42px;"
5
+      :row-style="{ color: '#303133' }"
6
+      :header-cell-style="{
7
+        backgroundColor: 'rgb(245, 247, 250)',
8
+        color: '#606266'
9
+      }"
10
+      :key="tableKey"
11
+      :data="list"
12
+      v-loading="listLoading"
13
+      border
14
+      fit
15
+      highlight-current-row
16
+      @current-change="handleRowChange"
17
+    >
18
+      <el-table-column align="center" label="名称">
19
+        <template slot-scope="scope">
20
+          <span>{{ scope.row.name }}</span>
21
+        </template>
22
+      </el-table-column>
23
+      <el-table-column align="center" label="字段名">
24
+        <template slot-scope="scope">
25
+          <span>{{ scope.row.field_name }}</span>
26
+        </template>
27
+      </el-table-column>
28
+    </el-table>
29
+
30
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
31
+      <el-form
32
+        :rules="rules"
33
+        ref="dataForm"
34
+        :model="temp"
35
+        label-width="70px"
36
+        style="width: 500px; margin-left:50px;"
37
+      >
38
+        <el-form-item :label="$t('data_config.config_name')" prop="config_name">
39
+          <el-input v-model="temp.name" placeholder="请输入名称"></el-input>
40
+        </el-form-item>
41
+        <el-form-item
42
+          :label="$t('data_config.config_field')"
43
+          prop="config_field"
44
+        >
45
+          <el-input
46
+            v-model="temp.field_name"
47
+            placeholder="请输入字段名称"
48
+          ></el-input>
49
+        </el-form-item>
50
+        <el-form-item :label="$t('data_config.remark')">
51
+          <el-input
52
+            type="textarea"
53
+            :autosize="{ minRows: 4, maxRows: 4 }"
54
+            placeholder="请输入备注"
55
+            v-model="temp.remark"
56
+          >
57
+          </el-input>
58
+        </el-form-item>
59
+      </el-form>
60
+      <div slot="footer" class="dialog-footer">
61
+        <el-button @click="dialogFormVisible = false">{{
62
+          $t("table.cancel")
63
+          }}</el-button>
64
+        <el-button
65
+          v-if="dialogStatus == 'create'"
66
+          type="primary"
67
+          @click="createData"
68
+        >{{ $t("table.confirm") }}</el-button
69
+        >
70
+        <el-button v-else type="primary" @click="updateData">{{
71
+          $t("table.confirm")
72
+          }}</el-button>
73
+      </div>
74
+    </el-dialog>
75
+
76
+    <el-dialog title="Reading statistics" :visible.sync="dialogPvVisible">
77
+      <el-table
78
+        :data="pvData"
79
+        border
80
+        fit
81
+        highlight-current-row
82
+        style="width: 100%"
83
+      >
84
+        <el-table-column prop="key" label="Channel"> </el-table-column>
85
+        <el-table-column prop="pv" label="Pv"> </el-table-column>
86
+      </el-table>
87
+      <span slot="footer" class="dialog-footer">
88
+        <el-button type="primary" @click="dialogPvVisible = false">{{
89
+          $t("table.confirm")
90
+        }}</el-button>
91
+      </span>
92
+    </el-dialog>
93
+  </div>
94
+</template>
95
+
96
+<script>
97
+  import { createDictionaryConfig } from "@/api/data";
98
+  import waves from "@/directive/waves"; // 水波纹指令
99
+  import { parseTime } from "@/utils";
100
+  import store from "@/store";
101
+  import bus from "@/assets/eventBus";
102
+  import { getDictionaryDataConfig } from "@/utils/data";
103
+
104
+
105
+  export default {
106
+    name: "drugTable",
107
+    directives: {
108
+      waves
109
+    },
110
+    props: {
111
+      type: {
112
+        type: String,
113
+        default: "patient"
114
+      }
115
+    },
116
+    data() {
117
+      return {
118
+        currentId: undefined,
119
+        tableKey: 0,
120
+        // list: null,
121
+        total: null,
122
+        listLoading: true,
123
+        listQuery: {
124
+          page: 1,
125
+          limit: 20,
126
+          importance: undefined,
127
+          title: undefined,
128
+          type: this.type,
129
+          sort: "+id"
130
+        },
131
+        importanceOptions: [1, 2, 3],
132
+        // calendarTypeOptions,
133
+        sortOptions: [
134
+          { label: "ID Ascending", key: "+id" },
135
+          { label: "ID Descending", key: "-id" }
136
+        ],
137
+        statusOptions: ["published", "draft", "deleted"],
138
+        showReviewer: false,
139
+        temp: {
140
+          id: undefined,
141
+          parent_id: 0,
142
+          module: this.type,
143
+          org_id: 0,
144
+          name: "",
145
+          field_name: undefined,
146
+          value: "",
147
+          remark: ""
148
+        },
149
+        dialogFormVisible: false,
150
+        dialogStatus: "",
151
+        textMap: {
152
+          update: "修改",
153
+          create: "新增"
154
+        },
155
+        dialogPvVisible: false,
156
+        pvData: [],
157
+        rules: {
158
+          name: [{ required: true, message: "请输入名称", trigger: "blur" }],
159
+          field_name: [
160
+            { required: true, message: "请输入字段名", trigger: "blur" }
161
+          ],
162
+          config_value: [
163
+            { required: false, message: "title is required", trigger: "blur" }
164
+          ]
165
+        },
166
+        downloadLoading: false
167
+      };
168
+    },
169
+    watch: {
170
+      "temp.config_field": function() {
171
+        this.temp.config_field = this.temp.config_field.replace(/[^A-Za-z]/g, "");
172
+      }
173
+    },
174
+    computed: {
175
+      list: function() {
176
+        // const list = store.getters.configlist[this.type]
177
+        // this.total = list.length
178
+        return store.getters.dictionary_configlist['system'];
179
+      }
180
+    },
181
+    filters: {
182
+      statusFilter(status) {
183
+        const statusMap = {
184
+          published: "success",
185
+          draft: "info",
186
+          deleted: "danger"
187
+        };
188
+        return statusMap[status];
189
+      },
190
+      typeFilter(type) {
191
+        return calendarTypeKeyValue[type];
192
+      }
193
+    },
194
+    created() {
195
+      this.getList();
196
+    },
197
+    methods: {
198
+      fieldChange: function(newValue) {
199
+        this.temp.config_field = newValue.replace(/[^A-Za-z]/g, "");
200
+      },
201
+      handleRowChange(currentRow, oldCurrentRow) {
202
+        if (currentRow != undefined) {
203
+          this.currentId = currentRow.id;
204
+          bus.$emit("drugParentChangeId", currentRow);
205
+        }
206
+      },
207
+      getList() {
208
+        // debugger
209
+        // var test = getConfig('patient','blood_types')
210
+        this.listLoading = true;
211
+        setTimeout(() => {
212
+          this.listLoading = false;
213
+        }, 1 * 1000);
214
+      },
215
+      handleFilter() {
216
+        this.listQuery.page = 1;
217
+        this.getList();
218
+      },
219
+      handleSizeChange(val) {
220
+        this.listQuery.limit = val;
221
+        this.getList();
222
+      },
223
+      handleCurrentChange(val) {
224
+        this.listQuery.page = val;
225
+        this.getList();
226
+      },
227
+      handleModifyStatus(row, status) {
228
+        this.$message({
229
+          message: "操作成功",
230
+          type: "success"
231
+        });
232
+        row.status = status;
233
+      },
234
+      resetTemp() {
235
+        this.temp = {
236
+          id: undefined,
237
+          parent_id: 0,
238
+          module: this.type,
239
+          org_id: 0,
240
+          name: "",
241
+          field_name: undefined,
242
+          value: "",
243
+          remark: ""
244
+        };
245
+      },
246
+      handleCreate() {
247
+        this.resetTemp();
248
+        this.dialogStatus = "create";
249
+        this.dialogFormVisible = true;
250
+        this.$nextTick(() => {
251
+          this.$refs["dataForm"].clearValidate();
252
+        });
253
+      },
254
+      createData() {
255
+        this.$refs["dataForm"].validate(valid => {
256
+          if (valid) {
257
+            createDictionaryConfig(this.temp).then(response => {
258
+              if (!response.data) {
259
+                // 由于mockjs 不支持自定义状态码只能这样hack
260
+                reject("error");
261
+              }
262
+              if (response.data.state === 0) {
263
+                this.$message.error(response.data.msg);
264
+              }
265
+              const result = response.data.data.dataconfig;
266
+              // 更新store
267
+              store.dispatch("updateDictionaryConfigList", result).then(() => {});
268
+
269
+              this.dialogFormVisible = false;
270
+
271
+              this.$message.success("创建成功");
272
+            });
273
+          }
274
+        });
275
+      },
276
+      handleUpdate(row) {
277
+        this.temp = Object.assign({}, row); // copy obj
278
+        this.temp.timestamp = new Date(this.temp.timestamp);
279
+        this.dialogStatus = "update";
280
+        this.dialogFormVisible = true;
281
+        this.$nextTick(() => {
282
+          this.$refs["dataForm"].clearValidate();
283
+        });
284
+      },
285
+      updateData() {
286
+        this.$refs["dataForm"].validate(valid => {
287
+          if (valid) {
288
+            const tempData = Object.assign({}, this.temp);
289
+            tempData.timestamp = +new Date(tempData.timestamp); // change Thu Nov 30 2017 16:41:05 GMT+0800 (CST) to 1512031311464
290
+            updateArticle(tempData).then(() => {
291
+              for (const v of this.list) {
292
+                if (v.id === this.temp.id) {
293
+                  const index = this.list.indexOf(v);
294
+                  this.list.splice(index, 1, this.temp);
295
+                  break;
296
+                }
297
+              }
298
+              this.dialogFormVisible = false;
299
+
300
+              this.$message.success("更新成功");
301
+            });
302
+          }
303
+        });
304
+      },
305
+      handleDelete(row) {
306
+        this.$message.success("删除成功");
307
+
308
+        const index = this.list.indexOf(row);
309
+        this.list.splice(index, 1);
310
+      },
311
+      handleFetchPv(pv) {
312
+        fetchPv(pv).then(response => {
313
+          this.pvData = response.data.pvData;
314
+          this.dialogPvVisible = true;
315
+        });
316
+      },
317
+      handleDownload() {
318
+        this.downloadLoading = true;
319
+        import("@/vendor/Export2Excel").then(excel => {
320
+          const tHeader = ["timestamp", "title", "type", "importance", "status"];
321
+          const filterVal = [
322
+            "timestamp",
323
+            "title",
324
+            "type",
325
+            "importance",
326
+            "status"
327
+          ];
328
+          const data = this.formatJson(filterVal, this.list);
329
+          excel.export_json_to_excel({
330
+            header: tHeader,
331
+            data,
332
+            filename: "table-list"
333
+          });
334
+          this.downloadLoading = false;
335
+        });
336
+      },
337
+      formatJson(filterVal, jsonData) {
338
+        return jsonData.map(v =>
339
+          filterVal.map(j => {
340
+            if (j === "timestamp") {
341
+              return parseTime(v[j]);
342
+            } else {
343
+              return v[j];
344
+            }
345
+          })
346
+        );
347
+      }
348
+    }
349
+  };
350
+</script>
351
+<style>
352
+  .el-table td,
353
+  .el-table th.is-leaf,
354
+  .el-table--border,
355
+  .el-table--group {
356
+    border-color: #d0d3da;
357
+  }
358
+  .el-table--border::after,
359
+  .el-table--group::after,
360
+  .el-table::before {
361
+    background-color: #d0d3da;
362
+  }
363
+</style>

+ 489 - 0
src/xt_pages/data/components/drugTableSon.vue View File

@@ -0,0 +1,489 @@
1
+<template>
2
+  <div class="">
3
+    <div class="filter-container">
4
+      <el-button
5
+        style="float: right;"
6
+        class="filter-item"
7
+        size="small"
8
+        :disabled="addState"
9
+        @click="handleCreate"
10
+        type="primary"
11
+        icon="el-icon-circle-plus-outline"
12
+      >{{ $t("table.add") }}</el-button
13
+      >
14
+    </div>
15
+    <el-table
16
+      :row-style="{ color: '#303133' }"
17
+      :header-cell-style="{
18
+        backgroundColor: 'rgb(245, 247, 250)',
19
+        color: '#606266'
20
+      }"
21
+      :key="tableKey"
22
+      :data="list"
23
+      v-loading="listLoading"
24
+      border
25
+      fit
26
+      highlight-current-row
27
+    >
28
+      <el-table-column align="center" label="名称">
29
+        <template slot-scope="scope">
30
+          <span @click="handleUpdate(scope.row)">{{ scope.row.name }}</span>
31
+        </template>
32
+      </el-table-column>
33
+      <el-table-column
34
+        align="center"
35
+        :label="$t('table.actions')"
36
+        width="230"
37
+        class-name="small-padding fixed-width"
38
+      >
39
+        <template slot-scope="scope">
40
+          <el-tooltip class="item" effect="dark" content="编辑" placement="top">
41
+            <el-button
42
+              icon="el-icon-edit-outline"
43
+              type="primary"
44
+              size="small"
45
+              @click="handleUpdate(scope.row)"
46
+            ></el-button>
47
+          </el-tooltip>
48
+
49
+          <el-tooltip class="item" effect="dark" content="删除" placement="top">
50
+            <el-button
51
+              icon="el-icon-delete"
52
+              v-if="scope.row.status != 'deleted'"
53
+              size="small"
54
+              type="danger"
55
+              @click="handleModifyStatus(scope.row, 'deleted')"
56
+            >
57
+            </el-button>
58
+          </el-tooltip>
59
+        </template>
60
+      </el-table-column>
61
+    </el-table>
62
+
63
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
64
+      <el-form
65
+        :rules="rules"
66
+        ref="dataForm"
67
+        :model="temp"
68
+        label-position="right"
69
+        label-width="70px"
70
+      >
71
+        <el-row>
72
+          <el-col :span="12">
73
+            <el-form-item :label="$t('data_config.config_name')" prop="name">
74
+              <el-input v-model="temp.name" placeholder="请输入名称"></el-input>
75
+            </el-form-item>
76
+          </el-col>
77
+          <el-col :span="12">
78
+            <el-form-item label="排序" prop="order">
79
+              <el-input
80
+                type="age"
81
+                v-model.number="temp.orders"
82
+                placeholder="请输入排序值,数值越大,排序越靠前"
83
+              ></el-input>
84
+            </el-form-item>
85
+          </el-col>
86
+        </el-row>
87
+        <el-form-item :label="$t('data_config.remark')">
88
+          <el-input
89
+            type="textarea"
90
+            :autosize="{ minRows: 4, maxRows: 4 }"
91
+            placeholder="请输入备注"
92
+            v-model="temp.remark"
93
+          >
94
+          </el-input>
95
+        </el-form-item>
96
+      </el-form>
97
+      <div slot="footer" class="dialog-footer">
98
+        <el-button @click="dialogFormVisible = false">{{
99
+          $t("table.cancel")
100
+          }}</el-button>
101
+        <el-button
102
+          v-if="dialogStatus == 'create'"
103
+          type="primary"
104
+          @click="createData"
105
+        >{{ $t("table.confirm") }}</el-button
106
+        >
107
+        <el-button v-else type="primary" @click="updateData">{{
108
+          $t("table.confirm")
109
+          }}</el-button>
110
+      </div>
111
+    </el-dialog>
112
+
113
+    <el-dialog title="Reading statistics" :visible.sync="dialogPvVisible">
114
+      <el-table
115
+        :data="pvData"
116
+        border
117
+        fit
118
+        highlight-current-row
119
+        style="width: 100%"
120
+      >
121
+        <el-table-column prop="key" label="Channel"> </el-table-column>
122
+        <el-table-column prop="pv" label="Pv"> </el-table-column>
123
+      </el-table>
124
+      <span slot="footer" class="dialog-footer">
125
+        <el-button type="primary" @click="dialogPvVisible = false">{{
126
+          $t("table.confirm")
127
+        }}</el-button>
128
+      </span>
129
+    </el-dialog>
130
+  </div>
131
+</template>
132
+
133
+<script>
134
+  import {
135
+    fetchList,
136
+    fetchPv,
137
+    createArticle,
138
+    updateArticle
139
+  } from "@/api/article";
140
+  import waves from "@/directive/waves"; // 水波纹指令
141
+  import { parseTime } from "@/utils";
142
+  import store from "@/store";
143
+  import bus from "@/assets/eventBus";
144
+  import {
145
+    createConfig,
146
+    createDictionaryChildConfig,
147
+    updateDictionaryChildConfig,
148
+    deleteDictionaryChildConfig
149
+  } from "@/api/data";
150
+
151
+  const calendarTypeOptions = [
152
+    { key: "CN", display_name: "China" },
153
+    { key: "US", display_name: "USA" },
154
+    { key: "JP", display_name: "Japan" },
155
+    { key: "EU", display_name: "Eurozone" }
156
+  ];
157
+
158
+  // arr to obj ,such as { CN : "China", US : "USA" }
159
+  const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => {
160
+    acc[cur.key] = cur.display_name;
161
+    return acc;
162
+  }, {});
163
+
164
+  export default {
165
+    name: "drugTableSon",
166
+    directives: {
167
+      waves
168
+    },
169
+    props: {
170
+      type: {
171
+        type: String,
172
+        default: "patient"
173
+      }
174
+    },
175
+    data() {
176
+      return {
177
+        currentId: undefined,
178
+        tableKey: 0,
179
+        total: null,
180
+        listLoading: false,
181
+        listQuery: {
182
+          page: 1,
183
+          limit: 20,
184
+          importance: undefined,
185
+          title: undefined,
186
+          type: this.type,
187
+          sort: "+id"
188
+        },
189
+        importanceOptions: [1, 2, 3],
190
+        calendarTypeOptions,
191
+        sortOptions: [
192
+          { label: "ID Ascending", key: "+id" },
193
+          { label: "ID Descending", key: "-id" }
194
+        ],
195
+        statusOptions: ["published", "draft", "deleted"],
196
+        showReviewer: false,
197
+        temp: {
198
+          id: undefined,
199
+          parent_id: 0,
200
+          module: this.type,
201
+          org_id: 0,
202
+          name: "",
203
+          field_name: undefined,
204
+          value: "",
205
+          remark: "",
206
+          orders: 0
207
+        },
208
+        dialogFormVisible: false,
209
+        dialogStatus: "",
210
+        textMap: {
211
+          update: "编辑",
212
+          create: "新增"
213
+        },
214
+        dialogPvVisible: false,
215
+        pvData: [],
216
+        rules: {
217
+          name: [{ required: true, message: "请输入名称", trigger: "blur" }],
218
+          order: [
219
+            { type: "number", message: "排序必须为数字值", trigger: "blur" }
220
+          ]
221
+          // timestamp: [{ type: 'date', required: true, message: 'timestamp is required', trigger: 'change' }],
222
+          // title: [{ required: true, message: 'title is required', trigger: 'blur' }]
223
+        },
224
+        downloadLoading: false,
225
+        parentConfig: undefined,
226
+        addState: true
227
+      };
228
+    },
229
+    computed: {
230
+      list: function() {
231
+        if (this.parentConfig != undefined) {
232
+          this.addState = false;
233
+          const list = store.getters.dictionary_configlist[this.parentConfig.module];
234
+          for (var i = 0; i < list.length; i++) {
235
+            if (list[i].id === this.parentConfig.id) {
236
+              return list[i]["childs"];
237
+              break;
238
+            }
239
+          }
240
+          // return store.getters.configlist[this.parentConfig.module][this.parentConfig.index ]["childs"];
241
+        }
242
+      }
243
+    },
244
+    filters: {
245
+      statusFilter(status) {
246
+        const statusMap = {
247
+          published: "success",
248
+          draft: "info",
249
+          deleted: "danger"
250
+        };
251
+        return statusMap[status];
252
+      },
253
+      typeFilter(type) {
254
+        return calendarTypeKeyValue[type];
255
+      }
256
+    },
257
+    created() {
258
+      // this.getList()
259
+    },
260
+    mounted() {
261
+      var _this = this;
262
+      bus.$on("drugParentChangeId", function(parentData) {
263
+        _this.parentConfig = parentData;
264
+        // _this.list = parentData.childs
265
+        console.log(parentData)
266
+        _this.temp = {
267
+          id: undefined,
268
+          parent_id: parentData.id,
269
+          module: parentData.module,
270
+          org_id: parentData.org_id,
271
+          name: "",
272
+          field_name: undefined,
273
+          value: "",
274
+          remark: "",
275
+          orders: ""
276
+        };
277
+      });
278
+    },
279
+    methods: {
280
+      handleRowChange(currentRow, oldCurrentRow) {
281
+        this.currentId = currentRow.id;
282
+      },
283
+
284
+      handleFilter() {
285
+        this.listQuery.page = 1;
286
+        this.getList();
287
+      },
288
+      handleSizeChange(val) {
289
+        this.listQuery.limit = val;
290
+        this.getList();
291
+      },
292
+      handleCurrentChange(val) {
293
+        this.listQuery.page = val;
294
+        this.getList();
295
+      },
296
+      handleModifyStatus(row, status) {
297
+
298
+        this.temp = Object.assign({}, row); // copy obj
299
+        this.$confirm("此操作将永久删除该配置项, 是否继续?", "提示", {
300
+          confirmButtonText: "确 定",
301
+          cancelButtonText: "取 消",
302
+          type: "warning"
303
+        })
304
+          .then(() => {
305
+            const tempData = Object.assign({}, this.temp);
306
+            deleteDictionaryChildConfig(tempData).then(response => {
307
+              if (!response.data) {
308
+                // 由于mockjs 不支持自定义状态码只能这样hack
309
+                reject("error");
310
+              }
311
+              if (response.data.state === 0) {
312
+                this.$message.error(response.data.msg);
313
+              }
314
+
315
+              const result = response.data.data.dataconfig;
316
+              store
317
+                .dispatch("updateChildDictionaryConfigList", [tempData, "delete"])
318
+                .then(() => {
319
+                  next();
320
+                });
321
+            });
322
+
323
+            this.$message({
324
+              type: "success",
325
+              message: "删除成功!"
326
+            });
327
+          })
328
+          .catch(() => {
329
+            this.$message({
330
+              type: "info",
331
+              message: "已取消删除"
332
+            });
333
+          });
334
+      },
335
+      resetTemp() {
336
+        this.temp = {
337
+          id: undefined,
338
+          parent_id: this.parentConfig.id,
339
+          module: this.parentConfig.module,
340
+          org_id: this.parentConfig.org_id,
341
+          name: "",
342
+          field_name: undefined,
343
+          value: "",
344
+          remark: "",
345
+          orders: 0
346
+        };
347
+      },
348
+      handleCreate() {
349
+        this.resetTemp();
350
+        this.dialogStatus = "create";
351
+        // for (let i = 0; i < this.list.length; i++) {
352
+        //  if (
353
+        //    this.list[i].name == "无肝素" ||
354
+        //   this.list[i].name == "普通肝素" ||
355
+        //   this.list[i].name == "低分子肝素钠" ||
356
+        //    this.list[i].name == "低分子肝素钙" ||
357
+        //   this.list[i].name == "阿加曲班" ||
358
+        //    this.list[i].name == "枸橼酸钠"
359
+        //  ) {
360
+        //    this.$message.error("该项暂不支持新增");
361
+        //    return false;
362
+        //  }
363
+        // }
364
+
365
+        this.dialogFormVisible = true;
366
+        this.$nextTick(() => {
367
+          this.$refs["dataForm"].clearValidate();
368
+        });
369
+      },
370
+      createData() {
371
+        this.$refs["dataForm"].validate(valid => {
372
+          if (valid) {
373
+            createDictionaryChildConfig(this.temp).then(response => {
374
+              if (!response.data) {
375
+                // 由于mockjs 不支持自定义状态码只能这样hack
376
+                reject("error");
377
+              }
378
+              if (response.data.state === 0) {
379
+                this.$message.error(response.data.msg);
380
+              }
381
+              const result = response.data.data.dataconfig;
382
+
383
+              // this.list.unshift(tempval)
384
+              // 更新store
385
+              store
386
+                .dispatch("updateChildDictionaryConfigList", [result, "create"])
387
+                .then(() => {});
388
+
389
+              this.dialogFormVisible = false;
390
+              this.$message.success("创建成功");
391
+            });
392
+          }
393
+        });
394
+      },
395
+      handleUpdate(row) {
396
+
397
+        this.temp = Object.assign({}, row); // copy obj
398
+        this.dialogStatus = "update";
399
+        this.dialogFormVisible = true;
400
+        this.$nextTick(() => {
401
+          this.$refs["dataForm"].clearValidate();
402
+        });
403
+      },
404
+      updateData() {
405
+        this.$refs["dataForm"].validate(valid => {
406
+          if (valid) {
407
+            const tempData = Object.assign({}, this.temp);
408
+            console.log("tempData", tempData);
409
+            updateDictionaryChildConfig(tempData).then(response => {
410
+              if (!response.data) {
411
+                // 由于mockjs 不支持自定义状态码只能这样hack
412
+                reject("error");
413
+              }
414
+              if (response.data.state === 0) {
415
+                this.$message.error(response.data.msg);
416
+              }
417
+
418
+              const result = response.data.data.dataconfig;
419
+              store
420
+                .dispatch("updateChildDictionaryConfigList", [result, "update"])
421
+                .then(() => {});
422
+
423
+              this.dialogFormVisible = false;
424
+
425
+              this.$message.success("更新成功");
426
+            });
427
+          }
428
+        });
429
+      },
430
+      handleDelete(row) {
431
+        this.$message.success("删除成功");
432
+        const index = this.list.indexOf(row);
433
+        this.list.splice(index, 1);
434
+      },
435
+      handleFetchPv(pv) {
436
+        fetchPv(pv).then(response => {
437
+          this.pvData = response.data.pvData;
438
+          this.dialogPvVisible = true;
439
+        });
440
+      },
441
+      handleDownload() {
442
+        this.downloadLoading = true;
443
+        import("@/vendor/Export2Excel").then(excel => {
444
+          const tHeader = ["timestamp", "title", "type", "importance", "status"];
445
+          const filterVal = [
446
+            "timestamp",
447
+            "title",
448
+            "type",
449
+            "importance",
450
+            "status"
451
+          ];
452
+          const data = this.formatJson(filterVal, this.list);
453
+          excel.export_json_to_excel({
454
+            header: tHeader,
455
+            data,
456
+            filename: "table-list"
457
+          });
458
+          this.downloadLoading = false;
459
+        });
460
+      },
461
+      formatJson(filterVal, jsonData) {
462
+        return jsonData.map(v =>
463
+          filterVal.map(j => {
464
+            if (j === "timestamp") {
465
+              return parseTime(v[j]);
466
+            } else {
467
+              return v[j];
468
+            }
469
+          })
470
+        );
471
+      }
472
+    }
473
+  };
474
+</script>
475
+
476
+<style rel="stylesheet/css" lang="scss" scoped></style>
477
+<style>
478
+  .el-table td,
479
+  .el-table th.is-leaf,
480
+  .el-table--border,
481
+  .el-table--group {
482
+    border-color: #d0d3da;
483
+  }
484
+  .el-table--border::after,
485
+  .el-table--group::after,
486
+  .el-table::before {
487
+    background-color: #d0d3da;
488
+  }
489
+</style>

+ 8 - 6
src/xt_pages/data/specialDictionary.vue View File

@@ -18,10 +18,12 @@
18 18
                     <!--<inspection></inspection>-->
19 19
                 <!--</el-tab-pane>-->
20 20
                 <el-tab-pane label="生产厂商" name="5">
21
-                    <manufacturer></manufacturer>
21
+                    <!--<manufacturer></manufacturer>-->
22
+                  <manufacturer> </manufacturer>
22 23
                 </el-tab-pane>
23 24
                 <el-tab-pane label="供应商" name="6">
24
-                    <supplier></supplier>
25
+                    <!--<supplier></supplier>-->
26
+                  <dealer></dealer>
25 27
                 </el-tab-pane>
26 28
                 <el-tab-pane label="配置项字典" name="7">
27 29
                     <configure></configure>
@@ -38,18 +40,18 @@ import drugs from './components/drugs'
38 40
 import consumables from './components/consumables'
39 41
 import project from './components/project'
40 42
 import inspection from './components/inspection'
41
-import manufacturer from './components/manufacturer'
42
-import supplier from './components/supplier'
43
-import configure from './components/configure'
43
+import manufacturer from '../stock/config/manufacturer'
44
+import configure from './compone,nts/configure'
45
+import Dealer from '../stock/config/dealer'
44 46
 export default {
45 47
     components:{
48
+      Dealer,
46 49
         BreadCrumb,
47 50
         drugs,
48 51
         consumables,
49 52
         project,
50 53
         inspection,
51 54
         manufacturer,
52
-        supplier,
53 55
         configure
54 56
     },
55 57
     data(){

+ 1 - 1
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue View File

@@ -429,7 +429,7 @@
429 429
         <el-row :gutter="20"> -->
430 430
 
431 431
         <el-col :span="8" v-if="isShow('实际置换量')">
432
-          <el-form-item v-if="this.template_id == 20" label="实际置换量(ml): ">
432
+          <el-form-item v-if="this.template_id == 20 || this.template_id == 21" label="实际置换量(ml): ">
433 433
             <el-input v-model="form.actual_displacement"></el-input>
434 434
           </el-form-item>
435 435
           <el-form-item v-else label="实际置换量(L): ">

+ 37 - 5
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue View File

@@ -8,7 +8,7 @@
8 8
       :modal-append-to-body="false"
9 9
     >
10 10
 
11
-      <div class="txsj">
11
+      <!-- <div class="txsj">
12 12
         <el-button
13 13
           round
14 14
           @click="openLast(3)"
@@ -20,7 +20,7 @@
20 20
           @click="openNext(4)"
21 21
         >下一方
22 22
         </el-button>
23
-      </div>
23
+      </div> -->
24 24
       
25 25
 
26 26
       <!--<el-table-->
@@ -159,6 +159,15 @@
159 159
 
160 160
 
161 161
       <div slot="footer" class="dialog-footer">
162
+        <el-button
163
+          @click="openLast(3)"
164
+        >上一方
165
+        </el-button>
166
+
167
+        <el-button
168
+          @click="openNext(4)"
169
+        >下一方
170
+        </el-button>
162 171
         <el-button @click="isLastOrNextVisible = false">取 消</el-button>
163 172
         <el-button type="primary" @click="AddNewAdvice('adForm')">设为本次临嘱</el-button>
164 173
       </div>
@@ -171,7 +180,8 @@
171 180
       @close="resetDialog"
172 181
       :modal-append-to-body="false"
173 182
     >
174
-      <div class="txsj">
183
+    <div style="font-size:16px;">上机时间:{{this.getTime(dialysis_order.start_time,'{h}:{i}')}}</div>
184
+      <!-- <div class="txsj">
175 185
         <el-button
176 186
           round
177 187
           @click="openLast(1)"
@@ -183,7 +193,7 @@
183 193
           @click="openNext(2)"
184 194
         >下一方
185 195
         </el-button>
186
-      </div>
196
+      </div> -->
187 197
 
188 198
       <div class="txsj" v-show="showAdvicePanel">
189 199
         <el-button
@@ -561,6 +571,21 @@
561 571
         <el-button type="primary" v-if="form.id == 0" @click="submitAdvice" :loading="loading">保 存</el-button>
562 572
         <el-button type="primary" v-else @click="submitEditAdvice" :loading="loading">保 存</el-button>
563 573
       </div>
574
+      <div slot="footer" class="dialog-footer" v-show="!showAdviceForm">
575
+        <div class="txsj">
576
+          <el-button
577
+            round
578
+            @click="openLast(1)"
579
+          >上一方
580
+          </el-button>
581
+
582
+          <el-button
583
+            round
584
+            @click="openNext(2)"
585
+          >下一方
586
+          </el-button>
587
+        </div>
588
+      </div>
564 589
       <!-- 医嘱表单 end -->
565 590
     </el-dialog>
566 591
     <el-dialog
@@ -619,6 +644,7 @@
619 644
   import AddGroupAdvice from './adviceDialog/AddGroupAdvice'
620 645
   import EditGroupAdvice from './adviceDialog/EditGroupAdvice'
621 646
   import { uParseTime } from '@/utils/tools'
647
+  import { parseTime } from '@/utils'
622 648
   import {
623 649
     CheckDoctorAdvice,
624 650
     CreateDoctorAdvice,
@@ -2247,7 +2273,13 @@
2247 2273
           this.GetLastOrNextDoctorAdvice(params)
2248 2274
 
2249 2275
         }
2250
-      }
2276
+      },
2277
+      getTime(value, temp) {
2278
+        if (value != undefined) {
2279
+          return parseTime(value, temp)
2280
+        }
2281
+        return ''
2282
+      },
2251 2283
     },
2252 2284
     created() {
2253 2285
       var date = this.$route.query && this.$route.query.date

+ 2 - 1
src/xt_pages/dialysis/details/dialog/computer_dialog.vue View File

@@ -129,7 +129,8 @@
129 129
       if (this.form.puncture_nurse_id == 0) {
130 130
         this.form.puncture_nurse_id = this.$store.getters.xt_user.user.id
131 131
       }
132
-
132
+      
133
+     
133 134
     },
134 135
     watch: {
135 136
       'schedule.id': function() {

+ 9 - 23
src/xt_pages/medicalScheduling/schedulingStatistics.vue View File

@@ -775,29 +775,15 @@ export default {
775 775
                 return Count
776 776
             }
777 777
         },
778
-        // toPrint(){
779
-        //     this.$router.push({
780
-        //         path: '/medicalScheduling/statistics/print',
781
-        //         // query: { date: date }
782
-        //     })
783
-        // },
784
-    //     toPrint: function() {
785
-    //         import('@/vendor/Export2Excel').then(excel => {
786
-    //       const tHeader = ['编号', '标题', '作者','回顾', '时间'];
787
-    //       const filterVal = ['id', 'title','author','pageviews','display_time'];
788
-    //      const list = [
789
-    //            {id: 1, title: 2, author: 3, pageviews: 4, display_time: 5},
790
-    //            {id: 6, title: 7, author: 8, pageviews: 9, display_time: 10},
791
-    //            {id: 11, title: 12, author: 13, pageviews: 14, display_time: 15},
792
-    //          ];
793
-    //      const data = this.formatJson(filterVal, list);
794
-    //         console.log("data",data)
795
-    //       excel.export_json_to_excel(tHeader, data, '书刊数据');
796
-    //         })
797
-    //     },
798
-    //     formatJson(filterVal, jsonData) {
799
-    //       return jsonData.map(v => filterVal.map(j => v[j]))
800
-    //     },
778
+        toPrint(){
779
+            this.$router.push({
780
+                path: '/medicalScheduling/statistics/print?start_time='+this.start_time+"&end_time="+this.end_time,
781
+                // query: { date: date }
782
+            })
783
+        },
784
+        formatJson(filterVal, jsonData) {
785
+          return jsonData.map(v => filterVal.map(j => v[j]))
786
+        },
801 787
 
802 788
         //获取统计图数据
803 789
         getchartlist(){

+ 208 - 15
src/xt_pages/medicalScheduling/statistics_print.vue View File

@@ -15,31 +15,40 @@
15 15
                         <span class="main_title">{{ $store.getters.xt_user.org.org_name }}医护排班统计表</span>
16 16
                     </div>
17 17
                     <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
18
-                      打印时间:
18
+                      打印时间:{{ getNowFormatDate()}}
19 19
                     </div>
20 20
                     <div class="table_panel">
21 21
                         <table class="table">
22 22
                             <thead>
23 23
                                 <tr>
24
-                                    <td width="120">医护姓名</td>
25
-                                    <td width="120">医护姓名</td>
26
-                                    <td width="120">医护姓名</td>
27
-                                    <td width="120">医护姓名</td>
28
-                                    <td width="120">医护姓名</td>
29
-                                    <td width="120">医护姓名</td>
24
+                                  <td width="150">医护姓名</td>
25
+                                  <td width="120" v-for="(modeItem, index) in scheduleList" :key="index">{{modeItem.class_name}}</td>
26
+                                  <td width="120">总工时/小时</td>
27
+                                  <td width="120">出勤/天</td>
28
+                                  <td width="120">缺勤/天</td>
30 29
                                 </tr>
31 30
                             </thead>
32 31
                             <tbody>
33
-                                <tr>
34
-                                    <td width="120">医护姓名</td>
35
-                                    <td width="120">医护姓名</td>
36
-                                    <td width="120">医护姓名</td>
37
-                                    <td width="120">医护姓名</td>
38
-                                    <td width="120">医护姓名</td>
39
-                                    <td width="120">医护姓名</td>
32
+                                <tr v-for="(item,i) in tableData" :key="i">
33
+                                  <td width="120">
34
+                                    {{ item.user_name}}
35
+                                   </td>
36
+                                   <td width="120" v-for="(it,i) in scheduleList" :key="i">
37
+                                    {{ getCount(item.doctor_id,it.class_name) }}
38
+                                   </td>
39
+                                   <td width="120">
40
+                                    {{ item.totalminute/60}}
41
+                                   </td>
42
+                                    <td width="120">
43
+                                    {{item.attendance}}
44
+                                   </td>
45
+                                   <td width="120">
46
+                                    {{item.absence}}
47
+                                   </td>
40 48
                                 </tr>
41 49
                             </tbody>
42 50
                         </table>
51
+                        
43 52
                     </div>
44 53
                 </div>
45 54
             </div>
@@ -49,6 +58,8 @@
49 58
 
50 59
 <script>
51 60
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
61
+import { getDoctorList,getScheduleListTotal,getScheduleList } from '@/api/doctorSchedule'
62
+import { parseTime } from '@/utils'
52 63
 import print from 'print-js'
53 64
 export default {
54 65
     components:{
@@ -60,13 +71,195 @@ export default {
60 71
                 { path: false, name: '医护排班' },
61 72
                 { path: false, name: '排班统计打印' }
62 73
             ],
74
+            start_time:0,
75
+            end_time:0,
76
+            doctorlist:[],
77
+            tableData:[],
78
+            scheduleList:[],
63 79
         }
64 80
     },
65 81
     created(){
66
-
82
+      
83
+      var startime =  this.$route.query.start_time
84
+      this.start_time = parseInt(startime)
85
+       console.log("开始时间",this.start_time)
86
+      var end_time = this.$route.query.end_time
87
+      this.end_time = parseInt(end_time)
88
+      console.log("结束时间",this.end_time)
89
+       //获取该机构所有医护人员
90
+      this.getDoctorList()
91
+       // 获取统计表的数据
92
+      this.getlist()
93
+       //获取所有排班种
94
+      this.getScheduleList()
67 95
     },
68 96
     methods:{
97
+      getDoctorList(){
98
+        getDoctorList().then(response=>{
99
+          var list =  response.data.data.list
100
+          var doctorlist =  response.data.data.doctorlist
101
+          var nurselist =  response.data.data.nurselist
102
+          this.doctorArr = doctorlist
103
+          this.nurseArr = nurselist
104
+          this.doctorlist.push(...nurselist)
105
+          this.doctorlist.push(...doctorlist)
106
+        })
107
+      },
108
+
109
+      //获取统计表数据
110
+        getlist(){
111
+            if(this.timeSlot == 1){
112
+               this.start_time = this.getTimestamp(this.weekDayArr[0]),
113
+               this.end_time = this.getTimestamp(this.weekDayArr[6])
114
+            }
115
+            const params = {
116
+                start_time:this.start_time,
117
+                end_time:this.end_time,
118
+            }
119
+            // console.log("params",params)
120
+            getScheduleListTotal(params).then(response=>{
121
+                if(response.data.state == 1){
122
+                    //获取每个班次对应的次数
123
+                    var scheudleTotal =  response.data.data.scheudletotal
124
+                    // console.log("scheudletotal",scheudleTotal)
125
+                    //获取总分钟数
126
+                    var list = response.data.data.list
127
+                    // console.log("list",list)
128
+                    var workday = response.data.data.workDay
129
+                    // console.log("workday",workday)
130
+                    var noWorkDay = response.data.data.noWorkDay
131
+                    // console.log("noWorkDay",noWorkDay)
132
+
133
+                    let tempArr = [], newArr = []
134
+                    for (let i = 0; i < scheudleTotal.length; i++) {
135
+                        if (tempArr.indexOf(scheudleTotal[i].user_name) === -1) {
136
+                            newArr.push({
137
+                                user_name: scheudleTotal[i].user_name,
138
+                                doctor_id:scheudleTotal[i].doctor_id,
139
+                                list: [{class_name:scheudleTotal[i].class_name,doctor_id:scheudleTotal[i].doctor_id,Count:scheudleTotal[i].Count}]
140
+                            })
141
+                            tempArr.push(scheudleTotal[i].user_name);
142
+                        } else {
143
+                            for (let j = 0; j < newArr.length; j++) {
144
+                                if (newArr[j].user_name == scheudleTotal[i].user_name) {
145
+                                    newArr[j].list.push({class_name:scheudleTotal[i].class_name,doctor_id:scheudleTotal[i].doctor_id,Count:scheudleTotal[i].Count})
146
+                                }
147
+                            }
148
+                        }
149
+                    }
150
+
151
+                    newArr.map(item => {
152
+                        list.map(it => {
153
+                            if(item.doctor_id == it.doctor_id){
154
+                                item.totalminute = it.totalminute
155
+                            }
156
+                        })
157
+                    })
158
+                    newArr.map(item => {
159
+                        workday.map(it => {
160
+                            if(item.doctor_id == it.doctor_id){
161
+                                item.attendance = it.Count
162
+                            }
163
+                        })
164
+                    })
165
+                    newArr.map(item => {
166
+                        noWorkDay.map(it => {
167
+                            if(item.doctor_id == it.doctor_id){
168
+                                item.absence = it.Count
169
+                            }
170
+                        })
171
+                    })
172
+
173
+                    let arr = [...newArr]
174
+
175
+                    arr.sort(this.compare('doctor_id'))
176
+                    this.doctorlist.sort(this.compare('admin_user_id'))
177
+                    this.doctorlist.forEach((item, index) => {
178
+                      if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
179
+
180
+                      }else{
181
+                        arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
182
+                      }
183
+                    })
69 184
 
185
+
186
+                    console.log('打印数据',arr)
187
+                    this.tableData = arr
188
+                    this.$nextTick(() => {
189
+                      this.$refs.tab.doLayout()
190
+                    })
191
+                }
192
+            })
193
+        },
194
+        compare(property){
195
+            return function(a,b){
196
+              var value1 = a[property];
197
+              var value2 = b[property];
198
+              return value2 - value1;
199
+            }
200
+        },
201
+         //获取所有班种
202
+        getScheduleList(){
203
+          getScheduleList().then(response=>{
204
+             if(response.data.state == 1){
205
+                var schedulelist = response.data.data.scheduleList
206
+                // console.log("schedulelist",schedulelist)
207
+                this.scheduleList = schedulelist
208
+             }
209
+          })
210
+        },
211
+
212
+         printAction: function() {
213
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
214
+
215
+          printJS({
216
+          printable: 'print_content',
217
+          type: 'html',
218
+          documentTitle: '  ',
219
+          style: style,
220
+          scanStyles: false
221
+          })
222
+      },
223
+       getCount(id,name){
224
+            if(id != undefined){
225
+                let Count = '';
226
+                this.tableData.map(item => {
227
+                    if(item.doctor_id == id){
228
+                        if(item.list){
229
+                            item.list.map(it => {
230
+                                if(it.class_name == name){
231
+                                    Count = it.Count
232
+                                }
233
+                            })
234
+                        }
235
+
236
+                    }
237
+                })
238
+                return Count
239
+            }
240
+        },
241
+       getTime(value, temp) {
242
+        if (value != undefined) {
243
+          return parseTime(value, temp)
244
+        }
245
+        return ''
246
+      },
247
+
248
+     getNowFormatDate() {
249
+        var date = new Date();
250
+        var seperator1 = "-";
251
+        var year = date.getFullYear();
252
+        var month = date.getMonth() + 1;
253
+        var strDate = date.getDate();
254
+        if (month >= 1 && month <= 9) {
255
+            month = "0" + month;
256
+        }
257
+        if (strDate >= 0 && strDate <= 9) {
258
+            strDate = "0" + strDate;
259
+        }
260
+        var currentdate = year + seperator1 + month + seperator1 + strDate;
261
+        return currentdate;
262
+      },
70 263
     }
71 264
 }
72 265
 </script>

+ 5 - 7
src/xt_pages/qcd/basicInformationAnalysis.vue View File

@@ -64,7 +64,7 @@
64 64
       </div>
65 65
       <div v-if="way == 0" class="cell clearfix" style="align-items:normal">
66 66
         <div style="float:left">
67
-          <div class="infoBox" style="width:370px;">
67
+          <div class="infoBox">
68 68
             <div class="infoOne">
69 69
               <div class="titleBox">
70 70
                 <span class="point"></span>
@@ -274,12 +274,10 @@
274 274
         </div>
275 275
       </div>
276 276
       <div v-else>
277
-        <div style="margin-bottom:20px;">
278
-          <p style="font-size: 16px;font-weight: bold;color: #000;">透析总量</p>
277
+        <div  style="margin-bottom:20px;">
279 278
           <line-chart :options="chart"></line-chart>
280 279
         </div>
281
-        <div>
282
-          <p style="font-size: 16px;font-weight: bold;color: #000;">转归统计</p>
280
+        <div >
283 281
           <line-chart :options="bar"></line-chart>
284 282
         </div>
285 283
       </div>
@@ -353,8 +351,8 @@ export default {
353 351
 
354 352
       way: 0,
355 353
       wayArr: [
356
-        { value: 0, label: "统计", state: 0 },
357
-        { value: 1, label: "趋势图", state: 1 }
354
+        { value: 0, label: "统计", state: 0 },
355
+        { value: 1, label: "统计图", state: 1 }
358 356
       ],
359 357
       modesData: {
360 358
        xAxis: [],

+ 39 - 32
src/xt_pages/stock/Dialog/manufacturerOrDealerDialog.vue View File

@@ -20,45 +20,45 @@
20 20
       </el-col>
21 21
 
22 22
       <el-col :span="8">
23
-        <el-form-item label="联系人" >
24
-          <el-input  v-model="formValue.contact"></el-input>
23
+        <el-form-item label="拼音" prop="pinyin">
24
+          <el-input  v-model="formValue.pinyin"></el-input>
25 25
         </el-form-item>
26 26
       </el-col>
27 27
       <el-col :span="8">
28
-        <el-form-item label="联系电话" >
29
-          <el-input  v-model="formValue.contact_phone" type="number"></el-input>
28
+        <el-form-item label="五笔" prop="wubi">
29
+          <el-input  v-model="formValue.wubi"></el-input>
30 30
         </el-form-item>
31 31
       </el-col>
32 32
     </el-row>
33 33
 
34 34
 
35
-    <el-row>
36
-      <el-col :span="8">
37
-        <el-form-item label="联系地址">
38
-          <el-input  v-model="formValue.contact_address"></el-input>
39
-        </el-form-item>
40
-      </el-col>
41
-
42
-      <el-col :span="8">
43
-        <el-form-item label="QQ/微信">
44
-          <el-input  v-model="formValue.platform_number"></el-input>
45
-        </el-form-item>
46
-      </el-col>
47
-
48
-      <el-col :span="8">
49
-        <el-form-item label="Email">
50
-          <el-input  v-model="formValue.email"></el-input>
51
-        </el-form-item>
52
-      </el-col>
53
-    </el-row>
54
-
55
-      <el-col>
56
-        <el-form-item label="备注">
57
-          <el-input  type="textarea" :row="5" v-model="formValue.remark"
58
-                    placeholder="请输入内容">
59
-          </el-input>
60
-        </el-form-item>
61
-      </el-col>
35
+    <!--<el-row>-->
36
+      <!--<el-col :span="8">-->
37
+        <!--<el-form-item label="联系地址">-->
38
+          <!--<el-input  v-model="formValue.contact_address"></el-input>-->
39
+        <!--</el-form-item>-->
40
+      <!--</el-col>-->
41
+
42
+      <!--<el-col :span="8">-->
43
+        <!--<el-form-item label="QQ/微信">-->
44
+          <!--<el-input  v-model="formValue.platform_number"></el-input>-->
45
+        <!--</el-form-item>-->
46
+      <!--</el-col>-->
47
+
48
+      <!--<el-col :span="8">-->
49
+        <!--<el-form-item label="Email">-->
50
+          <!--<el-input  v-model="formValue.email"></el-input>-->
51
+        <!--</el-form-item>-->
52
+      <!--</el-col>-->
53
+    <!--</el-row>-->
54
+
55
+      <!--<el-col>-->
56
+        <!--<el-form-item label="备注">-->
57
+          <!--<el-input  type="textarea" :row="5" v-model="formValue.remark"-->
58
+                    <!--placeholder="请输入内容">-->
59
+          <!--</el-input>-->
60
+        <!--</el-form-item>-->
61
+      <!--</el-col>-->
62 62
     </el-form>
63 63
 
64 64
 
@@ -97,6 +97,8 @@
97 97
           email: '',
98 98
           contact_address: '',
99 99
           remark: '',
100
+          pinyin:'',
101
+          wubi:'',
100 102
 
101 103
         },
102 104
         resetForm:{
@@ -108,6 +110,8 @@
108 110
           email: '',
109 111
           contact_address: '',
110 112
           remark: '',
113
+          pinyin:'',
114
+          wubi:'',
111 115
         },
112 116
         rules: {
113 117
           manufacturer_name: [
@@ -115,6 +119,10 @@
115 119
           ],
116 120
           dealer_name: [
117 121
             {required: true, message: '请输入经销商名称', trigger: 'blur'},
122
+          ], pinyin: [
123
+            {required: true, message: '请输入拼音', trigger: 'blur'},
124
+          ], wubi: [
125
+            {required: true, message: '请输入五笔', trigger: 'blur'},
118 126
           ],
119 127
 
120 128
         }
@@ -148,7 +156,6 @@
148 156
         this.visibility = false
149 157
       },
150 158
       cancle: function (formName) {
151
-        console.log("11111")
152 159
         this.$emit('dialog-cancle', this.getValue());
153 160
         this.$refs['formValue'].resetFields();
154 161
       },

+ 48 - 17
src/xt_pages/stock/config/dealer.vue View File

@@ -41,29 +41,39 @@
41 41
           border
42 42
           v-loading="loading"
43 43
         >
44
-          <el-table-column label="经销商编码" align="center">
45
-            <template slot-scope="scope">
46
-              {{ scope.row.dealer_code }}
47
-            </template>
48
-          </el-table-column>
44
+          <!--<el-table-column label="经销商编码" align="center">-->
45
+            <!--<template slot-scope="scope">-->
46
+              <!--{{ scope.row.dealer_code }}-->
47
+            <!--</template>-->
48
+          <!--</el-table-column>-->
49 49
           <el-table-column label="经销商名称" align="center">
50 50
             <template slot-scope="scope">
51 51
               {{ scope.row.dealer_name }}
52 52
             </template>
53 53
           </el-table-column>
54
-          <el-table-column label="联系人" align="center">
54
+          <!--<el-table-column label="联系人" align="center">-->
55
+            <!--<template slot-scope="scope">-->
56
+              <!--{{ scope.row.contact }}-->
57
+            <!--</template>-->
58
+          <!--</el-table-column>-->
59
+          <!--<el-table-column label="联系人电话" align="center">-->
60
+            <!--<template slot-scope="scope">-->
61
+              <!--{{ scope.row.contact_phone }}-->
62
+            <!--</template>-->
63
+          <!--</el-table-column>-->
64
+          <!--<el-table-column label="联系地址" align="center">-->
65
+            <!--<template slot-scope="scope">-->
66
+              <!--{{ scope.row.contact_address }}-->
67
+            <!--</template>-->
68
+          <!--</el-table-column>-->
69
+          <el-table-column label="五笔" align="center">
55 70
             <template slot-scope="scope">
56
-              {{ scope.row.contact }}
71
+              {{ scope.row.wubi }}
57 72
             </template>
58 73
           </el-table-column>
59
-          <el-table-column label="联系人电话" align="center">
74
+          <el-table-column label="拼音" align="center">
60 75
             <template slot-scope="scope">
61
-              {{ scope.row.contact_phone }}
62
-            </template>
63
-          </el-table-column>
64
-          <el-table-column label="联系地址" align="center">
65
-            <template slot-scope="scope">
66
-              {{ scope.row.contact_address }}
76
+              {{ scope.row.pinyin }}
67 77
             </template>
68 78
           </el-table-column>
69 79
           <el-table-column label="操作" align="center">
@@ -161,7 +171,9 @@ export default {
161 171
           platform_number: "",
162 172
           email: "",
163 173
           contact_address: "",
164
-          remark: ""
174
+          remark: "",
175
+          pinyin:'',
176
+          wubi:'',
165 177
         },
166 178
         resetForm: {
167 179
           manufacturer_name: "",
@@ -171,7 +183,9 @@ export default {
171 183
           platform_number: "",
172 184
           email: "",
173 185
           contact_address: "",
174
-          remark: ""
186
+          remark: "",
187
+          pinyin:'',
188
+          wubi:'',
175 189
         }
176 190
       }
177 191
     };
@@ -203,6 +217,11 @@ export default {
203 217
           this.dealerDialog.formValue.contact_address =
204 218
             response.data.data.dealer.contact_address;
205 219
           this.dealerDialog.formValue.remark = response.data.data.dealer.remark;
220
+
221
+          this.dealerDialog.formValue.pinyin = response.data.data.dealer.pinyin;
222
+          this.dealerDialog.formValue.wubi = response.data.data.dealer.wubi;
223
+
224
+
206 225
           this.dealerDialog.isCreated = 2;
207 226
           this.$refs.dialog.show();
208 227
 
@@ -255,6 +274,10 @@ export default {
255 274
           this.dealerDialog.formValue.contact_address =
256 275
             response.data.data.dealer.contact_address;
257 276
           this.dealerDialog.formValue.remark = response.data.data.dealer.remark;
277
+
278
+          this.dealerDialog.formValue.pinyin = response.data.data.dealer.pinyin;
279
+          this.dealerDialog.formValue.wubi = response.data.data.dealer.wubi;
280
+
258 281
           this.dealerDialog.isCreated = 3;
259 282
           this.dealerDialog.isVisibility = true;
260 283
         }
@@ -274,7 +297,9 @@ export default {
274 297
           contact_address: val.contact_address,
275 298
           remark: val.remark,
276 299
           dealer_code: this.dealer_code,
277
-          id: this.editId
300
+          id: this.editId,
301
+          pinyin: val.pinyin,
302
+          wubi:val.wubi,
278 303
         };
279 304
         modifyDealer(params).then(response => {
280 305
           if (response.data.state == 0) {
@@ -298,6 +323,12 @@ export default {
298 323
             this.dealerData[this.editIndex].dealer_code =
299 324
               response.data.data.dealer.dealer_code;
300 325
 
326
+            this.dealerData[this.editIndex].pinyin =
327
+              response.data.data.dealer.pinyin;
328
+            this.dealerData[this.editIndex].wubi =
329
+              response.data.data.dealer.wubi;
330
+
331
+
301 332
             this.$message.success("修改成功");
302 333
           }
303 334
         });

+ 51 - 17
src/xt_pages/stock/config/manufacturer.vue View File

@@ -36,31 +36,37 @@
36 36
             border
37 37
             v-loading="loading"
38 38
           >
39
-            <el-table-column label="厂家编码" align="center">
40
-              <template slot-scope="scope">
41
-                {{ scope.row.manufacturer_code }}
42
-              </template>
43
-            </el-table-column>
39
+            <!--<el-table-column label="厂家编码" align="center">-->
40
+              <!--<template slot-scope="scope">-->
41
+                <!--{{ scope.row.manufacturer_code }}-->
42
+              <!--</template>-->
43
+            <!--</el-table-column>-->
44 44
             <el-table-column label="厂家名称" align="center">
45 45
               <template slot-scope="scope">
46 46
                 {{ scope.row.manufacturer_name }}
47 47
               </template>
48 48
             </el-table-column>
49
-            <el-table-column label="联系人" align="center">
49
+            <!--<el-table-column label="联系人" align="center">-->
50
+              <!--<template slot-scope="scope">-->
51
+                <!--{{ scope.row.contact }}-->
52
+              <!--</template>-->
53
+            <!--</el-table-column>-->
54
+            <!--<el-table-column label="联系人电话" align="center">-->
55
+              <!--<template slot-scope="scope">-->
56
+                <!--{{ scope.row.contact_phone }}-->
57
+              <!--</template>-->
58
+            <!--</el-table-column>-->
59
+            <el-table-column label="五笔" align="center">
50 60
               <template slot-scope="scope">
51
-                {{ scope.row.contact }}
61
+                {{ scope.row.wubi }}
52 62
               </template>
53 63
             </el-table-column>
54
-            <el-table-column label="联系人电话" align="center">
64
+            <el-table-column label="拼音" align="center">
55 65
               <template slot-scope="scope">
56
-                {{ scope.row.contact_phone }}
57
-              </template>
58
-            </el-table-column>
59
-            <el-table-column label="联系地址" align="center">
60
-              <template slot-scope="scope">
61
-                {{ scope.row.contact_address }}
66
+                {{ scope.row.pinyin }}
62 67
               </template>
63 68
             </el-table-column>
69
+
64 70
             <el-table-column label="操作" align="center">
65 71
               <template slot-scope="scope">
66 72
                 <el-tooltip
@@ -161,7 +167,10 @@ export default {
161 167
           platform_number: "",
162 168
           email: "",
163 169
           contact_address: "",
164
-          remark: ""
170
+          remark: "",
171
+          pinyin:"",
172
+          wubi:"",
173
+
165 174
         },
166 175
         resetForm: {
167 176
           manufacturer_name: "",
@@ -171,7 +180,9 @@ export default {
171 180
           platform_number: "",
172 181
           email: "",
173 182
           contact_address: "",
174
-          remark: ""
183
+          remark: "",
184
+          pinyin:"",
185
+          wubi:"",
175 186
         }
176 187
       }
177 188
     };
@@ -202,6 +213,11 @@ export default {
202 213
             response.data.data.manufacturer.contact_address;
203 214
           this.manufacturerDialog.formValue.remark =
204 215
             response.data.data.manufacturer.remark;
216
+          this.manufacturerDialog.formValue.pinyin =
217
+            response.data.data.manufacturer.pinyin;
218
+          this.manufacturerDialog.formValue.wubi =
219
+            response.data.data.manufacturer.wubi;
220
+
205 221
           this.manufacturerDialog.isCreated = 2;
206 222
           this.$refs.dialog.show();
207 223
           this.manufacturer_code =
@@ -255,6 +271,12 @@ export default {
255 271
             response.data.data.manufacturer.contact_address;
256 272
           this.manufacturerDialog.formValue.remark =
257 273
             response.data.data.manufacturer.remark;
274
+
275
+          this.manufacturerDialog.formValue.pinyin =
276
+            response.data.data.manufacturer.pinyin;
277
+          this.manufacturerDialog.formValue.wubi =
278
+            response.data.data.manufacturer.wubi;
279
+
258 280
           this.manufacturerDialog.isCreated = 3;
259 281
           this.manufacturerDialog.isVisibility = true;
260 282
         }
@@ -274,7 +296,10 @@ export default {
274 296
           contact_address: val.contact_address,
275 297
           remark: val.remark,
276 298
           manufacturer_code: this.manufacturer_code,
277
-          id: this.editId
299
+          id: this.editId,
300
+          pinyin: val.pinyin,
301
+          wubi: val.wubi,
302
+
278 303
         };
279 304
         modifyManufacturer(params).then(response => {
280 305
           if (response.data.state == 0) {
@@ -298,6 +323,15 @@ export default {
298 323
             this.manufacturerData[this.editIndex].manufacturer_code =
299 324
               response.data.data.manufacturer.manufacturer_code;
300 325
 
326
+
327
+            this.manufacturerData[this.editIndex].pinyin =
328
+              response.data.data.manufacturer.pinyin;
329
+            this.manufacturerData[this.editIndex].wubi =
330
+              response.data.data.manufacturer.wubi;
331
+
332
+
333
+
334
+
301 335
             this.$message.success("修改成功");
302 336
           }
303 337
         });