|
@@ -38,6 +38,14 @@
|
|
|
@click="multipleDelete"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ :disabled="toDeleteIds.length < 1"
|
|
|
+ type="refresh"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ :size="size"
|
|
|
+ @click="apsSync"
|
|
|
+ >APS同步</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
<template #menu="{ row, index, type }">
|
|
|
<el-button @click="binding(row)" text type="primary"
|
|
@@ -66,11 +74,12 @@
|
|
|
<script setup="ts">
|
|
|
import { ref, getCurrentInstance } from "vue";
|
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
|
-import ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
|
+import {syncAps} from "@/api/aps";
|
|
|
import { useCommonStoreHook } from "@/store";
|
|
|
import { updateStation } from "@/api/station";
|
|
|
const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
|
import { useDictionaryStore } from "@/store";
|
|
|
+import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
const { dicts } = useDictionaryStore();
|
|
|
const test = () => {
|
|
|
isShowTable.value = true;
|
|
@@ -116,7 +125,22 @@ function rowSave(form, done, loading) {
|
|
|
createRow(form, done, loading);
|
|
|
}
|
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
-
|
|
|
+const apsSync = () =>{
|
|
|
+ ElMessageBox.confirm("是否同步所选中数据?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(async () => {
|
|
|
+ let param = {type: 1,codes: toDeleteIds.value}
|
|
|
+ syncAps(param).then((data)=>{
|
|
|
+ if (data.code === "200") {
|
|
|
+ ElMessage.success(data.msg);
|
|
|
+ } else {
|
|
|
+ ElMessage.error(data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
// console.log("crudRef", crudRef)
|
|
|
dataList();
|