1332 lines
55 KiB
JavaScript
1332 lines
55 KiB
JavaScript
import { U as ElRow, V as ElCol, h as ElButton, m as ElDropdown, n as ElDropdownMenu, o as ElDropdownItem, N as check_default, a8 as circle_close_default, l as ElTooltip, ax as ElPopover, F as ElScrollbar, aC as ElCheckbox, al as ElTable, am as ElTableColumn, q as ElTag, u as ElEmpty, ao as vLoading, a9 as question_filled_default, T as ElCard, a3 as ElDescriptions, a4 as ElDescriptionsItem, w as ElForm, x as ElFormItem, P as ElRadioGroup, Q as ElRadio, y as ElInput, aq as ElSelect, ar as ElOption, aw as ElDatePicker, v as ElDialog, D as ElMessageBox, E as ElMessage } from "./element-plus.CkEW9frc.js";
|
||
import { _ as __unplugin_components_19 } from "./index.fgd49PES.js";
|
||
import { l as httpRequest, j as useDictStore, R as ResultEnum } from "./index.CMd5bD1r.js";
|
||
import { _ as _sfc_main$1 } from "./ImportModal.vue_vue_type_script_setup_true_lang.DYvH1hkB.js";
|
||
import { _ as _sfc_main$2 } from "./ExportModal.vue_vue_type_script_setup_true_lang.Bok1HJuH.js";
|
||
import { J as defineComponent, t as onMounted, aP as resolveDirective, S as openBlock, _ as createElementBlock, $ as createVNode, a0 as withCtx, a1 as createBaseVNode, a6 as withDirectives, T as createBlock, a9 as createTextVNode, o as unref, H as Fragment, ay as renderList, a8 as createCommentVNode, aa as toDisplayString, r as ref, ak as reactive } from "./.pnpm.BW3P1y8f.js";
|
||
import "./_plugin-vue_export-helper.1tPrXgE0.js";
|
||
import "./codemirror.CvJAcn2d.js";
|
||
import "./exceljs.CkFT-P7Q.js";
|
||
const API_PATH = "/yifan/yifan_privacy_policy";
|
||
const YifanPrivacyPolicyAPI = {
|
||
// 列表查询
|
||
listYifanPrivacyPolicy(query) {
|
||
return httpRequest({
|
||
url: `${API_PATH}/list`,
|
||
method: "get",
|
||
params: query
|
||
});
|
||
},
|
||
// 详情查询
|
||
detailYifanPrivacyPolicy(id) {
|
||
return httpRequest({
|
||
url: `${API_PATH}/detail/${id}`,
|
||
method: "get"
|
||
});
|
||
},
|
||
// 新增
|
||
createYifanPrivacyPolicy(body) {
|
||
return httpRequest({
|
||
url: `${API_PATH}/create`,
|
||
method: "post",
|
||
data: body
|
||
});
|
||
},
|
||
// 修改(带主键)
|
||
updateYifanPrivacyPolicy(id, body) {
|
||
return httpRequest({
|
||
url: `${API_PATH}/update/${id}`,
|
||
method: "put",
|
||
data: body
|
||
});
|
||
},
|
||
// 删除(支持批量)
|
||
deleteYifanPrivacyPolicy(ids) {
|
||
return httpRequest({
|
||
url: `${API_PATH}/delete`,
|
||
method: "delete",
|
||
data: ids
|
||
});
|
||
},
|
||
// 批量启用/停用
|
||
batchYifanPrivacyPolicy(body) {
|
||
return httpRequest({
|
||
url: `${API_PATH}/available/setting`,
|
||
method: "patch",
|
||
data: body
|
||
});
|
||
},
|
||
// 导出
|
||
exportYifanPrivacyPolicy(query) {
|
||
return httpRequest({
|
||
url: `${API_PATH}/export`,
|
||
method: "post",
|
||
data: query,
|
||
responseType: "blob"
|
||
});
|
||
},
|
||
// 下载导入模板
|
||
downloadTemplateYifanPrivacyPolicy() {
|
||
return httpRequest({
|
||
url: `${API_PATH}/download/template`,
|
||
method: "post",
|
||
responseType: "blob"
|
||
});
|
||
},
|
||
// 导入
|
||
importYifanPrivacyPolicy(body) {
|
||
return httpRequest({
|
||
url: `${API_PATH}/import`,
|
||
method: "post",
|
||
data: body,
|
||
headers: { "Content-Type": "multipart/form-data" }
|
||
});
|
||
}
|
||
};
|
||
const _hoisted_1 = { class: "app-container" };
|
||
const _hoisted_2 = { class: "card-header" };
|
||
const _hoisted_3 = { class: "data-table__toolbar" };
|
||
const _hoisted_4 = { class: "data-table__toolbar--left" };
|
||
const _hoisted_5 = { class: "data-table__toolbar--right" };
|
||
const _hoisted_6 = { style: { "max-height": "300px", "overflow-y": "auto", "white-space": "pre-wrap" } };
|
||
const _hoisted_7 = { class: "dialog-footer" };
|
||
const _sfc_main = /* @__PURE__ */ defineComponent({
|
||
...{
|
||
name: "YifanPrivacyPolicy",
|
||
inheritAttrs: false
|
||
},
|
||
__name: "index",
|
||
setup(__props) {
|
||
const policyTypeMap = {
|
||
privacy: { label: "隐私政策", type: "primary" },
|
||
terms: { label: "用户协议", type: "success" },
|
||
service: { label: "服务条款", type: "warning" }
|
||
};
|
||
function getPolicyTypeLabel(type) {
|
||
var _a;
|
||
return ((_a = policyTypeMap[type]) == null ? void 0 : _a.label) || type;
|
||
}
|
||
function getPolicyTypeType(type) {
|
||
var _a;
|
||
return ((_a = policyTypeMap[type]) == null ? void 0 : _a.type) || "info";
|
||
}
|
||
const dataFormRef = ref();
|
||
const total = ref(0);
|
||
const selectIds = ref([]);
|
||
const selectionRows = ref([]);
|
||
const loading = ref(false);
|
||
const dictStore = useDictStore();
|
||
const dictTypes = [];
|
||
const pageTableData = ref([]);
|
||
const tableColumns = ref([
|
||
{ prop: "selection", label: "选择框", show: true },
|
||
{ prop: "index", label: "序号", show: true },
|
||
{ prop: "policy_type", label: "协议类型", show: true },
|
||
{ prop: "title", label: "标题", show: true },
|
||
{ prop: "version", label: "版本号", show: true },
|
||
{ prop: "is_current", label: "当前版本", show: true },
|
||
{ prop: "status", label: "状态", show: true },
|
||
{ prop: "effective_time", label: "生效时间", show: true },
|
||
{ prop: "created_time", label: "创建时间", show: false },
|
||
{ prop: "updated_time", label: "更新时间", show: false },
|
||
{ prop: "created_id", label: "创建人", show: false },
|
||
{ prop: "updated_id", label: "更新人", show: false },
|
||
{ prop: "content", label: "内容", show: false },
|
||
{ prop: "remark", label: "备注", show: false },
|
||
{ prop: "operation", label: "操作", show: true }
|
||
]);
|
||
const exportColumns = [
|
||
{ prop: "created_time", label: "创建时间" },
|
||
{ prop: "updated_time", label: "更新时间" },
|
||
{ prop: "created_id", label: "创建人ID" },
|
||
{ prop: "updated_id", label: "更新人ID" },
|
||
{ prop: "is_deleted", label: "是否删除(0否 1是)" },
|
||
{ prop: "status", label: "状态(0禁用 1启用)" },
|
||
{ prop: "title", label: "标题" },
|
||
{ prop: "content", label: "内容(支持富文本)" },
|
||
{ prop: "version", label: "版本号" },
|
||
{ prop: "policy_type", label: "协议类型(privacy:隐私政策 terms:用户协议 service:服务条款)" },
|
||
{ prop: "effective_time", label: "生效时间" },
|
||
{ prop: "is_current", label: "是否当前版本(0否 1是)" },
|
||
{ prop: "remark", label: "备注" }
|
||
];
|
||
const curdContentConfig = {
|
||
permPrefix: "module_yifan:yifan_privacy_policy",
|
||
cols: exportColumns,
|
||
importTemplate: () => YifanPrivacyPolicyAPI.downloadTemplateYifanPrivacyPolicy(),
|
||
exportsAction: async (params) => {
|
||
var _a, _b, _c, _d;
|
||
const query = { ...params };
|
||
query.status = "0";
|
||
query.page_no = 1;
|
||
query.page_size = 9999;
|
||
const all = [];
|
||
while (true) {
|
||
const res = await YifanPrivacyPolicyAPI.listYifanPrivacyPolicy(query);
|
||
const items = ((_b = (_a = res.data) == null ? void 0 : _a.data) == null ? void 0 : _b.items) || [];
|
||
const total2 = ((_d = (_c = res.data) == null ? void 0 : _c.data) == null ? void 0 : _d.total) || 0;
|
||
all.push(...items);
|
||
if (all.length >= total2 || items.length === 0) break;
|
||
query.page_no += 1;
|
||
}
|
||
return all;
|
||
}
|
||
};
|
||
const detailFormData = ref({});
|
||
const queryFormData = reactive({
|
||
page_no: 1,
|
||
page_size: 10,
|
||
created_time: void 0,
|
||
updated_time: void 0,
|
||
created_id: void 0,
|
||
updated_id: void 0,
|
||
is_deleted: void 0,
|
||
status: void 0,
|
||
title: void 0,
|
||
content: void 0,
|
||
version: void 0,
|
||
policy_type: void 0,
|
||
effective_time: void 0,
|
||
is_current: void 0,
|
||
remark: void 0
|
||
});
|
||
const formData = reactive({
|
||
id: void 0,
|
||
is_deleted: void 0,
|
||
status: void 0,
|
||
title: void 0,
|
||
content: void 0,
|
||
version: void 0,
|
||
policy_type: void 0,
|
||
effective_time: void 0,
|
||
is_current: void 0,
|
||
remark: void 0
|
||
});
|
||
const dialogVisible = reactive({
|
||
title: "",
|
||
visible: false,
|
||
type: "create"
|
||
});
|
||
const rules = reactive({
|
||
id: [
|
||
{ required: false, message: "请输入主键ID", trigger: "blur" }
|
||
],
|
||
created_time: [
|
||
{ required: true, message: "请输入创建时间", trigger: "blur" }
|
||
],
|
||
updated_time: [
|
||
{ required: true, message: "请输入更新时间", trigger: "blur" }
|
||
],
|
||
created_id: [
|
||
{ required: false, message: "请输入创建人ID", trigger: "blur" }
|
||
],
|
||
updated_id: [
|
||
{ required: false, message: "请输入更新人ID", trigger: "blur" }
|
||
],
|
||
is_deleted: [
|
||
{ required: true, message: "请输入是否删除(0否 1是)", trigger: "blur" }
|
||
],
|
||
status: [
|
||
{ required: true, message: "请输入状态(0禁用 1启用)", trigger: "blur" }
|
||
],
|
||
title: [
|
||
{ required: true, message: "请输入标题", trigger: "blur" }
|
||
],
|
||
content: [
|
||
{ required: true, message: "请输入内容(支持富文本)", trigger: "blur" }
|
||
],
|
||
version: [
|
||
{ required: true, message: "请输入版本号", trigger: "blur" }
|
||
],
|
||
policy_type: [
|
||
{ required: true, message: "请输入协议类型(privacy:隐私政策 terms:用户协议 service:服务条款)", trigger: "blur" }
|
||
],
|
||
effective_time: [
|
||
{ required: false, message: "请输入生效时间", trigger: "blur" }
|
||
],
|
||
is_current: [
|
||
{ required: true, message: "请输入是否当前版本(0否 1是)", trigger: "blur" }
|
||
],
|
||
remark: [
|
||
{ required: false, message: "请输入备注", trigger: "blur" }
|
||
]
|
||
});
|
||
const importDialogVisible = ref(false);
|
||
const exportsDialogVisible = ref(false);
|
||
function handleOpenImportDialog() {
|
||
importDialogVisible.value = true;
|
||
}
|
||
function handleOpenExportsModal() {
|
||
exportsDialogVisible.value = true;
|
||
}
|
||
async function handleRefresh() {
|
||
await loadingData();
|
||
}
|
||
async function loadingData() {
|
||
loading.value = true;
|
||
try {
|
||
const response = await YifanPrivacyPolicyAPI.listYifanPrivacyPolicy(queryFormData);
|
||
pageTableData.value = response.data.data.items;
|
||
total.value = response.data.data.total;
|
||
} catch (error) {
|
||
console.error(error);
|
||
} finally {
|
||
loading.value = false;
|
||
}
|
||
}
|
||
async function handleQuery() {
|
||
queryFormData.page_no = 1;
|
||
loadingData();
|
||
}
|
||
async function handleResetQuery() {
|
||
queryFormData.page_no = 1;
|
||
loadingData();
|
||
}
|
||
const initialFormData = {
|
||
id: void 0,
|
||
is_deleted: void 0,
|
||
status: void 0,
|
||
title: void 0,
|
||
content: void 0,
|
||
version: void 0,
|
||
policy_type: void 0,
|
||
effective_time: void 0,
|
||
is_current: void 0,
|
||
remark: void 0
|
||
};
|
||
async function resetForm() {
|
||
if (dataFormRef.value) {
|
||
dataFormRef.value.resetFields();
|
||
dataFormRef.value.clearValidate();
|
||
}
|
||
Object.assign(formData, initialFormData);
|
||
}
|
||
async function handleSelectionChange(selection) {
|
||
selectIds.value = selection.map((item) => item.id);
|
||
selectionRows.value = selection;
|
||
}
|
||
async function handleCloseDialog() {
|
||
dialogVisible.visible = false;
|
||
resetForm();
|
||
}
|
||
async function handleOpenDialog(type, id) {
|
||
dialogVisible.type = type;
|
||
if (id) {
|
||
const response = await YifanPrivacyPolicyAPI.detailYifanPrivacyPolicy(id);
|
||
if (type === "detail") {
|
||
dialogVisible.title = "详情";
|
||
Object.assign(detailFormData.value, response.data.data);
|
||
} else if (type === "update") {
|
||
dialogVisible.title = "修改";
|
||
Object.assign(formData, response.data.data);
|
||
}
|
||
} else {
|
||
dialogVisible.title = "新增隐私政策";
|
||
formData.status = "0";
|
||
formData.is_current = "0";
|
||
}
|
||
dialogVisible.visible = true;
|
||
}
|
||
async function handleSubmit() {
|
||
dataFormRef.value.validate(async (valid) => {
|
||
if (valid) {
|
||
loading.value = true;
|
||
const id = formData.id;
|
||
if (id) {
|
||
try {
|
||
await YifanPrivacyPolicyAPI.updateYifanPrivacyPolicy(id, { id, ...formData });
|
||
dialogVisible.visible = false;
|
||
resetForm();
|
||
handleCloseDialog();
|
||
handleResetQuery();
|
||
} catch (error) {
|
||
console.error(error);
|
||
} finally {
|
||
loading.value = false;
|
||
}
|
||
} else {
|
||
try {
|
||
await YifanPrivacyPolicyAPI.createYifanPrivacyPolicy(formData);
|
||
dialogVisible.visible = false;
|
||
resetForm();
|
||
handleCloseDialog();
|
||
handleResetQuery();
|
||
} catch (error) {
|
||
console.error(error);
|
||
} finally {
|
||
loading.value = false;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
async function handleDelete(ids) {
|
||
ElMessageBox.confirm("确认删除该项数据?", "警告", {
|
||
confirmButtonText: "确定",
|
||
cancelButtonText: "取消",
|
||
type: "warning"
|
||
}).then(async () => {
|
||
try {
|
||
loading.value = true;
|
||
await YifanPrivacyPolicyAPI.deleteYifanPrivacyPolicy(ids);
|
||
handleResetQuery();
|
||
} catch (error) {
|
||
console.error(error);
|
||
} finally {
|
||
loading.value = false;
|
||
}
|
||
}).catch(() => {
|
||
ElMessageBox.close();
|
||
});
|
||
}
|
||
async function handleMoreClick(status) {
|
||
if (selectIds.value.length) {
|
||
ElMessageBox.confirm(`确认${status === "0" ? "启用" : "停用"}该项数据?`, "警告", {
|
||
confirmButtonText: "确定",
|
||
cancelButtonText: "取消",
|
||
type: "warning"
|
||
}).then(async () => {
|
||
try {
|
||
loading.value = true;
|
||
await YifanPrivacyPolicyAPI.batchYifanPrivacyPolicy({ ids: selectIds.value, status });
|
||
handleResetQuery();
|
||
} catch (error) {
|
||
console.error(error);
|
||
} finally {
|
||
loading.value = false;
|
||
}
|
||
}).catch(() => {
|
||
ElMessageBox.close();
|
||
});
|
||
}
|
||
}
|
||
const handleUpload = async (formData2) => {
|
||
try {
|
||
const response = await YifanPrivacyPolicyAPI.importYifanPrivacyPolicy(formData2);
|
||
if (response.data.code === ResultEnum.SUCCESS) {
|
||
ElMessage.success(`${response.data.msg},${response.data.data}`);
|
||
importDialogVisible.value = false;
|
||
await handleQuery();
|
||
}
|
||
} catch (error) {
|
||
console.error(error);
|
||
}
|
||
};
|
||
onMounted(async () => {
|
||
if (dictTypes.length > 0) {
|
||
await dictStore.getDict(dictTypes);
|
||
}
|
||
loadingData();
|
||
});
|
||
return (_ctx, _cache) => {
|
||
const _component_el_tooltip = ElTooltip;
|
||
const _component_el_button = ElButton;
|
||
const _component_el_col = ElCol;
|
||
const _component_el_dropdown_item = ElDropdownItem;
|
||
const _component_el_dropdown_menu = ElDropdownMenu;
|
||
const _component_el_dropdown = ElDropdown;
|
||
const _component_el_row = ElRow;
|
||
const _component_el_checkbox = ElCheckbox;
|
||
const _component_el_scrollbar = ElScrollbar;
|
||
const _component_el_popover = ElPopover;
|
||
const _component_el_empty = ElEmpty;
|
||
const _component_el_table_column = ElTableColumn;
|
||
const _component_el_tag = ElTag;
|
||
const _component_el_table = ElTable;
|
||
const _component_pagination = __unplugin_components_19;
|
||
const _component_el_card = ElCard;
|
||
const _component_el_descriptions_item = ElDescriptionsItem;
|
||
const _component_el_descriptions = ElDescriptions;
|
||
const _component_el_radio = ElRadio;
|
||
const _component_el_radio_group = ElRadioGroup;
|
||
const _component_el_form_item = ElFormItem;
|
||
const _component_el_input = ElInput;
|
||
const _component_el_option = ElOption;
|
||
const _component_el_select = ElSelect;
|
||
const _component_el_date_picker = ElDatePicker;
|
||
const _component_el_form = ElForm;
|
||
const _component_el_dialog = ElDialog;
|
||
const _directive_hasPerm = resolveDirective("hasPerm");
|
||
const _directive_loading = vLoading;
|
||
return openBlock(), createElementBlock("div", _hoisted_1, [
|
||
createVNode(_component_el_card, { class: "data-table" }, {
|
||
header: withCtx(() => [
|
||
createBaseVNode("div", _hoisted_2, [
|
||
createBaseVNode("span", null, [
|
||
_cache[19] || (_cache[19] = createTextVNode(" 隐私政策管理 ", -1)),
|
||
createVNode(_component_el_tooltip, { content: "管理应用的隐私政策、用户协议和服务条款" }, {
|
||
default: withCtx(() => [
|
||
createVNode(unref(question_filled_default), { class: "w-4 h-4 mx-1" })
|
||
]),
|
||
_: 1
|
||
})
|
||
])
|
||
])
|
||
]),
|
||
footer: withCtx(() => [
|
||
createVNode(_component_pagination, {
|
||
total: total.value,
|
||
"onUpdate:total": _cache[4] || (_cache[4] = ($event) => total.value = $event),
|
||
page: queryFormData.page_no,
|
||
"onUpdate:page": _cache[5] || (_cache[5] = ($event) => queryFormData.page_no = $event),
|
||
limit: queryFormData.page_size,
|
||
"onUpdate:limit": _cache[6] || (_cache[6] = ($event) => queryFormData.page_size = $event),
|
||
onPagination: loadingData
|
||
}, null, 8, ["total", "page", "limit"])
|
||
]),
|
||
default: withCtx(() => [
|
||
createBaseVNode("div", _hoisted_3, [
|
||
createBaseVNode("div", _hoisted_4, [
|
||
createVNode(_component_el_row, { gutter: 10 }, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_col, { span: 1.5 }, {
|
||
default: withCtx(() => [
|
||
withDirectives((openBlock(), createBlock(_component_el_button, {
|
||
type: "success",
|
||
icon: "plus",
|
||
onClick: _cache[0] || (_cache[0] = ($event) => handleOpenDialog("create"))
|
||
}, {
|
||
default: withCtx(() => [..._cache[20] || (_cache[20] = [
|
||
createTextVNode(" 新增 ", -1)
|
||
])]),
|
||
_: 1
|
||
})), [
|
||
[_directive_hasPerm, ["module_yifan:yifan_privacy_policy:create"]]
|
||
])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_col, { span: 1.5 }, {
|
||
default: withCtx(() => [
|
||
withDirectives((openBlock(), createBlock(_component_el_button, {
|
||
type: "danger",
|
||
icon: "delete",
|
||
disabled: selectIds.value.length === 0,
|
||
onClick: _cache[1] || (_cache[1] = ($event) => handleDelete(selectIds.value))
|
||
}, {
|
||
default: withCtx(() => [..._cache[21] || (_cache[21] = [
|
||
createTextVNode(" 批量删除 ", -1)
|
||
])]),
|
||
_: 1
|
||
}, 8, ["disabled"])), [
|
||
[_directive_hasPerm, ["module_yifan:yifan_privacy_policy:delete"]]
|
||
])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_col, { span: 1.5 }, {
|
||
default: withCtx(() => [
|
||
withDirectives((openBlock(), createBlock(_component_el_dropdown, { trigger: "click" }, {
|
||
dropdown: withCtx(() => [
|
||
createVNode(_component_el_dropdown_menu, null, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_dropdown_item, {
|
||
icon: unref(check_default),
|
||
onClick: _cache[2] || (_cache[2] = ($event) => handleMoreClick("0"))
|
||
}, {
|
||
default: withCtx(() => [..._cache[23] || (_cache[23] = [
|
||
createTextVNode(" 批量启用 ", -1)
|
||
])]),
|
||
_: 1
|
||
}, 8, ["icon"]),
|
||
createVNode(_component_el_dropdown_item, {
|
||
icon: unref(circle_close_default),
|
||
onClick: _cache[3] || (_cache[3] = ($event) => handleMoreClick("1"))
|
||
}, {
|
||
default: withCtx(() => [..._cache[24] || (_cache[24] = [
|
||
createTextVNode(" 批量停用 ", -1)
|
||
])]),
|
||
_: 1
|
||
}, 8, ["icon"])
|
||
]),
|
||
_: 1
|
||
})
|
||
]),
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_button, {
|
||
type: "default",
|
||
disabled: selectIds.value.length === 0,
|
||
icon: "ArrowDown"
|
||
}, {
|
||
default: withCtx(() => [..._cache[22] || (_cache[22] = [
|
||
createTextVNode(" 更多 ", -1)
|
||
])]),
|
||
_: 1
|
||
}, 8, ["disabled"])
|
||
]),
|
||
_: 1
|
||
})), [
|
||
[_directive_hasPerm, ["module_yifan:yifan_privacy_policy:batch"]]
|
||
])
|
||
]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
})
|
||
]),
|
||
createBaseVNode("div", _hoisted_5, [
|
||
createVNode(_component_el_row, { gutter: 10 }, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_col, { span: 1.5 }, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_tooltip, { content: "导入" }, {
|
||
default: withCtx(() => [
|
||
withDirectives(createVNode(_component_el_button, {
|
||
type: "success",
|
||
icon: "upload",
|
||
circle: "",
|
||
onClick: handleOpenImportDialog
|
||
}, null, 512), [
|
||
[_directive_hasPerm, ["module_yifan:yifan_privacy_policy:import"]]
|
||
])
|
||
]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_col, { span: 1.5 }, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_tooltip, { content: "导出" }, {
|
||
default: withCtx(() => [
|
||
withDirectives(createVNode(_component_el_button, {
|
||
type: "warning",
|
||
icon: "download",
|
||
circle: "",
|
||
onClick: handleOpenExportsModal
|
||
}, null, 512), [
|
||
[_directive_hasPerm, ["module_yifan:yifan_privacy_policy:export"]]
|
||
])
|
||
]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_col, { span: 1.5 }, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_tooltip, { content: "刷新" }, {
|
||
default: withCtx(() => [
|
||
withDirectives(createVNode(_component_el_button, {
|
||
type: "primary",
|
||
icon: "refresh",
|
||
circle: "",
|
||
onClick: handleRefresh
|
||
}, null, 512), [
|
||
[_directive_hasPerm, ["module_yifan:yifan_privacy_policy:query"]]
|
||
])
|
||
]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_col, { span: 1.5 }, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_popover, {
|
||
placement: "bottom",
|
||
trigger: "click"
|
||
}, {
|
||
reference: withCtx(() => [
|
||
createVNode(_component_el_button, {
|
||
type: "danger",
|
||
icon: "operation",
|
||
circle: ""
|
||
})
|
||
]),
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_scrollbar, { "max-height": "350px" }, {
|
||
default: withCtx(() => [
|
||
(openBlock(true), createElementBlock(Fragment, null, renderList(tableColumns.value, (column) => {
|
||
return openBlock(), createElementBlock(Fragment, {
|
||
key: column.prop
|
||
}, [
|
||
column.prop ? (openBlock(), createBlock(_component_el_checkbox, {
|
||
key: 0,
|
||
modelValue: column.show,
|
||
"onUpdate:modelValue": ($event) => column.show = $event,
|
||
label: column.label
|
||
}, null, 8, ["modelValue", "onUpdate:modelValue", "label"])) : createCommentVNode("", true)
|
||
], 64);
|
||
}), 128))
|
||
]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
})
|
||
])
|
||
]),
|
||
withDirectives((openBlock(), createBlock(_component_el_table, {
|
||
ref: "tableRef",
|
||
data: pageTableData.value,
|
||
"highlight-current-row": "",
|
||
class: "data-table__content",
|
||
height: 450,
|
||
border: "",
|
||
stripe: "",
|
||
onSelectionChange: handleSelectionChange
|
||
}, {
|
||
empty: withCtx(() => [
|
||
createVNode(_component_el_empty, {
|
||
"image-size": 80,
|
||
description: "暂无数据"
|
||
})
|
||
]),
|
||
default: withCtx(() => {
|
||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
||
return [
|
||
((_a = tableColumns.value.find((col) => col.prop === "selection")) == null ? void 0 : _a.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 0,
|
||
type: "selection",
|
||
"min-width": "55",
|
||
align: "center"
|
||
})) : createCommentVNode("", true),
|
||
((_b = tableColumns.value.find((col) => col.prop === "index")) == null ? void 0 : _b.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 1,
|
||
fixed: "",
|
||
label: "序号",
|
||
"min-width": "60"
|
||
}, {
|
||
default: withCtx((scope) => [
|
||
createTextVNode(toDisplayString((queryFormData.page_no - 1) * queryFormData.page_size + scope.$index + 1), 1)
|
||
]),
|
||
_: 1
|
||
})) : createCommentVNode("", true),
|
||
((_c = tableColumns.value.find((col) => col.prop === "created_time")) == null ? void 0 : _c.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 2,
|
||
label: "创建时间",
|
||
prop: "created_time",
|
||
"min-width": "140"
|
||
})) : createCommentVNode("", true),
|
||
((_d = tableColumns.value.find((col) => col.prop === "updated_time")) == null ? void 0 : _d.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 3,
|
||
label: "更新时间",
|
||
prop: "updated_time",
|
||
"min-width": "140"
|
||
})) : createCommentVNode("", true),
|
||
((_e = tableColumns.value.find((col) => col.prop === "created_id")) == null ? void 0 : _e.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 4,
|
||
label: "创建人ID",
|
||
prop: "created_id",
|
||
"min-width": "140"
|
||
}, {
|
||
default: withCtx((scope) => [
|
||
createVNode(_component_el_tag, null, {
|
||
default: withCtx(() => {
|
||
var _a2;
|
||
return [
|
||
createTextVNode(toDisplayString((_a2 = scope.row.created_by) == null ? void 0 : _a2.name), 1)
|
||
];
|
||
}),
|
||
_: 2
|
||
}, 1024)
|
||
]),
|
||
_: 1
|
||
})) : createCommentVNode("", true),
|
||
((_f = tableColumns.value.find((col) => col.prop === "updated_id")) == null ? void 0 : _f.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 5,
|
||
label: "更新人ID",
|
||
prop: "updated_id",
|
||
"min-width": "140"
|
||
}, {
|
||
default: withCtx((scope) => [
|
||
createVNode(_component_el_tag, null, {
|
||
default: withCtx(() => {
|
||
var _a2;
|
||
return [
|
||
createTextVNode(toDisplayString((_a2 = scope.row.updated_by) == null ? void 0 : _a2.name), 1)
|
||
];
|
||
}),
|
||
_: 2
|
||
}, 1024)
|
||
]),
|
||
_: 1
|
||
})) : createCommentVNode("", true),
|
||
((_g = tableColumns.value.find((col) => col.prop === "policy_type")) == null ? void 0 : _g.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 6,
|
||
label: "协议类型",
|
||
prop: "policy_type",
|
||
"min-width": "120"
|
||
}, {
|
||
default: withCtx((scope) => [
|
||
createVNode(_component_el_tag, {
|
||
type: getPolicyTypeType(scope.row.policy_type)
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(getPolicyTypeLabel(scope.row.policy_type)), 1)
|
||
]),
|
||
_: 2
|
||
}, 1032, ["type"])
|
||
]),
|
||
_: 1
|
||
})) : createCommentVNode("", true),
|
||
((_h = tableColumns.value.find((col) => col.prop === "title")) == null ? void 0 : _h.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 7,
|
||
label: "标题",
|
||
prop: "title",
|
||
"min-width": "200",
|
||
"show-overflow-tooltip": ""
|
||
})) : createCommentVNode("", true),
|
||
((_i = tableColumns.value.find((col) => col.prop === "version")) == null ? void 0 : _i.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 8,
|
||
label: "版本号",
|
||
prop: "version",
|
||
"min-width": "100"
|
||
})) : createCommentVNode("", true),
|
||
((_j = tableColumns.value.find((col) => col.prop === "is_current")) == null ? void 0 : _j.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 9,
|
||
label: "当前版本",
|
||
prop: "is_current",
|
||
"min-width": "100"
|
||
}, {
|
||
default: withCtx((scope) => [
|
||
createVNode(_component_el_tag, {
|
||
type: scope.row.is_current == "1" ? "success" : "info"
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(scope.row.is_current == "1" ? "是" : "否"), 1)
|
||
]),
|
||
_: 2
|
||
}, 1032, ["type"])
|
||
]),
|
||
_: 1
|
||
})) : createCommentVNode("", true),
|
||
((_k = tableColumns.value.find((col) => col.prop === "status")) == null ? void 0 : _k.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 10,
|
||
label: "状态",
|
||
prop: "status",
|
||
"min-width": "100"
|
||
}, {
|
||
default: withCtx((scope) => [
|
||
createVNode(_component_el_tag, {
|
||
type: scope.row.status == "0" ? "success" : "info"
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(scope.row.status == "0" ? "启用" : "停用"), 1)
|
||
]),
|
||
_: 2
|
||
}, 1032, ["type"])
|
||
]),
|
||
_: 1
|
||
})) : createCommentVNode("", true),
|
||
((_l = tableColumns.value.find((col) => col.prop === "effective_time")) == null ? void 0 : _l.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 11,
|
||
label: "生效时间",
|
||
prop: "effective_time",
|
||
"min-width": "160"
|
||
})) : createCommentVNode("", true),
|
||
((_m = tableColumns.value.find((col) => col.prop === "remark")) == null ? void 0 : _m.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 12,
|
||
label: "备注",
|
||
prop: "remark",
|
||
"min-width": "140"
|
||
})) : createCommentVNode("", true),
|
||
((_n = tableColumns.value.find((col) => col.prop === "content")) == null ? void 0 : _n.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 13,
|
||
label: "内容",
|
||
prop: "content",
|
||
"min-width": "200",
|
||
"show-overflow-tooltip": ""
|
||
})) : createCommentVNode("", true),
|
||
((_o = tableColumns.value.find((col) => col.prop === "operation")) == null ? void 0 : _o.show) ? (openBlock(), createBlock(_component_el_table_column, {
|
||
key: 14,
|
||
fixed: "right",
|
||
label: "操作",
|
||
align: "center",
|
||
"min-width": "180"
|
||
}, {
|
||
default: withCtx((scope) => [
|
||
withDirectives((openBlock(), createBlock(_component_el_button, {
|
||
type: "info",
|
||
size: "small",
|
||
link: "",
|
||
icon: "document",
|
||
onClick: ($event) => handleOpenDialog("detail", scope.row.id)
|
||
}, {
|
||
default: withCtx(() => [..._cache[25] || (_cache[25] = [
|
||
createTextVNode(" 详情 ", -1)
|
||
])]),
|
||
_: 1
|
||
}, 8, ["onClick"])), [
|
||
[_directive_hasPerm, ["module_yifan:yifan_privacy_policy:detail"]]
|
||
]),
|
||
withDirectives((openBlock(), createBlock(_component_el_button, {
|
||
type: "primary",
|
||
size: "small",
|
||
link: "",
|
||
icon: "edit",
|
||
onClick: ($event) => handleOpenDialog("update", scope.row.id)
|
||
}, {
|
||
default: withCtx(() => [..._cache[26] || (_cache[26] = [
|
||
createTextVNode(" 编辑 ", -1)
|
||
])]),
|
||
_: 1
|
||
}, 8, ["onClick"])), [
|
||
[_directive_hasPerm, ["module_yifan:yifan_privacy_policy:update"]]
|
||
]),
|
||
withDirectives((openBlock(), createBlock(_component_el_button, {
|
||
type: "danger",
|
||
size: "small",
|
||
link: "",
|
||
icon: "delete",
|
||
onClick: ($event) => handleDelete([scope.row.id])
|
||
}, {
|
||
default: withCtx(() => [..._cache[27] || (_cache[27] = [
|
||
createTextVNode(" 删除 ", -1)
|
||
])]),
|
||
_: 1
|
||
}, 8, ["onClick"])), [
|
||
[_directive_hasPerm, ["module_yifan:yifan_privacy_policy:delete"]]
|
||
])
|
||
]),
|
||
_: 1
|
||
})) : createCommentVNode("", true)
|
||
];
|
||
}),
|
||
_: 1
|
||
}, 8, ["data"])), [
|
||
[_directive_loading, loading.value]
|
||
])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_dialog, {
|
||
modelValue: dialogVisible.visible,
|
||
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => dialogVisible.visible = $event),
|
||
title: dialogVisible.title,
|
||
onClose: handleCloseDialog
|
||
}, {
|
||
footer: withCtx(() => [
|
||
createBaseVNode("div", _hoisted_7, [
|
||
createVNode(_component_el_button, { onClick: handleCloseDialog }, {
|
||
default: withCtx(() => [..._cache[34] || (_cache[34] = [
|
||
createTextVNode("取消", -1)
|
||
])]),
|
||
_: 1
|
||
}),
|
||
dialogVisible.type !== "detail" ? (openBlock(), createBlock(_component_el_button, {
|
||
key: 0,
|
||
type: "primary",
|
||
onClick: handleSubmit
|
||
}, {
|
||
default: withCtx(() => [..._cache[35] || (_cache[35] = [
|
||
createTextVNode(" 确定 ", -1)
|
||
])]),
|
||
_: 1
|
||
})) : (openBlock(), createBlock(_component_el_button, {
|
||
key: 1,
|
||
type: "primary",
|
||
onClick: handleCloseDialog
|
||
}, {
|
||
default: withCtx(() => [..._cache[36] || (_cache[36] = [
|
||
createTextVNode("确定", -1)
|
||
])]),
|
||
_: 1
|
||
}))
|
||
])
|
||
]),
|
||
default: withCtx(() => [
|
||
dialogVisible.type === "detail" ? (openBlock(), createBlock(_component_el_descriptions, {
|
||
key: 0,
|
||
column: 4,
|
||
border: ""
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "主键ID",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(detailFormData.value.id), 1)
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "创建时间",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(detailFormData.value.created_time), 1)
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "更新时间",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(detailFormData.value.updated_time), 1)
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "创建人",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => {
|
||
var _a;
|
||
return [
|
||
createTextVNode(toDisplayString((_a = detailFormData.value.created_by) == null ? void 0 : _a.name), 1)
|
||
];
|
||
}),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "更新人",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => {
|
||
var _a;
|
||
return [
|
||
createTextVNode(toDisplayString((_a = detailFormData.value.updated_by) == null ? void 0 : _a.name), 1)
|
||
];
|
||
}),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "是否删除(0否 1是)",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(detailFormData.value.is_deleted), 1)
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "状态",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_tag, {
|
||
type: detailFormData.value.status == "0" ? "success" : "danger"
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(detailFormData.value.status == "0" ? "启用" : "停用"), 1)
|
||
]),
|
||
_: 1
|
||
}, 8, ["type"])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "标题",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(detailFormData.value.title), 1)
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "内容",
|
||
span: 4
|
||
}, {
|
||
default: withCtx(() => [
|
||
createBaseVNode("div", _hoisted_6, toDisplayString(detailFormData.value.content), 1)
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "版本号",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(detailFormData.value.version), 1)
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "协议类型",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_tag, {
|
||
type: getPolicyTypeType(detailFormData.value.policy_type)
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(getPolicyTypeLabel(detailFormData.value.policy_type)), 1)
|
||
]),
|
||
_: 1
|
||
}, 8, ["type"])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "生效时间",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(detailFormData.value.effective_time), 1)
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "是否当前版本",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_tag, {
|
||
type: detailFormData.value.is_current == "1" ? "success" : "info"
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(detailFormData.value.is_current == "1" ? "是" : "否"), 1)
|
||
]),
|
||
_: 1
|
||
}, 8, ["type"])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_descriptions_item, {
|
||
label: "备注",
|
||
span: 2
|
||
}, {
|
||
default: withCtx(() => [
|
||
createTextVNode(toDisplayString(detailFormData.value.remark), 1)
|
||
]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
})) : (openBlock(), createBlock(_component_el_form, {
|
||
key: 1,
|
||
ref_key: "dataFormRef",
|
||
ref: dataFormRef,
|
||
model: formData,
|
||
rules,
|
||
"label-suffix": ":",
|
||
"label-width": "auto",
|
||
"label-position": "right"
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_form_item, {
|
||
label: "是否删除",
|
||
prop: "is_deleted",
|
||
required: false
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_radio_group, {
|
||
modelValue: formData.is_deleted,
|
||
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => formData.is_deleted = $event)
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_radio, { value: "0" }, {
|
||
default: withCtx(() => [..._cache[28] || (_cache[28] = [
|
||
createTextVNode("否", -1)
|
||
])]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_radio, { value: "1" }, {
|
||
default: withCtx(() => [..._cache[29] || (_cache[29] = [
|
||
createTextVNode("是", -1)
|
||
])]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
}, 8, ["modelValue"])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_form_item, {
|
||
label: "状态",
|
||
prop: "status",
|
||
required: true
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_radio_group, {
|
||
modelValue: formData.status,
|
||
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => formData.status = $event)
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_radio, { value: "0" }, {
|
||
default: withCtx(() => [..._cache[30] || (_cache[30] = [
|
||
createTextVNode("启用", -1)
|
||
])]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_radio, { value: "1" }, {
|
||
default: withCtx(() => [..._cache[31] || (_cache[31] = [
|
||
createTextVNode("停用", -1)
|
||
])]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
}, 8, ["modelValue"])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_form_item, {
|
||
label: "标题",
|
||
prop: "title",
|
||
required: true
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_input, {
|
||
modelValue: formData.title,
|
||
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => formData.title = $event),
|
||
placeholder: "请输入标题",
|
||
maxlength: "200",
|
||
"show-word-limit": ""
|
||
}, null, 8, ["modelValue"])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_form_item, {
|
||
label: "协议类型",
|
||
prop: "policy_type",
|
||
required: true
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_select, {
|
||
modelValue: formData.policy_type,
|
||
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => formData.policy_type = $event),
|
||
placeholder: "请选择协议类型",
|
||
style: { "width": "100%" }
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_option, {
|
||
value: "privacy",
|
||
label: "隐私政策"
|
||
}),
|
||
createVNode(_component_el_option, {
|
||
value: "terms",
|
||
label: "用户协议"
|
||
}),
|
||
createVNode(_component_el_option, {
|
||
value: "service",
|
||
label: "服务条款"
|
||
})
|
||
]),
|
||
_: 1
|
||
}, 8, ["modelValue"])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_form_item, {
|
||
label: "版本号",
|
||
prop: "version",
|
||
required: true
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_input, {
|
||
modelValue: formData.version,
|
||
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => formData.version = $event),
|
||
placeholder: "例如: 1.0.0"
|
||
}, null, 8, ["modelValue"])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_form_item, {
|
||
label: "内容",
|
||
prop: "content",
|
||
required: true
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_input, {
|
||
modelValue: formData.content,
|
||
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => formData.content = $event),
|
||
type: "textarea",
|
||
rows: 10,
|
||
placeholder: "请输入协议内容,支持富文本"
|
||
}, null, 8, ["modelValue"])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_form_item, {
|
||
label: "生效时间",
|
||
prop: "effective_time",
|
||
required: false
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_date_picker, {
|
||
modelValue: formData.effective_time,
|
||
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => formData.effective_time = $event),
|
||
type: "datetime",
|
||
placeholder: "选择生效时间",
|
||
style: { "width": "100%" },
|
||
format: "YYYY-MM-DD HH:mm:ss",
|
||
"value-format": "YYYY-MM-DD HH:mm:ss"
|
||
}, null, 8, ["modelValue"])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_form_item, {
|
||
label: "是否当前版本",
|
||
prop: "is_current",
|
||
required: true
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_radio_group, {
|
||
modelValue: formData.is_current,
|
||
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => formData.is_current = $event)
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_radio, { value: "1" }, {
|
||
default: withCtx(() => [..._cache[32] || (_cache[32] = [
|
||
createTextVNode("是", -1)
|
||
])]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_radio, { value: "0" }, {
|
||
default: withCtx(() => [..._cache[33] || (_cache[33] = [
|
||
createTextVNode("否", -1)
|
||
])]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
}, 8, ["modelValue"])
|
||
]),
|
||
_: 1
|
||
}),
|
||
createVNode(_component_el_form_item, {
|
||
label: "备注",
|
||
prop: "remark",
|
||
required: false
|
||
}, {
|
||
default: withCtx(() => [
|
||
createVNode(_component_el_input, {
|
||
modelValue: formData.remark,
|
||
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => formData.remark = $event),
|
||
placeholder: "请输入备注"
|
||
}, null, 8, ["modelValue"])
|
||
]),
|
||
_: 1
|
||
})
|
||
]),
|
||
_: 1
|
||
}, 8, ["model", "rules"]))
|
||
]),
|
||
_: 1
|
||
}, 8, ["modelValue", "title"]),
|
||
createVNode(_sfc_main$1, {
|
||
modelValue: importDialogVisible.value,
|
||
"onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => importDialogVisible.value = $event),
|
||
"content-config": curdContentConfig,
|
||
onUpload: handleUpload
|
||
}, null, 8, ["modelValue"]),
|
||
createVNode(_sfc_main$2, {
|
||
modelValue: exportsDialogVisible.value,
|
||
"onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => exportsDialogVisible.value = $event),
|
||
"content-config": curdContentConfig,
|
||
"query-params": queryFormData,
|
||
"page-data": pageTableData.value,
|
||
"selection-data": selectionRows.value
|
||
}, null, 8, ["modelValue", "query-params", "page-data", "selection-data"])
|
||
]);
|
||
};
|
||
}
|
||
});
|
||
export {
|
||
_sfc_main as default
|
||
};
|