Commit af75c493 by 吕海涛

修改司机端语音配置

parent ee240893
...@@ -83,33 +83,17 @@ ...@@ -83,33 +83,17 @@
v-html="remindContentText(form)" v-html="remindContentText(form)"
contentEditable="true" contentEditable="true"
ref="remindText" ref="remindText"
style=" style="height: 100px; overflow-y: scroll; padding-left: 5px"
height: 100px;
overflow-y: scroll;
border-bottom: 1px solid #ccc;
padding-left: 5px;
"
id="obj" id="obj"
></div> ></div>
<div <div style="border-top: 1px solid #ccc" v-if="list.length > 0">
style=" <el-button
padding: 0 5px; type="text"
padding: 0px 5px; @click="setText(element.type)"
display: flex; v-for="(element, index) in list"
align-items: center; :key="index"
" style="margin-left: 5px"
> >{{ element.name }}</el-button
<el-button type="text" @click="setText('PHONE')"
>#乘客手机尾号#</el-button
>
<el-button type="text" @click="setText('STARTADDRESS')"
>#乘客上车地址#</el-button
>
<el-button type="text" @click="setText('ENDADDRESS')"
>#乘客目的地#</el-button
>
<el-button type="text" @click="setText('APPOINTTIME')"
>#乘客预约时间#</el-button
> >
</div> </div>
</div> </div>
...@@ -138,6 +122,7 @@ export default { ...@@ -138,6 +122,7 @@ export default {
remindContent: "", remindContent: "",
remindType: "", remindType: "",
}, },
list: [],
dialogVisible: false, dialogVisible: false,
operationNodeobj: [ operationNodeobj: [
"开始听单", "开始听单",
...@@ -214,6 +199,33 @@ export default { ...@@ -214,6 +199,33 @@ export default {
}, },
showDialog(row) { showDialog(row) {
this.form = JSON.parse(JSON.stringify(row.row)); this.form = JSON.parse(JSON.stringify(row.row));
if (
(row.row.remindType * 1 == 1 && row.row.inspectData * 1 == 6) ||
row.row.inspectData * 1 == 7 ||
row.row.inspectData * 1 == 8
) {
this.list = [
{
name: "#乘客手机尾号#",
type: "PHONE",
},
{
name: "#乘客上车地址#",
type: "STARTADDRESS",
},
{
name: "#乘客目的地#",
type: "ENDADDRESS",
},
{
name: "#乘客预约时间#",
type: "APPOINTTIME",
},
];
} else {
this.list = [];
}
this.dialogVisible = true; this.dialogVisible = true;
}, },
inspectDataText(row) { inspectDataText(row) {
...@@ -267,6 +279,7 @@ export default { ...@@ -267,6 +279,7 @@ export default {
initTable() { initTable() {
voicePage().then((res) => { voicePage().then((res) => {
if (res.status == 200) { if (res.status == 200) {
console.log(res.data);
this.data = res.data; this.data = res.data;
} else { } else {
this.data = []; this.data = [];
...@@ -302,12 +315,15 @@ export default { ...@@ -302,12 +315,15 @@ export default {
/<span(\s+[^="']+=(['"]).*?\2)*\s*>#乘客上车地址#<\/span>/g, /<span(\s+[^="']+=(['"]).*?\2)*\s*>#乘客上车地址#<\/span>/g,
"STARTADDRESS" "STARTADDRESS"
); );
t = t.replace(/<\/?[^>]*>/g, ""); //去除HTML tag
t = t.replace(/[ | ]*\n/g, "\n"); //去除行尾空白
t = t.replace(/&nbsp;/gi, ""); //去掉&nbsp;
let json = { let json = {
id: this.form.id, id: this.form.id,
inspectData: this.form.inspectData, inspectData: this.form.inspectData,
operationNode: this.form.operationNode, operationNode: this.form.operationNode,
remindType: this.form.remindType, remindType: this.form.remindType,
remindContent: t.replace(/<[^>]+>/g, " "), remindContent: t,
operation: this.form.operation, operation: this.form.operation,
}; };
if (json.remindContent.length >= 100) { if (json.remindContent.length >= 100) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment