2025-04-18 17:17:23 +08:00
|
|
|
|
<script setup>
|
2025-05-12 18:43:41 +08:00
|
|
|
|
import {ElNotification, selectGroupKey} from "element-plus";
|
2025-05-13 18:13:22 +08:00
|
|
|
|
import {
|
|
|
|
|
resourceDelete,
|
|
|
|
|
resourceList,
|
|
|
|
|
resourcePost,
|
|
|
|
|
resourcePut,
|
|
|
|
|
resourceGetAllItems,
|
|
|
|
|
resourceRowsSelectionPost
|
|
|
|
|
} from "@/api/resource.js";
|
2025-04-22 15:46:48 +08:00
|
|
|
|
import {ref, toRaw} from "vue";
|
2025-04-24 20:39:31 +08:00
|
|
|
|
import {useRoute} from 'vue-router';
|
2025-04-30 15:46:14 +08:00
|
|
|
|
import LocalCache from "@/stores/localCache.js";
|
|
|
|
|
import empty from '@/components/restful/empty.vue';
|
2025-05-04 22:07:13 +08:00
|
|
|
|
import {getWhereConditionDesc} from "@/utils/string.js";
|
2025-05-13 18:13:22 +08:00
|
|
|
|
import UserDetail from "@/components/game/userDetail.vue";
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
rowClickDialogBtns: Array,
|
|
|
|
|
})
|
2025-04-26 13:50:26 +08:00
|
|
|
|
|
2025-04-27 17:23:19 +08:00
|
|
|
|
const cachedResource = LocalCache.getCache("resource");
|
2025-04-24 20:39:31 +08:00
|
|
|
|
|
2025-04-22 15:46:48 +08:00
|
|
|
|
const listRsp = ref({fields_desc: [], rows: []})
|
2025-04-24 20:39:31 +08:00
|
|
|
|
const listDataOK = ref(false)
|
2025-05-04 22:07:13 +08:00
|
|
|
|
const projectId = cachedResource.meta.projectId
|
2025-04-27 17:23:19 +08:00
|
|
|
|
const resource_raw_node = cachedResource;
|
2025-04-30 15:46:14 +08:00
|
|
|
|
const hasListPermit = resource_raw_node.meta.methods.get !== undefined && resource_raw_node.meta.methods.get === true;
|
2025-05-12 18:43:41 +08:00
|
|
|
|
const globalClickBtns = resource_raw_node.meta.global_click_btns ? resource_raw_node.meta.global_click_btns : [];
|
2025-05-13 18:13:22 +08:00
|
|
|
|
let rowClickBtns = resource_raw_node.meta.row_click_btns ? resource_raw_node.meta.row_click_btns : []
|
|
|
|
|
rowClickBtns.push(...props.rowClickDialogBtns)
|
|
|
|
|
const rowClickBtnVisibleList = reactive(rowClickBtns.map(() => false))
|
|
|
|
|
const rowClickBtnSelectRow = ref(null)
|
2025-05-12 18:43:41 +08:00
|
|
|
|
|
2025-05-13 18:13:22 +08:00
|
|
|
|
console.log("global btns:", globalClickBtns)
|
|
|
|
|
console.log("row btns:", rowClickBtns)
|
2025-04-30 15:46:14 +08:00
|
|
|
|
|
2025-04-27 17:23:19 +08:00
|
|
|
|
const resource_url = cachedResource.meta.resource_url;
|
2025-04-22 15:46:48 +08:00
|
|
|
|
const fieldsDescInfo = ref([])
|
2025-05-04 22:07:13 +08:00
|
|
|
|
const whereFieldsDescInfo = ref([])
|
|
|
|
|
const calcElColSpan = ref(0)
|
2025-04-22 15:46:48 +08:00
|
|
|
|
const rows = ref([])
|
|
|
|
|
const rules = ref({})
|
|
|
|
|
|
2025-05-09 18:28:15 +08:00
|
|
|
|
const current_page = ref(1)
|
2025-05-10 10:18:06 +08:00
|
|
|
|
const page_size = ref(10)
|
|
|
|
|
const pageSizes = [10, 20, 50, 100]
|
2025-05-09 18:28:15 +08:00
|
|
|
|
const totalRowCount = ref(0)
|
2025-04-30 15:46:14 +08:00
|
|
|
|
|
2025-04-24 20:39:31 +08:00
|
|
|
|
const item = ref({
|
2025-05-04 22:07:13 +08:00
|
|
|
|
id: '',
|
2025-04-24 20:39:31 +08:00
|
|
|
|
number: 1,
|
|
|
|
|
})
|
|
|
|
|
|
2025-04-27 17:23:19 +08:00
|
|
|
|
// console.log("enter table, resource:", cachedResource)
|
2025-04-24 20:39:31 +08:00
|
|
|
|
|
2025-04-22 15:46:48 +08:00
|
|
|
|
const listData = async () => {
|
|
|
|
|
try {
|
2025-04-24 20:39:31 +08:00
|
|
|
|
let listParams = {
|
2025-05-09 18:28:15 +08:00
|
|
|
|
page_no: current_page.value,
|
|
|
|
|
page_len: page_size.value,
|
2025-05-04 22:07:13 +08:00
|
|
|
|
where_conditions: "",
|
2025-04-24 20:39:31 +08:00
|
|
|
|
}
|
2025-05-09 18:28:15 +08:00
|
|
|
|
|
|
|
|
|
console.log(`查询页:${listParams.page_no},查询页大小:${listParams.page_len}`)
|
|
|
|
|
|
2025-05-04 22:07:13 +08:00
|
|
|
|
let whereReqConditions = {
|
|
|
|
|
conditions: []
|
|
|
|
|
}
|
|
|
|
|
whereFieldsDescInfo.value.forEach((field) => {
|
|
|
|
|
if (field.value1) {
|
|
|
|
|
whereReqConditions.conditions.push({
|
|
|
|
|
key: field.key,
|
|
|
|
|
op: field.where,
|
|
|
|
|
value1: field.value1,
|
|
|
|
|
value2: field.value2,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
listParams.where_conditions = JSON.stringify(whereReqConditions)
|
2025-04-27 17:23:19 +08:00
|
|
|
|
// console.log("list params:", listParams)
|
2025-04-24 20:39:31 +08:00
|
|
|
|
const rspData = await resourceList(resource_url, listParams);
|
2025-04-22 15:46:48 +08:00
|
|
|
|
listRsp.value = rspData;
|
|
|
|
|
if (listRsp.value.code !== 200) throw new Error("请求失败,错误码:", listRsp.code);
|
|
|
|
|
fieldsDescInfo.value = listRsp.value.data.fields_desc
|
2025-05-09 18:28:15 +08:00
|
|
|
|
totalRowCount.value = listRsp.value.data.total_count
|
2025-04-22 15:46:48 +08:00
|
|
|
|
rows.value = listRsp.value.data.rows
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < fieldsDescInfo.value.length; i++) {
|
|
|
|
|
var field = fieldsDescInfo.value[i]
|
2025-05-08 17:33:46 +08:00
|
|
|
|
dialogObjectForm.value[field.key] = ''
|
2025-04-28 15:56:04 +08:00
|
|
|
|
|
2025-04-24 20:39:31 +08:00
|
|
|
|
if (field.required == true) {
|
2025-04-22 15:46:48 +08:00
|
|
|
|
rules.value[field.key] = [{required: true, message: field.name + "不能为空", trigger: "blur"}]
|
|
|
|
|
}
|
2025-04-24 20:39:31 +08:00
|
|
|
|
|
|
|
|
|
if (field.type == "items") {
|
2025-05-08 17:33:46 +08:00
|
|
|
|
dialogObjectForm.value[field.key] = []
|
2025-04-24 20:39:31 +08:00
|
|
|
|
for (let j = 0; j < rows.value.length; j++) {
|
|
|
|
|
rows.value[j].jsonValue = JSON.stringify(rows.value[j][field.key])
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-05-04 22:07:13 +08:00
|
|
|
|
|
|
|
|
|
if (field.where !== "") {
|
|
|
|
|
field.value1 = ""
|
|
|
|
|
field.value2 = ""
|
|
|
|
|
field.whereDesc = getWhereConditionDesc(field.where)
|
|
|
|
|
let find = false
|
|
|
|
|
for (let i = 0; i < whereFieldsDescInfo.value.length; i++) {
|
|
|
|
|
let whereField = whereFieldsDescInfo.value[i]
|
|
|
|
|
if (whereField.key === field.key) {
|
|
|
|
|
whereFieldsDescInfo.value[i].type = field.type
|
|
|
|
|
whereFieldsDescInfo.value[i].where = field.where
|
|
|
|
|
whereFieldsDescInfo.value[i].whereDesc = getWhereConditionDesc(field.where)
|
|
|
|
|
find = true
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!find) {
|
|
|
|
|
whereFieldsDescInfo.value.push(field)
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-04-22 15:46:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-05-04 22:07:13 +08:00
|
|
|
|
calcElColSpan.value = 0
|
|
|
|
|
// 计算el-col占用24格子的span数量
|
2025-05-07 15:03:19 +08:00
|
|
|
|
let calcElColSpanTmp = 2
|
2025-05-04 22:07:13 +08:00
|
|
|
|
whereFieldsDescInfo.value.forEach((field) => {
|
|
|
|
|
if (field.where === "range") {
|
|
|
|
|
calcElColSpanTmp += 2
|
|
|
|
|
} else {
|
|
|
|
|
calcElColSpanTmp += 1
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-05-07 15:03:19 +08:00
|
|
|
|
calcElColSpan.value = 24 / calcElColSpanTmp
|
2025-05-04 22:07:13 +08:00
|
|
|
|
|
2025-05-07 15:03:19 +08:00
|
|
|
|
// console.log("where fields:", whereFieldsDescInfo.value)
|
2025-04-27 17:23:19 +08:00
|
|
|
|
// console.log('await list rsp:', listRsp.value, fieldsDescInfo.value, toRaw(rows.value), toRaw(rules.value))
|
2025-04-22 15:46:48 +08:00
|
|
|
|
|
2025-04-24 20:39:31 +08:00
|
|
|
|
listDataOK.value = true
|
2025-04-22 15:46:48 +08:00
|
|
|
|
} catch (err) {
|
|
|
|
|
console.log(err)
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
listData();
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const dialogAddVisible = ref(false)
|
|
|
|
|
const dialogEditVisible = ref(false)
|
|
|
|
|
const dialogAddFormRef = ref(null)
|
|
|
|
|
const dialogEditFormRef = ref(null)
|
|
|
|
|
|
2025-05-08 17:33:46 +08:00
|
|
|
|
const dialogObjectForm = ref({
|
2025-04-24 20:39:31 +08:00
|
|
|
|
ServerIDs: [],
|
2025-04-28 15:56:04 +08:00
|
|
|
|
Attach: [],
|
2025-04-24 20:39:31 +08:00
|
|
|
|
})
|
2025-04-18 17:43:08 +08:00
|
|
|
|
|
2025-05-12 18:43:41 +08:00
|
|
|
|
const tableSelectRows = ref([])
|
|
|
|
|
|
2025-05-13 18:13:22 +08:00
|
|
|
|
const handleTableSelectRowsSendToServer = (btnInfo, rows) => {
|
|
|
|
|
console.log(`选择表格行,类型:${btnInfo},:`, rows)
|
|
|
|
|
|
|
|
|
|
ElMessageBox.confirm("确定要操作吗?").then(() => {
|
|
|
|
|
resourceRowsSelectionPost(resource_url, {btn_key: btnInfo.key, rows: rows}).then((res) => {
|
|
|
|
|
const resultMsg = res.data.msg
|
|
|
|
|
const needRefresh = res.data.need_refresh
|
|
|
|
|
|
|
|
|
|
ElNotification({
|
|
|
|
|
title: "操作行数据返回",
|
|
|
|
|
message: h('i', {style: 'color: teal'}, resultMsg),
|
|
|
|
|
duration: 900,
|
|
|
|
|
onClose(vm) {
|
|
|
|
|
if (needRefresh) {
|
|
|
|
|
location.reload()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// console.log("返回消息:", resultMsg, needRefresh)
|
|
|
|
|
}, (err) => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
})
|
2025-05-12 18:43:41 +08:00
|
|
|
|
}
|
|
|
|
|
const handleTableSelectChange = (rows) => {
|
|
|
|
|
tableSelectRows.value = rows
|
|
|
|
|
}
|
2025-05-13 18:13:22 +08:00
|
|
|
|
const tableSelectRows1 = (btnInfo) => {
|
|
|
|
|
handleTableSelectRowsSendToServer(btnInfo, tableSelectRows.value)
|
|
|
|
|
}
|
|
|
|
|
const tableSelectRows2 = (btnInfo, index, row) => {
|
|
|
|
|
if (btnInfo.btn_type > 0) {
|
|
|
|
|
if (btnInfo.btn_type == 1) {
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
handleTableSelectRowsSendToServer(btnInfo, [row])
|
2025-05-12 18:43:41 +08:00
|
|
|
|
}
|
2025-05-13 18:13:22 +08:00
|
|
|
|
const tableSelectRow3 = (i, row) => {
|
|
|
|
|
rowClickBtnSelectRow.value = row
|
|
|
|
|
rowClickBtnVisibleList[i] = true
|
|
|
|
|
console.log("点击按钮:", rowClickBtnSelectRow)
|
2025-05-12 18:43:41 +08:00
|
|
|
|
}
|
2025-04-18 17:17:23 +08:00
|
|
|
|
|
2025-04-22 15:46:48 +08:00
|
|
|
|
const submitAdd = async () => {
|
|
|
|
|
try {
|
|
|
|
|
await dialogAddFormRef.value.validate(valid => {
|
|
|
|
|
if (valid) {
|
2025-05-08 17:33:46 +08:00
|
|
|
|
console.log("commit add form:", dialogObjectForm.value)
|
|
|
|
|
resourcePost(resource_url, dialogObjectForm.value).then((res) => {
|
2025-04-22 15:46:48 +08:00
|
|
|
|
ElNotification({
|
|
|
|
|
title: "添加结果通知",
|
2025-05-10 10:18:06 +08:00
|
|
|
|
message: "添加成功!如果页面没有变化,刷新一下!",
|
2025-04-22 15:46:48 +08:00
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 4000,
|
|
|
|
|
"show-close": true,
|
|
|
|
|
})
|
2025-04-24 20:39:31 +08:00
|
|
|
|
rows.value.push(res.data.dto)
|
2025-04-22 15:46:48 +08:00
|
|
|
|
dialogAddVisible.value = false
|
2025-04-28 15:56:04 +08:00
|
|
|
|
handleCloseDialog()
|
2025-04-22 15:46:48 +08:00
|
|
|
|
}, (err) => {
|
|
|
|
|
console.log("添加报错:", err)
|
|
|
|
|
})
|
2025-05-08 17:33:46 +08:00
|
|
|
|
console.log("提交数据:", dialogObjectForm.value)
|
2025-04-22 15:46:48 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log("校验失败:", error)
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-04-18 17:17:23 +08:00
|
|
|
|
|
2025-04-22 15:46:48 +08:00
|
|
|
|
const submitEdit = async () => {
|
|
|
|
|
try {
|
|
|
|
|
await dialogEditFormRef.value.validate(valid => {
|
|
|
|
|
if (valid) {
|
2025-05-10 10:18:06 +08:00
|
|
|
|
const oldIndex = dialogObjectForm.value.oldIndex
|
|
|
|
|
const oldData = dialogObjectForm.value.oldData
|
|
|
|
|
// 这两句必须,因为上一步点击编辑按钮把value = row,然后把value.oldIndex = index,
|
|
|
|
|
// 貌似会引起类字段循环引用,然后发送时候序列化造成死循环
|
|
|
|
|
delete dialogObjectForm.value.oldIndex
|
|
|
|
|
delete dialogObjectForm.value.oldData
|
2025-05-08 17:33:46 +08:00
|
|
|
|
resourcePut(resource_url, dialogObjectForm.value).then((res) => {
|
2025-04-22 15:46:48 +08:00
|
|
|
|
ElNotification({
|
|
|
|
|
title: "编辑结果通知",
|
2025-05-10 10:18:06 +08:00
|
|
|
|
message: "编辑成功!如果页面没有变化,刷新一下!",
|
2025-04-22 15:46:48 +08:00
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 4000,
|
|
|
|
|
"show-close": true,
|
|
|
|
|
})
|
|
|
|
|
dialogEditVisible.value = false
|
2025-05-10 10:18:06 +08:00
|
|
|
|
rows.value[oldIndex] = res.data.dto
|
2025-04-28 15:56:04 +08:00
|
|
|
|
handleCloseDialog()
|
2025-04-22 15:46:48 +08:00
|
|
|
|
}, (err) => {
|
|
|
|
|
console.log("添加报错:", err)
|
|
|
|
|
})
|
2025-05-08 17:33:46 +08:00
|
|
|
|
console.log("提交数据:", dialogObjectForm.value)
|
2025-04-22 15:46:48 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log("校验失败:", error)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-24 20:39:31 +08:00
|
|
|
|
const handleEdit = (index, row) => {
|
2025-05-08 17:33:46 +08:00
|
|
|
|
dialogObjectForm.value = row
|
|
|
|
|
dialogObjectForm.value.oldData = row
|
|
|
|
|
dialogObjectForm.value.oldIndex = index
|
2025-04-22 15:46:48 +08:00
|
|
|
|
console.log("edit data:", row)
|
|
|
|
|
dialogEditVisible.value = true
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-24 20:39:31 +08:00
|
|
|
|
const handleDelete = (index, row) => {
|
2025-04-28 15:56:04 +08:00
|
|
|
|
ElMessageBox.confirm("确定要删除吗?").then(() => {
|
|
|
|
|
resourceDelete(resource_url, {id: row.ID}).then((res) => {
|
|
|
|
|
ElNotification({
|
|
|
|
|
title: "删除结果通知",
|
2025-05-10 10:18:06 +08:00
|
|
|
|
message: "删除数据[" + row.ID + "]成功!如果页面没有变化,刷新一下!",
|
2025-04-28 15:56:04 +08:00
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 4000,
|
|
|
|
|
"show-close": true,
|
|
|
|
|
})
|
|
|
|
|
rows.value.splice(index, 1)
|
|
|
|
|
}, (err) => {
|
|
|
|
|
console.log("delet error:", err)
|
2025-04-22 15:46:48 +08:00
|
|
|
|
})
|
2025-04-28 15:56:04 +08:00
|
|
|
|
}).catch(() => {
|
2025-04-22 15:46:48 +08:00
|
|
|
|
})
|
2025-04-28 15:56:04 +08:00
|
|
|
|
|
2025-04-22 15:46:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-04-24 20:39:31 +08:00
|
|
|
|
function addItem(fieldDescInfo) {
|
|
|
|
|
if (item.value.id == null || item.value.id == '' || item.value.id < 0) {
|
|
|
|
|
ElMessage('请选择道具!')
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (item.value.num == null || item.value.num == '' || item.value.num <= 0) {
|
|
|
|
|
ElMessage('请输入有效道具数量!')
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-08 17:33:46 +08:00
|
|
|
|
let d = {id: item.value.id, num: Number(item.value.num), desc: item.value.desc, item_type: item.value.item_type};
|
2025-04-24 20:39:31 +08:00
|
|
|
|
|
|
|
|
|
console.log("add item:", d)
|
|
|
|
|
|
2025-05-08 17:33:46 +08:00
|
|
|
|
if (typeof dialogObjectForm.value.Attach === typeof "") {
|
|
|
|
|
dialogObjectForm.value.Attach = [];
|
2025-04-24 20:39:31 +08:00
|
|
|
|
}
|
2025-05-08 17:33:46 +08:00
|
|
|
|
dialogObjectForm.value.Attach.push(d);
|
2025-04-24 20:39:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function deleteItem(row) {
|
|
|
|
|
// 移除该对象
|
2025-05-08 17:33:46 +08:00
|
|
|
|
let number = dialogObjectForm.value.Attach.findIndex(item => item === row);
|
|
|
|
|
dialogObjectForm.value.Attach.splice(number, 1);
|
2025-04-24 20:39:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-04-22 15:46:48 +08:00
|
|
|
|
const handleCloseDialog = () => {
|
2025-04-28 15:56:04 +08:00
|
|
|
|
console.log("关闭添加/编辑弹窗")
|
2025-04-22 15:46:48 +08:00
|
|
|
|
dialogAddVisible.value = false
|
|
|
|
|
dialogEditVisible.value = false
|
2025-05-08 17:33:46 +08:00
|
|
|
|
dialogObjectForm.value = {
|
2025-04-24 20:39:31 +08:00
|
|
|
|
Attach: [],
|
|
|
|
|
}
|
2025-05-08 17:33:46 +08:00
|
|
|
|
item.value.desc = ''
|
2025-04-22 15:46:48 +08:00
|
|
|
|
}
|
2025-04-18 17:17:23 +08:00
|
|
|
|
|
2025-05-04 22:07:13 +08:00
|
|
|
|
const loadingRemoteItems = ref(false)
|
|
|
|
|
const itemChoices = ref({})
|
2025-05-08 17:33:46 +08:00
|
|
|
|
|
|
|
|
|
const handleItemOnSelect = (itemOption) => {
|
|
|
|
|
console.log("选中:", itemOption)
|
|
|
|
|
item.value.id = itemOption.value
|
|
|
|
|
item.value.desc = itemOption.desc
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-04 22:07:13 +08:00
|
|
|
|
const handleQueryItem = (itemQueryStr) => {
|
|
|
|
|
if (!itemQueryStr) {
|
|
|
|
|
itemChoices.value = []
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
loadingRemoteItems.value = true
|
|
|
|
|
itemQueryStr = itemQueryStr.replace(/[\s\u3000]/g, "")
|
|
|
|
|
resourceGetAllItems(projectId).then((res) => {
|
|
|
|
|
console.log("获取所有道具返回:", res.data)
|
2025-05-07 15:03:19 +08:00
|
|
|
|
console.log("查询字符串:[" + itemQueryStr + "]")
|
2025-05-04 22:07:13 +08:00
|
|
|
|
itemChoices.value = res.data.items.filter((item) => {
|
|
|
|
|
return item.desc.includes(itemQueryStr)
|
|
|
|
|
})
|
|
|
|
|
loadingRemoteItems.value = false
|
|
|
|
|
}, (err) => {
|
|
|
|
|
itemChoices.value = []
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-07 15:03:19 +08:00
|
|
|
|
const resetConditionSearch = () => {
|
|
|
|
|
for (let i = 0; i < whereFieldsDescInfo.value.length; i++) {
|
|
|
|
|
let field = whereFieldsDescInfo.value[i]
|
|
|
|
|
field.value1 = null
|
|
|
|
|
field.value2 = null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-09 18:28:15 +08:00
|
|
|
|
const handlePaginationSizeChange = (val) => {
|
|
|
|
|
// console.log(`${val} 大小改变`)
|
|
|
|
|
if (totalRowCount.value <= 0) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (page_size.value * current_page.value > totalRowCount.value) {
|
|
|
|
|
// 当总数据少于页数乘以页大小,就拒绝请求
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// console.log(`${page_size.value} 大小改变`)
|
|
|
|
|
listData()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handlePaginationCurChange = (val) => {
|
|
|
|
|
// console.log(`${val} 页面改变`)
|
|
|
|
|
listData()
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-18 17:17:23 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<template v-if="!hasListPermit">
|
|
|
|
|
<component :is="empty"></component>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
<el-container v-if="listDataOK">
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-header style="margin-bottom: 10px">
|
2025-05-04 22:07:13 +08:00
|
|
|
|
<el-row :gutter="20" v-if="(whereFieldsDescInfo.length !== 0)">
|
|
|
|
|
<template v-for="fieldDescInfo in whereFieldsDescInfo">
|
|
|
|
|
<template v-if="(fieldDescInfo.where === 'range')">
|
|
|
|
|
<el-col :span="calcElColSpan">
|
|
|
|
|
<el-date-picker v-model="fieldDescInfo.value1" type="datetime"
|
|
|
|
|
:placeholder="(fieldDescInfo.name + '起始')" format="YYYY/MM/DD HH:mm:ss"
|
|
|
|
|
value-format="YYYY/MM/DD HH:mm:ss"></el-date-picker>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="calcElColSpan">
|
|
|
|
|
<el-date-picker v-model="fieldDescInfo.value2" type="datetime"
|
2025-05-07 15:03:19 +08:00
|
|
|
|
:placeholder="(fieldDescInfo.name + '结束')" format="YYYY/MM/DD HH:mm:ss"
|
|
|
|
|
value-format="YYYY/MM/DD HH:mm:ss"></el-date-picker>
|
2025-05-04 22:07:13 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
2025-05-05 10:30:33 +08:00
|
|
|
|
<el-col :span="calcElColSpan">
|
2025-05-07 15:03:19 +08:00
|
|
|
|
<el-select v-model="fieldDescInfo.value1"
|
|
|
|
|
:placeholder="(fieldDescInfo.multi_choice === true ? '--' + fieldDescInfo.name + '--' : '--' + fieldDescInfo.name + '--')"
|
2025-05-05 10:30:33 +08:00
|
|
|
|
style="width: 150px"
|
|
|
|
|
filterable v-if="(fieldDescInfo.choices.length > 0)">
|
|
|
|
|
<el-option v-for="choice in fieldDescInfo.choices" :key="choice.value" :label="choice.desc"
|
|
|
|
|
:value="choice.value"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-input v-model="fieldDescInfo.value1"
|
|
|
|
|
:placeholder="(fieldDescInfo.name + fieldDescInfo.whereDesc)"
|
|
|
|
|
style="width: 150px" v-else></el-input>
|
|
|
|
|
</el-col>
|
2025-05-04 22:07:13 +08:00
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
<el-col :span="calcElColSpan">
|
|
|
|
|
<el-button @click="listData" type="primary">条件搜索</el-button>
|
|
|
|
|
</el-col>
|
2025-05-07 15:03:19 +08:00
|
|
|
|
<el-col :span="calcElColSpan">
|
|
|
|
|
<el-button @click="resetConditionSearch">清空条件</el-button>
|
|
|
|
|
</el-col>
|
2025-05-04 22:07:13 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row style="margin-top: 10px">
|
2025-05-12 18:43:41 +08:00
|
|
|
|
<el-button @click="dialogAddVisible = true" size="default" type="primary"
|
2025-05-04 22:07:13 +08:00
|
|
|
|
v-if="(resource_raw_node.meta.methods.post === true)">
|
|
|
|
|
添加
|
|
|
|
|
</el-button>
|
2025-05-12 18:43:41 +08:00
|
|
|
|
|
2025-05-13 18:13:22 +08:00
|
|
|
|
<el-button v-for="btn in globalClickBtns" size="default" :type="btn.btn_color_type"
|
|
|
|
|
@click="tableSelectRows1(btn)">
|
2025-05-12 18:43:41 +08:00
|
|
|
|
{{ btn.name }}
|
|
|
|
|
</el-button>
|
2025-05-04 22:07:13 +08:00
|
|
|
|
</el-row>
|
2025-05-12 18:43:41 +08:00
|
|
|
|
|
|
|
|
|
|
2025-04-30 15:46:14 +08:00
|
|
|
|
</el-header>
|
|
|
|
|
<el-main>
|
2025-05-12 18:43:41 +08:00
|
|
|
|
<el-table :data="rows" style="width: 100%" table-layout="auto" stripe
|
|
|
|
|
@selection-change="handleTableSelectChange">
|
|
|
|
|
<el-table-column type="selection" v-if="globalClickBtns.length > 0 || rowClickBtns.length > 0">
|
|
|
|
|
|
|
|
|
|
</el-table-column>
|
2025-04-22 15:46:48 +08:00
|
|
|
|
<template v-for="fieldDescInfo in fieldsDescInfo">
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-table-column prop="jsonValue" :label="fieldDescInfo.name" show-overflow-tooltip
|
2025-04-30 15:46:14 +08:00
|
|
|
|
v-if="(fieldDescInfo.type === 'items')"></el-table-column>
|
|
|
|
|
<el-table-column :prop="fieldDescInfo.key" :label="fieldDescInfo.name"
|
|
|
|
|
v-else></el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<el-table-column prop="func" label="功 能">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
|
|
<el-button size="default" type="success" @click="handleEdit( scope.$index, scope.row)"
|
|
|
|
|
v-if="(resource_raw_node.meta.methods.put === true)">
|
2025-05-12 18:43:41 +08:00
|
|
|
|
<!-- <el-icon style="vertical-align: middle">-->
|
|
|
|
|
<!-- <Edit/>-->
|
|
|
|
|
<!-- </el-icon>-->
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<span>编辑</span>
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="default" type="danger" @click="handleDelete( scope.$index, scope.row)"
|
|
|
|
|
v-if="(resource_raw_node.meta.methods.delete === true)">
|
2025-05-12 18:43:41 +08:00
|
|
|
|
<!-- <el-icon style="vertical-align: middle">-->
|
|
|
|
|
<!-- <Delete/>-->
|
|
|
|
|
<!-- </el-icon>-->
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<span>删除</span>
|
|
|
|
|
</el-button>
|
2025-05-13 18:13:22 +08:00
|
|
|
|
<template v-for="(btn, index) in rowClickBtns">
|
|
|
|
|
<template v-if="btn.btn_type === 0">
|
|
|
|
|
<el-button size="default" :type="btn.btn_color_type"
|
|
|
|
|
@click="tableSelectRows2(btn, scope.$index, scope.row)">
|
|
|
|
|
{{ btn.name }}
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-else-if="btn.btn_type === 1">
|
|
|
|
|
<el-button size="default" :type="btn.btn_color_type"
|
|
|
|
|
@click="tableSelectRow3(index, scope.row)">
|
|
|
|
|
{{ btn.name }}
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-else-if="btn.btn_type === 2">
|
|
|
|
|
<el-button size="default" :type="btn.btn_color_type"
|
|
|
|
|
@click="btn.btn_callback_visible = true">
|
|
|
|
|
{{ btn.name }}
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
</template>
|
2025-04-24 20:39:31 +08:00
|
|
|
|
</template>
|
2025-04-30 15:46:14 +08:00
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<!-- 表格数据分页 -->
|
|
|
|
|
<div class="demo-pagination-block">
|
|
|
|
|
<div class="demonstration"></div>
|
|
|
|
|
<el-pagination
|
|
|
|
|
v-model:current-page="current_page"
|
|
|
|
|
v-model:page-size="page_size"
|
2025-05-09 18:28:15 +08:00
|
|
|
|
:page-sizes="pageSizes"
|
2025-04-30 15:46:14 +08:00
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
2025-05-09 18:28:15 +08:00
|
|
|
|
:total="totalRowCount"
|
|
|
|
|
@size-change="handlePaginationSizeChange"
|
|
|
|
|
@current-change="handlePaginationCurChange"
|
2025-04-30 15:46:14 +08:00
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-05-13 18:13:22 +08:00
|
|
|
|
<template v-for="(btn, index) in rowClickBtns">
|
|
|
|
|
<el-dialog v-model="rowClickBtnVisibleList[index]" :title="btn.name"
|
|
|
|
|
@close="rowClickBtnVisibleList[index]=false"
|
|
|
|
|
destroy-on-close>
|
|
|
|
|
<component :is="btn.btn_callback_component" :rowInfo="rowClickBtnSelectRow"/>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<el-dialog v-model="dialogAddVisible" :mask="true" title="添加" :modal="true" :before-close="handleCloseDialog"
|
|
|
|
|
destroy-on-close>
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-form ref="dialogAddFormRef" :model="dialogObjectForm" :rules="rules" label-position="right"
|
2025-04-30 15:46:14 +08:00
|
|
|
|
label-width="130px">
|
|
|
|
|
<template v-for="fieldDescInfo in fieldsDescInfo">
|
|
|
|
|
<!--如何是items类型,就是物品下拉框+道具组合-->
|
|
|
|
|
<template v-if="(fieldDescInfo.type === 'items')">
|
|
|
|
|
<el-form :inline="true" :model="item" label-position="right">
|
|
|
|
|
<el-form-item :label="fieldDescInfo.name" :prop="fieldDescInfo.key" label-width="130px">
|
|
|
|
|
<el-tooltip effect="light" :content="fieldDescInfo.help_text" placement="bottom-start">
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-select v-model="item" placeholder="--搜索道具--" style="width: 150px"
|
2025-05-04 22:07:13 +08:00
|
|
|
|
filterable remote
|
|
|
|
|
:remote-method="handleQueryItem"
|
2025-05-08 17:33:46 +08:00
|
|
|
|
:loading="loadingRemoteItems"
|
|
|
|
|
value-key="value"
|
|
|
|
|
@change="handleItemOnSelect"
|
|
|
|
|
>
|
2025-05-04 22:07:13 +08:00
|
|
|
|
<el-option v-for="info in itemChoices" :key="info.value" :label="info.desc"
|
2025-05-08 17:33:46 +08:00
|
|
|
|
:value="info"></el-option>
|
2025-04-30 15:46:14 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="数量" prop="num">
|
|
|
|
|
<el-input type="number" v-model="item.num" placeholder="请输入数量" style="width: 150px"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="addItem(fieldDescInfo)">添加</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-form-item label="奖励列表" prop="Attach">
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-table :data="dialogObjectForm.Attach" border>
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<el-table-column label="道具id" prop="id"/>
|
|
|
|
|
<el-table-column label="数量" prop="num"/>
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-table-column label="道具名" prop="desc"/>
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<el-table-column label="操作">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button type="danger" size="small" @click="deleteItem(scope.row)">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
2025-04-28 15:56:04 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<template v-else-if="(fieldDescInfo.readonly !== true)">
|
2025-04-28 15:56:04 +08:00
|
|
|
|
<!-- 有可选项的字段,走下拉框或者多选框 -->
|
|
|
|
|
<template v-if="(fieldDescInfo.choices !== undefined && fieldDescInfo.choices.length > 0)">
|
|
|
|
|
<el-form-item :label="fieldDescInfo.name" :prop="fieldDescInfo.key">
|
|
|
|
|
<el-tooltip effect="light" :content="fieldDescInfo.help_text" placement="bottom-start">
|
|
|
|
|
<el-select :placeholder="(fieldDescInfo.multi_choice === true ? '--多选--' : '--单选--')"
|
2025-05-08 17:33:46 +08:00
|
|
|
|
v-model="dialogObjectForm[fieldDescInfo.key]" style="width: 150px"
|
2025-04-28 15:56:04 +08:00
|
|
|
|
:multiple="(fieldDescInfo.multi_choice === true)">
|
|
|
|
|
<el-option v-for="info in fieldDescInfo.choices" :key="info.desc" :label="info.desc"
|
|
|
|
|
:value="info.value"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<!-- 时间戳字段,展示时间选择器 -->
|
|
|
|
|
<template v-else-if="(fieldDescInfo.type === 'Time')">
|
|
|
|
|
<el-form-item :label="fieldDescInfo.name" :prop="fieldDescInfo.key">
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-date-picker v-model="dialogObjectForm[fieldDescInfo.key]" type="datetime"
|
2025-04-28 15:56:04 +08:00
|
|
|
|
placeholder="选个时间" format="YYYY/MM/DD HH:mm:ss"
|
|
|
|
|
value-format="YYYY/MM/DD HH:mm:ss"></el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<!-- 否则就是普通字段 -->
|
|
|
|
|
<template v-else>
|
|
|
|
|
<el-form-item :label="fieldDescInfo.name" :prop="fieldDescInfo.key">
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-input v-model="dialogObjectForm[fieldDescInfo.key]"
|
2025-04-28 15:56:04 +08:00
|
|
|
|
:placeholder="fieldDescInfo.help_text"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
|
2025-04-30 15:46:14 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button @click="submitAdd(dialogAddFormRef)" size="large" type="primary">提交</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="dialogEditVisible" :mask="true" title="编辑" :modal="true" :before-close="handleCloseDialog"
|
|
|
|
|
destroy-on-close>
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-form ref="dialogEditFormRef" :model="dialogObjectForm" :rules="rules" class="operation_form"
|
2025-04-30 15:46:14 +08:00
|
|
|
|
label-width="130px">
|
|
|
|
|
<template v-for="fieldDescInfo in fieldsDescInfo">
|
|
|
|
|
|
|
|
|
|
<!--如果是items类型,就是物品下拉框+道具组合-->
|
|
|
|
|
<template v-if="(fieldDescInfo.type === 'items')">
|
|
|
|
|
<el-form :inline="true" :model="item" label-position="right"
|
|
|
|
|
label-width="130px">
|
|
|
|
|
<el-form-item :label="fieldDescInfo.name" :prop="fieldDescInfo.key">
|
|
|
|
|
<el-tooltip effect="light" :content="fieldDescInfo.help_text" placement="bottom-start">
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-select placeholder="--搜索道具--" v-model="item" style="width: 150px"
|
|
|
|
|
filterable remote :remote-method="handleQueryItem"
|
|
|
|
|
:loading="loadingRemoteItems"
|
|
|
|
|
value-key="value"
|
|
|
|
|
>
|
2025-05-04 22:07:13 +08:00
|
|
|
|
<el-option v-for="info in itemChoices" :key="info.value" :label="info.desc"
|
2025-05-08 17:33:46 +08:00
|
|
|
|
:value="info"></el-option>
|
2025-04-30 15:46:14 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="数量" prop="number">
|
|
|
|
|
<el-input type="number" v-model="item.num" placeholder="请输入数量" style="width: 150px"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="addItem(fieldDescInfo)">添加</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-form-item label="奖励列表" prop="attachmentsList">
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-table :data="dialogObjectForm.Attach" border>
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<el-table-column label="道具id" prop="id"/>
|
|
|
|
|
<el-table-column label="数量" prop="num"/>
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-table-column label="道具名" prop="desc"/>
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<el-table-column label="操作">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button type="danger" size="small" @click="deleteItem(scope.row)">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
2025-04-28 15:56:04 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<template v-else-if="(fieldDescInfo.readonly !== true)">
|
|
|
|
|
<template v-if="(fieldDescInfo.uneditable !== true)">
|
|
|
|
|
<!-- 有可选项的字段,走下拉框或者多选框 -->
|
|
|
|
|
<template v-if="(fieldDescInfo.choices !== undefined && fieldDescInfo.choices.length > 0)">
|
|
|
|
|
<el-form-item :label="fieldDescInfo.name" :prop="fieldDescInfo.key">
|
|
|
|
|
<el-tooltip effect="light" :content="fieldDescInfo.help_text" placement="bottom-start">
|
|
|
|
|
<el-select :placeholder="(fieldDescInfo.multi_choice === true ? '--多选--' : '--单选--')"
|
2025-05-08 17:33:46 +08:00
|
|
|
|
v-model="dialogObjectForm[fieldDescInfo.key]" style="width: 150px"
|
2025-04-30 15:46:14 +08:00
|
|
|
|
:multiple="(fieldDescInfo.multi_choice === true)">
|
|
|
|
|
<el-option v-for="info in fieldDescInfo.choices" :key="info.desc" :label="info.desc"
|
|
|
|
|
:value="info.value"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<!-- 时间戳字段,展示时间选择器 -->
|
|
|
|
|
<template v-else-if="(fieldDescInfo.type === 'Time')">
|
|
|
|
|
<el-form-item :label="fieldDescInfo.name" :prop="fieldDescInfo.key">
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-date-picker v-model="dialogObjectForm[fieldDescInfo.key]" type="datetime"
|
2025-04-30 15:46:14 +08:00
|
|
|
|
placeholder="选个时间" format="YYYY/MM/DD HH:mm:ss"
|
|
|
|
|
value-format="YYYY/MM/DD HH:mm:ss"></el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<!-- 否则就是普通字段 -->
|
|
|
|
|
<template v-else>
|
|
|
|
|
<el-form-item :label="fieldDescInfo.name" :prop="fieldDescInfo.key">
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-input v-model="dialogObjectForm[fieldDescInfo.key]"
|
2025-04-30 15:46:14 +08:00
|
|
|
|
:placeholder="fieldDescInfo.help_text"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
2025-04-28 15:56:04 +08:00
|
|
|
|
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<template v-else>
|
|
|
|
|
<el-form-item :label="fieldDescInfo.name" :prop="fieldDescInfo.key">
|
2025-05-08 17:33:46 +08:00
|
|
|
|
<el-input v-model="dialogObjectForm[fieldDescInfo.key]"
|
2025-04-30 15:46:14 +08:00
|
|
|
|
:placeholder="fieldDescInfo.help_text" disabled></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<!-- <el-form-item :label="fieldDescInfo.name" :prop="fieldDescInfo.key">-->
|
|
|
|
|
<!-- <el-input v-model="dialogEditForm[fieldDescInfo.key]"></el-input>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
</template>
|
2025-04-18 17:43:08 +08:00
|
|
|
|
|
2025-04-30 15:46:14 +08:00
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button @click="submitEdit(dialogEditFormRef)" size="large" type="primary">提交</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-dialog>
|
2025-04-18 17:43:08 +08:00
|
|
|
|
|
2025-04-30 15:46:14 +08:00
|
|
|
|
</el-main>
|
|
|
|
|
</el-container>
|
|
|
|
|
</template>
|
2025-04-18 17:17:23 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
2025-04-27 17:23:19 +08:00
|
|
|
|
<style scoped lang="scss">
|
2025-04-30 15:46:14 +08:00
|
|
|
|
.demo-pagination-block {
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
|
|
|
|
.el-pagination {
|
|
|
|
|
right: 40px;
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-04-18 17:17:23 +08:00
|
|
|
|
|
|
|
|
|
</style>
|