学 赵
1 year ago
8 changed files with 90 additions and 16 deletions
@ -1,2 +1,26 @@ |
|||||
import useList from "../_list.js"; |
import html from "html"; |
||||
export default useList("base-data/bei-jian"); |
import { ref } from "vue"; |
||||
|
import request from "../../request/index.js"; |
||||
|
import AppList from "../../components/list/index.js"; |
||||
|
import useConfig from "../../models/base-data/bei-jian.js"; |
||||
|
|
||||
|
export default { |
||||
|
components: { AppList }, |
||||
|
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />`, |
||||
|
setup() { |
||||
|
const appListRef = ref(null); |
||||
|
const config = useConfig(); |
||||
|
const onCommand = async (item, rows) => { |
||||
|
const url = `${config.baseUrl}/${item.path}`; |
||||
|
if (item.path === "enable" || item.path === "disable") { |
||||
|
await appListRef.value.onClick( |
||||
|
async () => |
||||
|
await request("settleaccount/price-list-app-service-bj/update", { id: rows[0].id, isCancel: item.path === "enable" ? false : true }, { method: "POST" }, true), |
||||
|
`确认${item.path === "open-version" ? "启用" : "停用"}选中的${rows.length}行数据吗?`, |
||||
|
true |
||||
|
); |
||||
|
} |
||||
|
}; |
||||
|
return { appListRef, config, onCommand }; |
||||
|
}, |
||||
|
}; |
||||
|
@ -1,2 +1,25 @@ |
|||||
import useList from "../_list.js"; |
import html from "html"; |
||||
export default useList("base-data/xiao-shou"); |
import { ref } from "vue"; |
||||
|
import request from "../../request/index.js"; |
||||
|
import AppList from "../../components/list/index.js"; |
||||
|
import useConfig from "../../models/base-data/xiao-shou.js"; |
||||
|
|
||||
|
export default { |
||||
|
components: { AppList }, |
||||
|
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />`, |
||||
|
setup() { |
||||
|
const appListRef = ref(null); |
||||
|
const config = useConfig(); |
||||
|
const onCommand = async (item, rows) => { |
||||
|
const url = `${config.baseUrl}/${item.path}`; |
||||
|
if (item.path === "enable" || item.path === "disable") { |
||||
|
await appListRef.value.onClick( |
||||
|
async () => await request("settleaccount/price-list/update", { id: rows[0].id, isCancel: item.path === "enable" ? false : true }, { method: "POST" }, true), |
||||
|
`确认${item.path === "open-version" ? "启用" : "停用"}选中的${rows.length}行数据吗?`, |
||||
|
true |
||||
|
); |
||||
|
} |
||||
|
}; |
||||
|
return { appListRef, config, onCommand }; |
||||
|
}, |
||||
|
}; |
||||
|
Loading…
Reference in new issue