|
@@ -18,6 +18,33 @@
|
|
|
</el-table-column>
|
|
|
</template> -->
|
|
|
</tableForm>
|
|
|
+
|
|
|
+ <!-- 弹窗 -->
|
|
|
+ <el-dialog v-model="dialogVisible"
|
|
|
+ title="修改"
|
|
|
+ width="40%"
|
|
|
+ :before-close="handleClose">
|
|
|
+
|
|
|
+ <el-form ref="formData"
|
|
|
+ label-width="80px">
|
|
|
+ <el-form-item label="场景名称">
|
|
|
+ <el-input></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="封面">
|
|
|
+ <div class="">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary"
|
|
|
+ @click="dialogVisible = false">确认</el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -40,6 +67,7 @@ export default defineComponent({
|
|
|
setup(props) {
|
|
|
const { ctx } = getCurrentInstance()
|
|
|
const data = reactive({
|
|
|
+ dialogVisible: false,
|
|
|
pageParam: {
|
|
|
limit: 10,
|
|
|
nd: 1635487948418,
|
|
@@ -51,6 +79,7 @@ export default defineComponent({
|
|
|
},
|
|
|
})
|
|
|
const searchFormData = ref({
|
|
|
+ formData: {},
|
|
|
searchList: [
|
|
|
{
|
|
|
type: 'input',
|
|
@@ -84,22 +113,26 @@ export default defineComponent({
|
|
|
],
|
|
|
},
|
|
|
],
|
|
|
- action: [
|
|
|
- {
|
|
|
- name: '新增',
|
|
|
- clickFun: () => {
|
|
|
- handleTableData()
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
+ // action: [
|
|
|
+ // {
|
|
|
+ // name: '新增',
|
|
|
+ // clickFun: () => {
|
|
|
+ // data.dialogVisible = true
|
|
|
+ // // handleTableData()
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
})
|
|
|
+ const handleClose = () => {
|
|
|
+ console.log('handleClose')
|
|
|
+ }
|
|
|
const tableHeader = ref([
|
|
|
{ prop: 'sceneName', label: '场景名称' },
|
|
|
{
|
|
|
prop: 'thumb',
|
|
|
label: '封面',
|
|
|
render: (params) => {
|
|
|
- console.log(params.row.thumb)
|
|
|
+ // console.log(params.row.thumb)
|
|
|
return h('img', {
|
|
|
style: {
|
|
|
width: '100px',
|
|
@@ -150,14 +183,22 @@ export default defineComponent({
|
|
|
label: '操作',
|
|
|
action: [
|
|
|
{
|
|
|
- name: '编辑',
|
|
|
+ name: '修改',
|
|
|
+ type: 'danger',
|
|
|
+ clickFun: (index, row) => {
|
|
|
+ // console.log(index, row)
|
|
|
+ editRow(index, row)
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '打开编辑器',
|
|
|
+ type: 'success',
|
|
|
clickFun: (index, row) => {
|
|
|
console.log(index, row)
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- name: '删除',
|
|
|
- type: 'danger',
|
|
|
+ name: '生成直播间',
|
|
|
clickFun: (index, row) => {
|
|
|
console.log(index, row)
|
|
|
hanldeDelRow(index, row)
|
|
@@ -187,6 +228,11 @@ export default defineComponent({
|
|
|
tableData.value = res.page.list
|
|
|
console.log(tableData)
|
|
|
}
|
|
|
+ const editRow = (index, row) => {
|
|
|
+ data.formData = row
|
|
|
+ data.dialogVisible = true
|
|
|
+ // console.log(formData.value.sceneName)
|
|
|
+ }
|
|
|
const hanldeDelRow = (index, row) => {
|
|
|
ElMessageBox.confirm('是否删除改数据?', {
|
|
|
confirmButtonText: '确认',
|
|
@@ -202,7 +248,7 @@ export default defineComponent({
|
|
|
return {
|
|
|
handleSearch,
|
|
|
handleTableData,
|
|
|
-
|
|
|
+ handleClose,
|
|
|
tableHeader,
|
|
|
tableData,
|
|
|
searchFormData,
|
|
@@ -212,4 +258,12 @@ export default defineComponent({
|
|
|
})
|
|
|
</script>
|
|
|
|
|
|
-<style scoped lang="scss"></style>
|
|
|
+<style lang="scss">
|
|
|
+#sence {
|
|
|
+ .cell {
|
|
|
+ .el-link {
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|