修改赋能场景bug
This commit is contained in:
parent
0df1914eb3
commit
f0b737396b
|
@ -41,7 +41,7 @@
|
|||
<el-upload ref="editUpload" class="upload-demo" :action="fileUploadUrl"
|
||||
:on-success="eidtHandleAvatarSuccess" :before-upload="editBeforeAvatarUpload" :limit="1"
|
||||
:file-list="[]" :on-remove="editUploadRemoveFile" :on-exceed="handleExceed" list-type="picture">
|
||||
<div slot="tip" class="el-upload__tip">只能上传图片文件</div>
|
||||
<div slot="tip" class="el-upload__tip">只能上传图片文件,格式为jpg/png</div>
|
||||
<div class="button-new">
|
||||
<div>点击上传</div>
|
||||
</div>
|
||||
|
@ -299,7 +299,7 @@ export default {
|
|||
file.type === 'image/jpg' ||
|
||||
file.type === 'image/png'
|
||||
if (!isImage) {
|
||||
this.$message.error('上传头像图片只能是 jpg/png 格式!')
|
||||
this.$message.error('上传图片只能是 jpg/png 格式!')
|
||||
}
|
||||
return isImage
|
||||
},
|
||||
|
@ -314,7 +314,7 @@ export default {
|
|||
file.type === 'image/png'
|
||||
|
||||
if (!isImage) {
|
||||
this.$message.error('上传头像图片只能是 jpg/png 格式!')
|
||||
this.$message.error('上传图片只能是 jpg/png 格式!')
|
||||
}
|
||||
return isImage
|
||||
},
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<el-upload ref="editUpload" class="upload-demo" :action="fileUploadUrl"
|
||||
:on-success="eidtHandleAvatarSuccess" :before-upload="editBeforeAvatarUpload" :limit="1"
|
||||
:file-list="[]" :on-remove="editUploadRemoveFile" :on-exceed="handleExceed" list-type="picture">
|
||||
<div slot="tip" class="el-upload__tip">只能上传图片文件</div>
|
||||
<div slot="tip" class="el-upload__tip">只能上传图片文件,格式为jpg/png</div>
|
||||
<div class="button-new">
|
||||
<div>点击上传</div>
|
||||
</div>
|
||||
|
@ -458,7 +458,7 @@ export default {
|
|||
file.type === 'image/jpg' ||
|
||||
file.type === 'image/png'
|
||||
if (!isImage) {
|
||||
this.$message.error('上传头像图片只能是 jpg/png 格式!')
|
||||
this.$message.error('上传图片只能是 jpg/png 格式!')
|
||||
}
|
||||
return isImage
|
||||
},
|
||||
|
@ -473,7 +473,7 @@ export default {
|
|||
file.type === 'image/png'
|
||||
|
||||
if (!isImage) {
|
||||
this.$message.error('上传头像图片只能是 jpg/png 格式!')
|
||||
this.$message.error('上传图片只能是 jpg/png 格式!')
|
||||
}
|
||||
return isImage
|
||||
},
|
||||
|
|
|
@ -61,12 +61,21 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
style="color: #0058e1"
|
||||
@click="handleDelete(scope.$index, scope.row)"
|
||||
>删除</span
|
||||
>
|
||||
</template>
|
||||
<el-popconfirm
|
||||
confirm-button-text="确认"
|
||||
cancel-button-text="不用了"
|
||||
icon="el-icon-info"
|
||||
icon-color="red"
|
||||
title="确定删除该实例数据吗?"
|
||||
@confirm="handleDelete(scope.$index, scope.row)"
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
slot="reference"
|
||||
></el-button>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
|
|
@ -31,18 +31,28 @@
|
|||
v-if="index != item.answer.length - 1"
|
||||
v-model="itemson.answer"
|
||||
placeholder="请输入步骤小节"
|
||||
style="width: 200px"
|
||||
style="width: 160px"
|
||||
:disabled="disabledType"
|
||||
>
|
||||
</el-input>
|
||||
<img
|
||||
style="color: red; margin-left: 6px"
|
||||
@click="deleteItem1(item.answer,index)"
|
||||
type="danger"
|
||||
size="small"
|
||||
v-if="!disabledType && index != item.answer.length - 1"
|
||||
src="~@/assets/img/deleteRed.png"
|
||||
alt=""
|
||||
/>
|
||||
<div v-else style="display: inline">
|
||||
<el-input
|
||||
v-model="itemson.answer"
|
||||
placeholder="请输入步骤小节"
|
||||
style="width: 200px"
|
||||
style="width: 160px"
|
||||
:disabled="disabledType"
|
||||
>
|
||||
</el-input>
|
||||
|
||||
<div class="submit1">
|
||||
<a-button type="primary" @click="addAnswerItem(item.answer)">
|
||||
<img
|
||||
|
@ -55,22 +65,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <a-button type="primary" v-if="!disabledType && index == dataInfo.length - 1"
|
||||
@click="addItem">
|
||||
<img
|
||||
style="height: 12px; width: 12px;margin-top: -2px;"
|
||||
src="~@/assets/img/jiahao.png"
|
||||
alt=""
|
||||
/>
|
||||
<span style="margin-left: 4px">添加小节</span>
|
||||
</a-button> -->
|
||||
<!-- <div class="question-box-right">
|
||||
<span>步骤小节: </span>
|
||||
<el-input v-model="itemson.answer" placeholder="请输入步骤小节" style="width:200px"
|
||||
:disabled="disabledType">
|
||||
</el-input>
|
||||
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="submit">
|
||||
|
@ -89,33 +84,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="question-box">
|
||||
|
||||
<div v-for="(item, index) in dataInfo" :key="index">
|
||||
<el-form-item label="步骤标题" prop="question">
|
||||
<el-input v-model="item.question" placeholder="请输入标题" style="width:90%" :disabled="disabledType">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="步骤" prop="question">
|
||||
<el-input type="textarea" :rows="3" v-model="item.answer" placeholder="请输入解释说明" style="width:90%"
|
||||
:disabled="disabledType">
|
||||
</el-input>
|
||||
<el-button style="margin-left:10px" @click="deleteItem(index)" type="danger" size="small"
|
||||
v-if="!disabledType && dataInfo.length > 1">删除
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-button class="add-btn" size="small" v-if="!disabledType && index == dataInfo.length - 1"
|
||||
@click="addItem" type="primary">添加
|
||||
</el-button>
|
||||
</div> -->
|
||||
|
||||
<!-- <div class="step-box">
|
||||
<el-steps :active="2">
|
||||
<el-step status="finish" :title="item.question || `标题${index + 1}`" v-for="(item, index) in dataInfo"
|
||||
:key="index">
|
||||
</el-step>
|
||||
</el-steps>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -207,6 +176,22 @@ export default {
|
|||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 删除
|
||||
deleteItem1(item,index) {
|
||||
this.$confirm("确认是否删除?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
item.splice(index,1)
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -262,7 +247,7 @@ export default {
|
|||
}
|
||||
.question-box {
|
||||
float: left;
|
||||
width: 42%;
|
||||
width: 295px;
|
||||
}
|
||||
.question-box1 {
|
||||
float: left;
|
||||
|
|
Loading…
Reference in New Issue