Commit af75c493 by 吕海涛

修改司机端语音配置

parent ee240893
......@@ -83,33 +83,17 @@
v-html="remindContentText(form)"
contentEditable="true"
ref="remindText"
style="
height: 100px;
overflow-y: scroll;
border-bottom: 1px solid #ccc;
padding-left: 5px;
"
style="height: 100px; overflow-y: scroll; padding-left: 5px"
id="obj"
></div>
<div
style="
padding: 0 5px;
padding: 0px 5px;
display: flex;
align-items: center;
"
>
<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 style="border-top: 1px solid #ccc" v-if="list.length > 0">
<el-button
type="text"
@click="setText(element.type)"
v-for="(element, index) in list"
:key="index"
style="margin-left: 5px"
>{{ element.name }}</el-button
>
</div>
</div>
......@@ -138,6 +122,7 @@ export default {
remindContent: "",
remindType: "",
},
list: [],
dialogVisible: false,
operationNodeobj: [
"开始听单",
......@@ -214,6 +199,33 @@ export default {
},
showDialog(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;
},
inspectDataText(row) {
......@@ -267,6 +279,7 @@ export default {
initTable() {
voicePage().then((res) => {
if (res.status == 200) {
console.log(res.data);
this.data = res.data;
} else {
this.data = [];
......@@ -302,12 +315,15 @@ export default {
/<span(\s+[^="']+=(['"]).*?\2)*\s*>#乘客上车地址#<\/span>/g,
"STARTADDRESS"
);
t = t.replace(/<\/?[^>]*>/g, ""); //去除HTML tag
t = t.replace(/[ | ]*\n/g, "\n"); //去除行尾空白
t = t.replace(/&nbsp;/gi, ""); //去掉&nbsp;
let json = {
id: this.form.id,
inspectData: this.form.inspectData,
operationNode: this.form.operationNode,
remindType: this.form.remindType,
remindContent: t.replace(/<[^>]+>/g, " "),
remindContent: t,
operation: this.form.operation,
};
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