diff --git a/web/package.json b/web/package.json
index dffd8cbfc..599d489ae 100644
--- a/web/package.json
+++ b/web/package.json
@@ -36,7 +36,8 @@
"vue-contextmenujs": "^1.4.11",
"vue-router": "3.0.6",
"vue-ztree-2.0": "^1.0.4",
- "vuex": "3.1.0"
+ "vuex": "3.1.0",
+ "xlsx": "^0.18.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.4",
diff --git a/web/public/static/file/设置电话本模板.xlsx b/web/public/static/file/设置电话本模板.xlsx
new file mode 100644
index 000000000..a993210dc
Binary files /dev/null and b/web/public/static/file/设置电话本模板.xlsx differ
diff --git a/web/src/api/jtDevice.js b/web/src/api/jtDevice.js
index 6c33e085c..116c909b6 100644
--- a/web/src/api/jtDevice.js
+++ b/web/src/api/jtDevice.js
@@ -326,5 +326,12 @@ export function queryMediaAttribute(phoneNumber) {
}
})
}
+export function setPhoneBook(data) {
+ return request({
+ method: 'post',
+ url: '/api/jt1078/set-phone-book',
+ data: data
+ })
+}
diff --git a/web/src/store/modules/jtDevice.js b/web/src/store/modules/jtDevice.js
index 5786b56f6..6aec99a25 100644
--- a/web/src/store/modules/jtDevice.js
+++ b/web/src/store/modules/jtDevice.js
@@ -22,7 +22,7 @@ import {
queryRecordList,
reset,
sendTextMessage,
- setConfig,
+ setConfig, setPhoneBook,
startPlayback,
stopPlay,
stopPlayback,
@@ -342,6 +342,16 @@ const actions = {
reject(error)
})
})
+ },
+ setPhoneBook({ commit }, data) {
+ return new Promise((resolve, reject) => {
+ setPhoneBook(data).then(response => {
+ const { data } = response
+ resolve(data)
+ }).catch(error => {
+ reject(error)
+ })
+ })
}
}
diff --git a/web/src/views/jtDevice/dialog/mediaAttribute.vue b/web/src/views/jtDevice/dialog/mediaAttribute.vue
index 656a84821..31290a3c1 100755
--- a/web/src/views/jtDevice/dialog/mediaAttribute.vue
+++ b/web/src/views/jtDevice/dialog/mediaAttribute.vue
@@ -18,7 +18,7 @@
{{ audioSamplingBitsEnum[attributeData.audioSamplingBits] }}
{{ attributeData.audioFrameLength }}
{{ attributeData.audioOutputEnable === 0 ? '不支持':'支持' }}
- {{ attributeData.audioChannelMax === 0 ? '不支持':'支持' }}
+ {{ attributeData.audioChannelMax }}
{{ videoEncoderEnum[attributeData.videoEncoder] }}
diff --git a/web/src/views/jtDevice/dialog/phoneBook.vue b/web/src/views/jtDevice/dialog/phoneBook.vue
new file mode 100755
index 000000000..35b9df1d8
--- /dev/null
+++ b/web/src/views/jtDevice/dialog/phoneBook.vue
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+ 导入数据
+ 结束导入
+
+ 下载模板
+
+
+
+
+
+
+ 清空电话本
+ 更新电话本
+ 追加电话本
+ 修改电话本
+
+
+
+
+
+ {}">
+
+
+ {{ signLabel(scope.row.sign) }}
+
+
+
+
+
+
+
+ 移除
+
+
+
+
+
+
+ 将文件拖到此处,或点击上传
+ 只能上传xls/xlsx文件
+
+
+
+
+
+
+
+
diff --git a/web/src/views/jtDevice/list.vue b/web/src/views/jtDevice/list.vue
index 599b177d4..9ad4861a5 100755
--- a/web/src/views/jtDevice/list.vue
+++ b/web/src/views/jtDevice/list.vue
@@ -117,8 +117,8 @@
文本下发
电话回拨
-
-
+
+ 设置电话本
驾驶员信息
@@ -154,6 +154,7 @@
+
@@ -168,11 +169,13 @@ import driverInfo from './dialog/driverInfo.vue'
import connectionServer from './dialog/connectionServer.vue'
import controlDoor from './dialog/controlDoor.vue'
import mediaAttribute from './dialog/mediaAttribute.vue'
+import phoneBook from './dialog/phoneBook.vue'
export default {
name: 'App',
components: {
- deviceEdit, configInfo, attribute, position, textMsg, telephoneCallback, driverInfo, connectionServer, controlDoor, mediaAttribute
+ deviceEdit, configInfo, attribute, position, textMsg, telephoneCallback, driverInfo, connectionServer, controlDoor
+ , mediaAttribute, phoneBook
},
data() {
return {
@@ -293,6 +296,8 @@ export default {
this.connection(itemData)
} else if (command === 'mediaAttribute') {
this.queryMediaAttribute(itemData)
+ } else if (command === 'setPhoneBook') {
+ this.setPhoneBook(itemData)
} else {
this.$message.info('尚不支持')
}
@@ -367,12 +372,14 @@ export default {
connection: function(itemData) {
this.$refs.connectionServer.openDialog(itemData.phoneNumber)
},
+ setPhoneBook: function(itemData) {
+ this.$refs.phoneBook.openDialog(itemData.phoneNumber)
+ },
queryMediaAttribute: function(itemData) {
this.$store.dispatch('jtDevice/queryMediaAttribute', itemData.phoneNumber)
.then((data) => {
this.$refs.mediaAttribute.openDialog(data)
})
-
},
controlDoor: function(itemData) {
this.$refs.controlDoor.openDialog(itemData.phoneNumber)