weieryang 3 years ago
parent
commit
dd67a94f6c

+ 2 - 2
CallCenterWeb.UI/RMYY/src/api/vehicleDispatch/vehicleScheduling.js

@@ -28,7 +28,7 @@ export function getAddWorkOrder(params) {
28 28
   return request({
29 29
     url: 'T_Car_WorkOrder/AddWorkOrder',
30 30
     method: 'post',
31
-    params
31
+    data: params
32 32
   })
33 33
 }
34 34
 // 修改
@@ -36,7 +36,7 @@ export function getUpdateWorkOrder(params) {
36 36
   return request({
37 37
     url: 'T_Car_WorkOrder/UpdateWorkOrder',
38 38
     method: 'post',
39
-    params
39
+    data: params
40 40
   })
41 41
 }
42 42
 // 删除

+ 166 - 154
CallCenterWeb.UI/RMYY/src/views/telCall/welcomeManage/index.vue

@@ -2,41 +2,48 @@
2 2
   <div class="app-container">
3 3
     <div class="filter-container">
4 4
       <el-select v-model="searchData.state" placeholder="请选择状态" size="medium" clearable>
5
-        <el-option value="0" label="未启动"></el-option>
6
-        <el-option value="1" label="启动"></el-option>
7
-        <el-option value="2" label="已失效"></el-option>
5
+        <el-option value="0" label="未启动"/>
6
+        <el-option value="1" label="启动"/>
7
+        <el-option value="2" label="已失效"/>
8 8
       </el-select>
9 9
       <el-input v-model="searchData.key" placeholder="请输入关键词" class="filter-item" size="medium" clearable/>
10
-      <el-date-picker v-model="searchData.value1" size="medium" type="daterange" clearable format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
11
-        end-placeholder="结束日期">
12
-      </el-date-picker>
10
+      <el-date-picker
11
+        v-model="searchData.value1"
12
+        size="medium"
13
+        type="daterange"
14
+        clearable
15
+        format="yyyy-MM-dd"
16
+        value-format="yyyy-MM-dd"
17
+        range-separator="至"
18
+        start-placeholder="开始日期"
19
+        end-placeholder="结束日期"/>
13 20
       <el-button type="primary" class="filter-item" @click="btn_search">搜索</el-button>
14 21
       <el-button type="primary" class="filter-item" @click="btn_add">添加</el-button>
15 22
     </div>
16 23
     <el-table v-loading="loading" :data="dataLists" border stripe @selection-change="handleSelectionChange">
17
-<!--      <el-table-column type="selection" width="55">
24
+      <!--      <el-table-column type="selection" width="55">
18 25
       </el-table-column> -->
19 26
       <el-table-column prop="F_Title" label="欢迎词标题" align="center" min-width="" />
20 27
       <el-table-column label="欢迎词内容" align="center" min-width="">
21 28
         <template slot-scope="scope">
22
-          <span v-show='scope.row.F_Type==1'>{{scope.row.F_Content}}</span>
29
+          <span v-show="scope.row.F_Type==1">{{ scope.row.F_Content }}</span>
23 30
           <svg-icon v-if="scope.row.F_Type==2" class="rec_file" icon-class="bofangluyin" @click.native="playSound(scope.row.F_Files,scope.row.F_CreateBy)" />
24 31
         </template>
25 32
       </el-table-column>
26 33
       <!-- <el-table-column prop="F_Content" label="欢迎词内容" align="center" min-width="" /> -->
27 34
       <el-table-column label="类型" align="center" min-width="">
28 35
         <template slot-scope="scope">
29
-          <span v-show='scope.row.F_Type==1'>文本</span>
30
-          <span v-show='scope.row.F_Type==2'>语音文件</span>
36
+          <span v-show="scope.row.F_Type==1">文本</span>
37
+          <span v-show="scope.row.F_Type==2">语音文件</span>
31 38
         </template>
32 39
       </el-table-column>
33 40
       <el-table-column prop="F_StartTime" label="生效时间" align="center" min-width="" />
34 41
       <el-table-column prop="F_EndTime" label="失效时间" align="center" min-width="" />
35 42
       <el-table-column label="状态" align="center" min-width="">
36 43
         <template slot-scope="scope">
37
-          <span v-show='scope.row.F_IsState==2'>已失效</span>
38
-          <span v-show='scope.row.F_IsState==1'>生效中</span>
39
-          <span v-show='scope.row.F_IsState==0'>未启动</span>
44
+          <span v-show="scope.row.F_IsState==2">已失效</span>
45
+          <span v-show="scope.row.F_IsState==1">生效中</span>
46
+          <span v-show="scope.row.F_IsState==0">未启动</span>
40 47
         </template>
41 48
       </el-table-column>
42 49
       <el-table-column prop="F_CreateTime" label="添加时间" align="center" min-width="" />
@@ -48,166 +55,171 @@
48 55
         </template>
49 56
       </el-table-column>
50 57
     </el-table>
51
-    <pagination v-show="pageParams.total > 0" :total="pageParams.total" :pageindex.sync="pageParams.pageindex"
52
-      :pagesize.sync="pageParams.pagesize" class="pagination" @pagination="getList" />
58
+    <pagination
59
+      v-show="pageParams.total > 0"
60
+      :total="pageParams.total"
61
+      :pageindex.sync="pageParams.pageindex"
62
+      :pagesize.sync="pageParams.pagesize"
63
+      class="pagination"
64
+      @pagination="getList" />
53 65
   </div>
54 66
 </template>
55 67
 
56 68
 <script>
57
-  import {
58
-    getWordsLists,
59
-    deleteWord,
60
-  } from '@/api/telCall/welcomeManage'
61
-  import addOrEdit from './addOrEdit'
62
-  import audioPlayer from '@/components/context/audioPlayer'
63
-  import {
64
-    pickerOptions
65
-  } from '@/utils'
66
-  import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
69
+import {
70
+  getWordsLists,
71
+  deleteWord
72
+} from '@/api/telCall/welcomeManage'
73
+import addOrEdit from './addOrEdit'
74
+import audioPlayer from '@/components/context/audioPlayer'
75
+import {
76
+  pickerOptions
77
+} from '@/utils'
78
+import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
67 79
 
68
-  export default {
69
-    name: 'WelcomeManage',
70
-    components: {
71
-      Pagination
80
+export default {
81
+  name: 'WelcomeManage',
82
+  components: {
83
+    Pagination
84
+  },
85
+  filters: {
86
+    blackTextFilter(status) {
87
+      const statusMap = {
88
+        0: '暂时',
89
+        1: '永久',
90
+        2: '已取消'
91
+      }
92
+      return statusMap[status]
72 93
     },
73
-    filters: {
74
-      blackTextFilter(status) {
75
-        const statusMap = {
76
-          0: '暂时',
77
-          1: '永久',
78
-          2: '已取消'
79
-        }
80
-        return statusMap[status]
94
+    blackTypeFilter(status) {
95
+      const statusMap = {
96
+        0: '',
97
+        1: 'danger',
98
+        2: 'warning'
99
+      }
100
+      return statusMap[status]
101
+    }
102
+  },
103
+  data() {
104
+    return {
105
+      loading: false,
106
+      searchData: {
107
+        state: '',
108
+        key: '',
109
+        value1: ''
81 110
       },
82
-      blackTypeFilter(status) {
83
-        const statusMap = {
84
-          0: '',
85
-          1: 'danger',
86
-          2: 'warning'
87
-        }
88
-        return statusMap[status]
111
+      pickerOptions,
112
+      pageParams: {
113
+        pageindex: 1, // 当前第几页
114
+        pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
115
+        total: 0 // 总共多少数据
116
+      },
117
+      dataLists: [], // 列表数据
118
+      multipleSelection: [],
119
+      selectArr: []
120
+    }
121
+  },
122
+  created() {
123
+    this.getList()
124
+    document.onkeyup = (e) => {
125
+      if (e.keyCode === 13) {
126
+        this.getList()
89 127
       }
128
+    }
129
+  },
130
+  methods: {
131
+    getList() {
132
+      this.loading = true
133
+      return new Promise((resolve) => {
134
+        const params = {
135
+          page: this.pageParams.pageindex, // 第几页
136
+          pagesize: this.pageParams.pagesize, // 每页几条信息
137
+          state: this.searchData.state,
138
+          key: this.searchData.key,
139
+          starttime: this.searchData.value1 && this.searchData.value1[0],
140
+          endtime: this.searchData.value1 && this.searchData.value1[1]
141
+        }
142
+        getWordsLists(params).then((response) => {
143
+          this.loading = false
144
+          if (response.rows.length >= 0) {
145
+            this.pageParams.total = response.total
146
+            this.dataLists = response.rows
147
+          }
148
+        })
149
+        resolve()
150
+      })
90 151
     },
91
-    data() {
92
-      return {
93
-        loading: false,
94
-        searchData: {
95
-          state: '',
96
-          key: '',
97
-          value1:''
98
-        },
99
-        pickerOptions,
100
-        pageParams: {
101
-          pageindex: 1, // 当前第几页
102
-          pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
103
-          total: 0 // 总共多少数据
152
+    btn_search() {
153
+      this.pageParams.pageindex = 1
154
+      this.getList()
155
+    },
156
+    handleSelectionChange(val) {
157
+      this.multipleSelection = val
158
+      this.selectArr = val.map(item => item.F_Id)
159
+    },
160
+    btn_add() {
161
+      this.$layer.iframe({
162
+        content: {
163
+          content: addOrEdit, // 传递的组件对象
164
+          parent: this, // 当前的vue对象
165
+          data: {
166
+            rowid: ''
167
+          } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
104 168
         },
105
-        dataLists: [], // 列表数据
106
-        multipleSelection: [],
107
-        selectArr: []
108
-      }
169
+        area: ['45%', '55%'],
170
+        title: '添加时段'
171
+      })
109 172
     },
110
-    created() {
111
-      this.getList()
112
-      document.onkeyup = (e) => {
113
-        if (e.keyCode === 13) {
114
-          this.getList()
115
-        }
116
-      }
173
+    btn_edit(editId) {
174
+      this.$layer.iframe({
175
+        content: {
176
+          content: addOrEdit, // 传递的组件对象
177
+          parent: this, // 当前的vue对象
178
+          data: {
179
+            rowid: editId.toString()
180
+          } // props
181
+        },
182
+        area: ['45%', '55%'],
183
+        title: '编辑时段'
184
+      })
117 185
     },
118
-    methods: {
119
-      getList() {
120
-        this.loading = true
121
-        return new Promise((resolve) => {
122
-          const params = {
123
-            page: this.pageParams.pageindex, // 第几页
124
-            pagesize: this.pageParams.pagesize, // 每页几条信息
125
-            state: this.searchData.state,
126
-            key: this.searchData.key,
127
-            starttime:this.searchData.value1[0],
128
-            endtime:this.searchData.value1[1]
129
-          }
130
-          getWordsLists(params).then((response) => {
131
-            this.loading = false
132
-            if (response.rows.length >= 0) {
133
-              this.pageParams.total = response.total
134
-              this.dataLists = response.rows
186
+    btn_delete(id) {
187
+      // if (this.multipleSelection.length == 0) {
188
+      //   this.$message.error('没有要删除的选项')
189
+      // } else {
190
+      this.$confirm('您确定要删除吗?', '提示', {
191
+        confirmButtonText: '确定',
192
+        cancelButtonText: '取消',
193
+        type: 'warning'
194
+      })
195
+        .then(() => {
196
+          deleteWord(id).then((response) => {
197
+            if (response.state.toLowerCase() === 'success') {
198
+              this.getList()
199
+              this.$message.success('删除成功!')
135 200
             }
136 201
           })
137
-          resolve()
138 202
         })
139
-      },
140
-      btn_search() {
141
-        this.pageParams.pageindex = 1
142
-        this.getList()
143
-      },
144
-      handleSelectionChange(val) {
145
-        this.multipleSelection = val;
146
-        this.selectArr = val.map(item => item.F_Id)
147
-      },
148
-      btn_add() {
149
-        this.$layer.iframe({
150
-          content: {
151
-            content: addOrEdit, // 传递的组件对象
152
-            parent: this, // 当前的vue对象
153
-            data: {
154
-              rowid: ''
155
-            } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
156
-          },
157
-          area: ['45%', '55%'],
158
-          title: '添加时段'
203
+        .catch(() => {
204
+          this.$message('已取消删除')
159 205
         })
160
-      },
161
-      btn_edit(editId) {
162
-        this.$layer.iframe({
163
-          content: {
164
-            content: addOrEdit, // 传递的组件对象
165
-            parent: this, // 当前的vue对象
166
-            data: {
167
-              rowid: editId.toString()
168
-            } // props
169
-          },
170
-          area: ['45%', '55%'],
171
-          title: '编辑时段'
172
-        })
173
-      },
174
-      btn_delete(id) {
175
-        // if (this.multipleSelection.length == 0) {
176
-        //   this.$message.error('没有要删除的选项')
177
-        // } else {
178
-          this.$confirm('您确定要删除吗?', '提示', {
179
-              confirmButtonText: '确定',
180
-              cancelButtonText: '取消',
181
-              type: 'warning'
182
-            })
183
-            .then(() => {
184
-              deleteWord(id).then((response) => {
185
-                if (response.state.toLowerCase() === 'success') {
186
-                  this.getList()
187
-                  this.$message.success('删除成功!')
188
-                }
189
-              })
190
-            })
191
-            .catch(() => {
192
-              this.$message('已取消删除')
193
-            })
194 206
         // }
195
-      },
196
-      // 播放录音
197
-      playSound(rec_file,artist) {
198
-        this.$layer.iframe({
199
-          content: {
200
-            content: audioPlayer, // 传递的组件对象
201
-            parent: this, // 当前的vue对象
202
-            data: { recFiles: rec_file,artists:artist } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
203
-          },
204
-          area: ['600px', '230px'],
205
-          shadeClose: true,
206
-          title: '录音详情'
207
-        })
208
-      },
207
+    },
208
+    // 播放录音
209
+    playSound(rec_file, artist) {
210
+      this.$layer.iframe({
211
+        content: {
212
+          content: audioPlayer, // 传递的组件对象
213
+          parent: this, // 当前的vue对象
214
+          data: { recFiles: rec_file, artists: artist } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
215
+        },
216
+        area: ['600px', '230px'],
217
+        shadeClose: true,
218
+        title: '录音详情'
219
+      })
209 220
     }
210 221
   }
222
+}
211 223
 </script>
212 224
 
213 225
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 2 - 2
CallCenterWeb.UI/RMYY/src/views/vehicleDispatch/driverOrder/index.vue

@@ -93,8 +93,8 @@ export default {
93 93
         const params = {
94 94
           pageindex: this.pageParams.pageindex, // 第几页
95 95
           pagesize: this.pageParams.pagesize, // 每页几条信息
96
-          stime: this.searchDate && this.searchDate[0],
97
-          etime: this.searchDate && this.searchDate[1],
96
+          starttime: this.startTime && this.startTime[0],
97
+          endtime: this.startTime && this.startTime[1],
98 98
           WorkOrderCode: this.ordercode,
99 99
           carname: this.carname,
100 100
           driverName: this.drivername,

+ 5 - 5
CallCenterWeb.UI/RMYY/src/views/vehicleDispatch/vehicleScheduling/vehicleSchedulingList/components/addOrEdit.vue

@@ -243,13 +243,13 @@ export default {
243 243
     }
244 244
   },
245 245
   created() {
246
-    if (!this.callid) {
247
-      this.callid = window.localStorage.getItem('callidSave')
248
-    }
246
+    // if (!this.callid) {
247
+    //   this.callid = window.localStorage.getItem('callidSave')
248
+    // }
249 249
     this.getTypeOrder()
250 250
     this.getCarlist()
251
-    if (this.wid) {
252
-      this.wocode = this.wid
251
+    if (this.wocode) {
252
+      this.wocode = this.wocode
253 253
       this.getDetail('0')
254 254
     }
255 255
   },

+ 17 - 10
CallCenterWeb.UI/RMYY/src/views/vehicleDispatch/vehicleScheduling/vehicleSchedulingList/index.vue

@@ -34,10 +34,7 @@
34 34
       </el-table-column>
35 35
       <el-table-column :show-overflow-tooltip="true" prop="F_Type" label="类别" align="center">
36 36
         <template slot-scope="scope">
37
-          <div v-if="scope.row.F_Type==8001">院区转运患者</div>
38
-          <div v-if="scope.row.F_Type==8002">转运物资</div>
39
-          <div v-if="scope.row.F_Type==8003">转运消供器械</div>
40
-          <div v-if="scope.row.F_Type==8004">转运设备</div>
37
+          <div>{{ $store.getters.workTypeMap[parseInt(scope.row.F_Type)].text }}</div>
41 38
         </template>
42 39
       </el-table-column>
43 40
       <el-table-column :show-overflow-tooltip="true" prop="F_Content" label="调度内容" align="center" />
@@ -58,8 +55,8 @@
58 55
       </el-table-column>
59 56
       <el-table-column label="操作" width="160" align="center" class-name="oparate_btn" fixed="right">
60 57
         <template slot-scope="scope">
61
-          <el-button v-if="scope.row.F_State==0" size="mini" type="text" @click="btn_edit(scope.row.F_ID,scope.row.F_WorkOrderCode)">编辑</el-button>
62
-          <el-button v-if="scope.row.F_State==0" size="mini" type="text" @click="btn_delete(scope.row.F_WorkOrderCode)">删除
58
+          <el-button v-if="scope.row.F_State==-1" size="mini" type="text" @click="btn_edit(scope.row.F_ID,scope.row.F_WorkOrderCode)">编辑</el-button>
59
+          <el-button v-if="scope.row.F_State==-1" size="mini" type="text" @click="btn_delete(scope.row.F_WorkOrderCode)">删除
63 60
           </el-button>
64 61
           <el-button v-if="scope.row.F_State==0" size="mini" type="text" @click="btn_fenpei(scope.row.F_WorkOrderCode,scope.row)">分配</el-button>
65 62
         </template>
@@ -127,8 +124,8 @@ export default {
127 124
   },
128 125
   methods: {
129 126
     btn_distribute() {
130
-      if (this.multipleSelection.length < 1) {
131
-        this.$message.error('没有要分配的选项')
127
+      if (this.selectIds.length < 1) {
128
+        this.$message.error('请选择待分配工单')
132 129
         return
133 130
       }
134 131
       this.$layer.iframe({
@@ -163,8 +160,18 @@ export default {
163 160
       })
164 161
     },
165 162
     handleSelectionChange(val) {
166
-      this.multipleSelection = val
167
-      this.selectIds = val.map((item) => item.F_WorkOrderCode)
163
+      const rows = []
164
+      const codes = []
165
+      val.forEach(function(v, n) {
166
+        if (v.F_State == 0) {
167
+          codes.push(v.F_WorkOrderCode)
168
+          rows.push(v)
169
+        }
170
+      })
171
+      this.selectIds = codes
172
+      this.multipleSelection = rows
173
+      console.log(codes)
174
+      // this.selectIds = val.map((item) => item.F_WorkOrderCode)
168 175
     },
169 176
     handleClick(res) {
170 177
       this.state = res.name