剧本编制修改会话代码调整
This commit is contained in:
parent
2462ba7413
commit
df475ab28a
@ -22,8 +22,8 @@
|
||||
<!-- <span>{{ $t('scriptRecord.speakTo') }}</span> -->
|
||||
<!-- <span class="roleClass">{{ actionInfo.targetName }}</span> -->
|
||||
<span>: </span>
|
||||
<span v-if="!isModify">{{ actionInfo.reply }}</span>
|
||||
<textarea v-else v-model="modifyText" type="text" class="modifyText" />
|
||||
<span v-if="!actionInfo.isModify">{{ actionInfo.reply }}</span>
|
||||
<textarea v-else v-model="actionInfo.modifyText" type="text" class="modifyText" />
|
||||
</span>
|
||||
<span v-else>
|
||||
<span class="roleClass">{{ actionInfo.memberName }}</span>
|
||||
@ -32,9 +32,9 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="btnGroup">
|
||||
<el-button v-if="actionInfo.visible && !isModify" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button>
|
||||
<el-button v-if="actionInfo.visible && isModify" :loading="modifyTextLoading" type="danger" size="mini" style="margin-left:10px;" @click="confirmModify(actionInfo.row)">确定</el-button>
|
||||
<el-button v-if="actionInfo.visible && isModify" type="" size="mini" style="margin-left:10px;" @click="cancleModify">取消</el-button>
|
||||
<el-button v-if="actionInfo.visible && !actionInfo.isModify" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button>
|
||||
<el-button v-if="actionInfo.visible && actionInfo.isModify" :loading="modifyTextLoading" type="danger" size="mini" style="margin-left:10px;" @click="confirmModify(actionInfo)">确定</el-button>
|
||||
<el-button v-if="actionInfo.visible && actionInfo.isModify" type="" size="mini" style="margin-left:10px;" @click="cancleModify(actionInfo)">取消</el-button>
|
||||
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> -->
|
||||
</div>
|
||||
</el-card>
|
||||
@ -67,8 +67,8 @@ export default {
|
||||
memberVOList:[],
|
||||
reverse: false,
|
||||
loading: true,
|
||||
isModify:false,
|
||||
modifyText:'',
|
||||
// isModify:false,
|
||||
// modifyText:'',
|
||||
modifyTextLoading:false,
|
||||
// behaviorName:"",
|
||||
memberName: ''
|
||||
@ -138,7 +138,7 @@ export default {
|
||||
}
|
||||
case 'Conversation':
|
||||
{
|
||||
this.actionInfoList.push({id: element.id, isCoversition: true, memberName: memberName, reply: element.content, row: element, visible: true});
|
||||
this.actionInfoList.push({id: element.id, isCoversition: true, memberName: memberName, reply: element.content, row: element, visible: true, isModify:false, modifyText:''});
|
||||
break;
|
||||
}
|
||||
case 'Command':
|
||||
@ -187,33 +187,34 @@ export default {
|
||||
reloadTable() {
|
||||
this.loadInitData();
|
||||
},
|
||||
modifyAction(row) {
|
||||
this.modifyText = row.content;
|
||||
this.isModify = true;
|
||||
modifyAction(actionInfo) {
|
||||
actionInfo.modifyText = actionInfo.row.content;
|
||||
actionInfo.isModify = true;
|
||||
},
|
||||
cancleModify() {
|
||||
this.modifyText = '';
|
||||
this.isModify = false;
|
||||
cancleModify(actionInfo) {
|
||||
actionInfo.modifyText = '';
|
||||
actionInfo.isModify = false;
|
||||
this.modifyTextLoading = false;
|
||||
},
|
||||
confirmModify(row) {
|
||||
if (this.modifyText != row.content) {
|
||||
confirmModify(actionInfo) {
|
||||
const row = actionInfo.row;
|
||||
if (actionInfo.modifyText != row.content) {
|
||||
const data = {id:row.id};
|
||||
data.content = this.modifyText;
|
||||
data.content = actionInfo.modifyText;
|
||||
this.modifyTextLoading = true;
|
||||
modifyScriptActionNew(this.group, data).then(response=>{
|
||||
this.modifyText = '';
|
||||
this.isModify = false;
|
||||
actionInfo.modifyText = '';
|
||||
actionInfo.isModify = false;
|
||||
this.modifyTextLoading = false;
|
||||
this.reloadTable();
|
||||
this.$store.dispatch('scriptRecord/updateCoversitionInfo');
|
||||
});
|
||||
} else {
|
||||
if (!this.modifyText) {
|
||||
if (!actionInfo.modifyText) {
|
||||
this.$messageBox('请输入修改的会话');
|
||||
} else {
|
||||
this.modifyText = '';
|
||||
this.isModify = false;
|
||||
actionInfo.modifyText = '';
|
||||
actionInfo.isModify = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user