更新列表
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
<div class="infoCnt">
|
<div class="infoCnt">
|
||||||
<div class="baseInfo">
|
<div class="baseInfo">
|
||||||
<div v-for="(item, index) in tableData" :key="index" >
|
<div v-for="(item, index) in tableData" :key="index" >
|
||||||
发掘文本{{ index + 1 }}:<span class="text-danger">{{ item.fjWb }}</span>
|
发掘文本{{ index + 1 }}:<span class="text-danger">{{ item.nr }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MyTable
|
<MyTable
|
||||||
|
@ -15,66 +15,38 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||||
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
|
import { ref, defineExpose,defineProps, defineEmits } from "vue";
|
||||||
import { ref, defineExpose, defineEmits, getCurrentInstance } from "vue";
|
|
||||||
const emit = defineEmits(["updateDate"]);
|
const emit = defineEmits(["updateDate"]);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dic: Object
|
dic: Object
|
||||||
});
|
});
|
||||||
const { proxy } = getCurrentInstance();
|
|
||||||
const { D_GS_RQFJ_LX } = proxy.$dict("D_GS_RQFJ_LX"); //获取字典数据
|
|
||||||
const dialogForm = ref(false); //弹窗
|
const dialogForm = ref(false); //弹窗
|
||||||
const formData = ref([
|
const formData = ref([
|
||||||
{ label: "发掘类型", prop: "fjLx", type: "select", options: D_GS_RQFJ_LX },
|
{ label: "数据来源", prop: "sjly", type: "select", options:props.dic.D_GS_RQFJ_LX,disabled:true },
|
||||||
{ label: "发掘文本", prop: "fjWb", type: "textarea", width: "100%" }
|
{ label: "是否发掘", prop: "sffj", type: "select", options: props.dic.D_BZ_SF,disabled:true },
|
||||||
|
{ label: "数据时间", prop: "sj", type: "datetime"},
|
||||||
|
{ label: "指向地点", prop: "dd", type: "textarea", width: "100%" },
|
||||||
|
{ label: "数据内容", prop: "nr", type: "textarea", width: "100%" },
|
||||||
]);
|
]);
|
||||||
const listQuery = ref({}); //表单
|
const listQuery = ref({}); //表单
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const elform = ref();
|
const elform = ref();
|
||||||
const title = ref("");
|
const title = ref("编辑");
|
||||||
const disabled = ref(false)
|
const disabled = ref(false)
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
const init = (type, row) => {
|
const init = (row) => {
|
||||||
dialogForm.value = true;
|
dialogForm.value = true;
|
||||||
title.value = type == "add" ? "新增" : type == "info" ? "详情" : "编辑";
|
listQuery.value = JSON.parse(JSON.stringify(row))
|
||||||
disabled.value = title.value == '详情' ? true : false ;
|
|
||||||
// 初始化表单数据,并根据详情页设置禁用状态
|
|
||||||
formData.value = [
|
|
||||||
{ label: "发掘类型", prop: "fjLx", type: "select", options: D_GS_RQFJ_LX },
|
|
||||||
{ label: "发掘文本", prop: "fjWb", type: "textarea", width: "100%" }
|
|
||||||
];
|
|
||||||
if (row) getDataById(row.id);
|
|
||||||
};
|
|
||||||
// 根据id查询详情
|
|
||||||
const getDataById = (id) => {
|
|
||||||
qcckGet({}, "/mosty-gsxt/tbGsxtRqfjNr/" + id).then((res) => {
|
|
||||||
listQuery.value = res;
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
elform.value.submit((data) => {
|
elform.value.submit((data) => {
|
||||||
let url = title.value == "新增" ? "/mosty-gsxt/tbGsxtRqfjNr/save" : "/mosty-gsxt/tbGsxtRqfjNr/update";
|
emit('updateDate',data)
|
||||||
let params = { ...data };
|
close();
|
||||||
loading.value = true;
|
|
||||||
qcckPost(params, url).then((res) => {
|
|
||||||
loading.value = false;
|
|
||||||
proxy.$message({ type: "success", message: title.value + "成功" });
|
|
||||||
emit("onSearch");
|
|
||||||
close();
|
|
||||||
}).catch(() => {
|
|
||||||
loading.value = false;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 接收父组件传入的数据并回显
|
|
||||||
const setFormData = (data) => {
|
|
||||||
listQuery.value = {
|
|
||||||
...data // 假设 data 包含所有需要的字段
|
|
||||||
};
|
|
||||||
};
|
|
||||||
// 关闭
|
// 关闭
|
||||||
const close = () => {
|
const close = () => {
|
||||||
listQuery.value = {};
|
listQuery.value = {};
|
||||||
@ -82,14 +54,7 @@ const close = () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 2. 暴露获取数据的方法
|
defineExpose({ init });
|
||||||
const getFormData = () => {
|
|
||||||
// 可以在这里添加验证逻辑
|
|
||||||
return {
|
|
||||||
formData: listQuery.value
|
|
||||||
};
|
|
||||||
};
|
|
||||||
defineExpose({ init, setFormData });
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -11,6 +11,12 @@
|
|||||||
:key="pageData.keyCount"
|
:key="pageData.keyCount"
|
||||||
:tableConfiger="pageData.tableConfiger"
|
:tableConfiger="pageData.tableConfiger"
|
||||||
@chooseData="chooseData">
|
@chooseData="chooseData">
|
||||||
|
<template #sjly="{row}">
|
||||||
|
<DictTag :tag="false" :value="row.sjly" :options="props.dic.D_GS_RQFJ_LX" />
|
||||||
|
</template>
|
||||||
|
<template #sffj="{row}">
|
||||||
|
<DictTag :tag="false" :value="row.sffj" :options="props.dic.D_BZ_SF" />
|
||||||
|
</template>
|
||||||
</MyTable>
|
</MyTable>
|
||||||
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{...pageData.pageConfiger}"></Pages>
|
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{...pageData.pageConfiger}"></Pages>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -22,10 +28,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { qcckGet, qcckDelete } from "@/api/qcckApi.js";
|
||||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||||
import Pages from "@/components/aboutTable/Pages.vue";
|
import Pages from "@/components/aboutTable/Pages.vue";
|
||||||
import Search from "@/components/aboutTable/Search.vue";
|
import Search from "@/components/aboutTable/Search.vue";
|
||||||
import { ref,reactive, onMounted, nextTick } from 'vue';
|
import { ref,reactive, onMounted, nextTick,getCurrentInstance } from 'vue';
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue:{
|
modelValue:{
|
||||||
type:Boolean,
|
type:Boolean,
|
||||||
@ -36,15 +44,14 @@ const props = defineProps({
|
|||||||
default:{}
|
default:{}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const ids = ref([])
|
const chooseList = ref([])
|
||||||
const title =ref('')
|
const title =ref('')
|
||||||
const searchRef = ref()
|
const searchRef = ref()
|
||||||
const emits = defineEmits(['update:modelValue','cancel','submit'])
|
const emits = defineEmits(['update:modelValue','cancel','submit'])
|
||||||
const searchConfiger = ref([
|
const searchConfiger = ref([
|
||||||
{ label: "数据来源", prop: "sjly", placeholder: "请选择数据来源", showType: "select" },
|
{ label: "指向地点", prop: "dd", placeholder: "请输入指向地点", showType: "input" },
|
||||||
{ label: "数据类型", prop: "sjlx", placeholder: "请选择数据类型", showType: "select" },
|
{ label: "数据内容", prop: "nr", placeholder: "请输入数据内容", showType: "input" },
|
||||||
{ label: "指向地点", prop: "zxdz", placeholder: "请输入指向地点", showType: "input" },
|
{ label: "是否发掘", prop: "sffj", placeholder: "请输入数据内容", showType: "select" },
|
||||||
{ label: "数据内容", prop: "sjnr", placeholder: "请输入数据内容", showType: "input" },
|
|
||||||
{ label: "数据时间", prop: "times", showType: "datetimerange" },
|
{ label: "数据时间", prop: "times", showType: "datetimerange" },
|
||||||
]);
|
]);
|
||||||
const pageData = reactive({
|
const pageData = reactive({
|
||||||
@ -52,52 +59,85 @@ const pageData = reactive({
|
|||||||
keyCount: 0,
|
keyCount: 0,
|
||||||
tableConfiger: {
|
tableConfiger: {
|
||||||
rowHieght: 61,
|
rowHieght: 61,
|
||||||
showSelectType: "checkBox",
|
showSelectType: "radio",
|
||||||
haveControls: false,
|
haveControls: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
},
|
},
|
||||||
tableHeight: 190,
|
|
||||||
pageConfiger: {
|
pageConfiger: {
|
||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
pageCurrent: 1
|
pageCurrent: 1
|
||||||
},
|
},
|
||||||
tableColumn: [
|
tableColumn: [
|
||||||
{ label: "所属部门", prop: "ssbm"},
|
{ label: "数据来源", prop: "sjly",showSolt:true},
|
||||||
{ label: "数据来源", prop: "sjly"},
|
|
||||||
{ label: "数据类型", prop: "sjlx"},
|
{ label: "数据类型", prop: "sjlx"},
|
||||||
{ label: "数据时间", prop: "sjsj"},
|
{ label: "是否发掘", prop: "sffj",showSolt:true},
|
||||||
{ label: "指向地点", prop: "zxdz"},
|
{ label: "数据时间", prop: "sj", showOverflowTooltip: true,},
|
||||||
{ label: "数据内容", prop: "zxnr"},
|
{ label: "指向地点", prop: "dd", showOverflowTooltip: true,},
|
||||||
|
{ label: "数据内容", prop: "nr", showOverflowTooltip: true},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const dm = ref('');
|
||||||
|
onMounted(()=>{
|
||||||
|
nextTick(()=>{
|
||||||
|
tabHeightFn()
|
||||||
|
})
|
||||||
|
})
|
||||||
const init = (val) =>{
|
const init = (val) =>{
|
||||||
tabHeightFn();
|
tabHeightFn();
|
||||||
|
dm.value = val;
|
||||||
let zdlist = props.dic.D_GS_RQFJ_LX || []
|
let zdlist = props.dic.D_GS_RQFJ_LX || []
|
||||||
let obj = zdlist.find(v=>v.dm == val);
|
let obj = zdlist.find(v=>v.dm == val);
|
||||||
title.value = obj ? obj.zdmc+'选择' :'选择数据'
|
title.value = obj ? obj.zdmc+'选择' :'选择数据';
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
const getList = () =>{
|
||||||
|
let params = {
|
||||||
|
fjlx:dm.value,
|
||||||
|
pageCurrent:pageData.pageConfiger.pageCurrent,
|
||||||
|
pageSize:pageData.pageConfiger.pageSize,
|
||||||
|
}
|
||||||
|
pageData.tableConfiger.loading = true;
|
||||||
|
qcckGet(params,'/mosty-gsxt/qbcj/getZdryCbfjtc').then(res=>{
|
||||||
|
let arr = res.records || [];
|
||||||
|
pageData.tableData = arr.map((item,idex)=>{
|
||||||
|
item.sjly = dm.value ;
|
||||||
|
item.id = idex;
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
pageData.pageConfiger.total = res.total;
|
||||||
|
pageData.tableConfiger.loading = false;
|
||||||
|
}).catch(()=>{
|
||||||
|
pageData.tableConfiger.loading = false;
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const changeNo = (val) => {
|
const changeNo = (val) => {
|
||||||
pageData.pageConfiger.pageCurrent = val;
|
pageData.pageConfiger.pageCurrent = val;
|
||||||
|
getList()
|
||||||
};
|
};
|
||||||
const changeSize = (val) => {
|
const changeSize = (val) => {
|
||||||
pageData.pageConfiger.pageSize = val;
|
pageData.pageConfiger.pageSize = val;
|
||||||
|
getList()
|
||||||
};
|
};
|
||||||
|
|
||||||
const chooseData = (val) =>{
|
const chooseData = (val) =>{
|
||||||
if(Array.isArray(val)) ids.value = val.map(v=>val.id);
|
if(Array.isArray(val)) chooseList.value = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = () =>{
|
const handleSubmit = () =>{
|
||||||
|
if(chooseList.value.length == 0) return proxy.$message({ type: "warning", message: "请选择数据" });;
|
||||||
|
emits('submit',chooseList.value);
|
||||||
cancelDailg()
|
cancelDailg()
|
||||||
}
|
}
|
||||||
|
|
||||||
const cancelDailg = () =>{
|
const cancelDailg = () =>{
|
||||||
emits('update:modelValue',false);
|
emits('update:modelValue',false);
|
||||||
emits('cancel');
|
emits('cancel');
|
||||||
|
chooseList.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
const tabHeightFn = () => {
|
const tabHeightFn = () => {
|
||||||
|
@ -18,16 +18,14 @@
|
|||||||
:tableHeight="pageData.tableHeight"
|
:tableHeight="pageData.tableHeight"
|
||||||
:key="pageData.keyCount"
|
:key="pageData.keyCount"
|
||||||
:tableConfiger="pageData.tableConfiger0"
|
:tableConfiger="pageData.tableConfiger0"
|
||||||
:controlsWidth="pageData.controlsWidth"
|
:controlsWidth="pageData.controlsWidth">
|
||||||
@chooseData="chooseDataTop">
|
<template #sjly="{ row }">
|
||||||
<template #fjLx="{ row }">
|
<DictTag :tag="false" :value="row.sjly" :options="D_GS_RQFJ_LX" />
|
||||||
<DictTag :tag="false" :value="row.fjLx" :options="D_GS_RQFJ_LX" />
|
|
||||||
</template>
|
</template>
|
||||||
<!-- 操作 -->
|
<!-- 操作 -->
|
||||||
<template #controls="{ row }">
|
<template #controls="{ row}">
|
||||||
<el-link size="small" type="success" @click="handleData('edit', row)">编辑</el-link>
|
<el-link size="small" type="success" @click="handleData(row)">编辑</el-link>
|
||||||
<el-link size="small" type="primary" @click="handleData('info', row)">查看</el-link>
|
<el-link size="small" type="danger" @click="deleteRow(row.id)">删除</el-link>
|
||||||
<el-link size="small" type="danger" @click="deleteRow([row.id])">删除</el-link>
|
|
||||||
</template>
|
</template>
|
||||||
</MyTable>
|
</MyTable>
|
||||||
<div class="ww100 flex just-center mt8">
|
<div class="ww100 flex just-center mt8">
|
||||||
@ -35,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tableCnt mb10 pl10 pr10">
|
<div class="tableCnt mb10 pl10 pr10">
|
||||||
<PageTitle title="模型智能识别/LP解析结果" style="color: #333"></PageTitle>
|
<PageTitle title="解析结果" style="color: #333"></PageTitle>
|
||||||
<div ref="searchBox" class="mb8">
|
<div ref="searchBox" class="mb8">
|
||||||
<el-button :type="it == '批量删除' ? 'danger' : 'primary'" size="small" v-for="it in btnsList" :key="it" @click="chooseType(it)">{{ it }}</el-button>
|
<el-button :type="it == '批量删除' ? 'danger' : 'primary'" size="small" v-for="it in btnsList" :key="it" @click="chooseType(it)">{{ it }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -88,9 +86,9 @@
|
|||||||
<!-- 弹窗智能分析 -->
|
<!-- 弹窗智能分析 -->
|
||||||
<IntelligentParsing :tableData="pageData.tableData" ref="IntelligentParsingRef" @upadate="getModelList" />
|
<IntelligentParsing :tableData="pageData.tableData" ref="IntelligentParsingRef" @upadate="getModelList" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<addForm ref="addFormDiloag" @onSearch="onSearch" />
|
<addForm ref="addFormDiloag" v-if="showEdit" @updateDate="updateDate" :dic="{D_GS_RQFJ_LX,D_BZ_SF}" />
|
||||||
<!-- 弹窗 -->
|
<!-- 弹窗 -->
|
||||||
<ListDialog ref="modelList" v-model="showDialog" v-if="showDialog" @cancel="active = ''" :dic="{D_GS_RQFJ_LX}"></ListDialog>
|
<ListDialog ref="modelList" v-model="showDialog" v-if="showDialog" @submit="handelSub" @cancel="active = ''" :dic="{D_GS_RQFJ_LX,D_BZ_SF}"></ListDialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -128,9 +126,9 @@ const searchConfiger = ref([
|
|||||||
const active = ref('');
|
const active = ref('');
|
||||||
const btnsList = reactive(["级别变更","警种变更","指定分配","添加标签","导出","批量删除"]);
|
const btnsList = reactive(["级别变更","警种变更","指定分配","添加标签","导出","批量删除"]);
|
||||||
const chooselx = ref("");
|
const chooselx = ref("");
|
||||||
const idsTop = ref([]);
|
|
||||||
const ids = ref([]);
|
const ids = ref([]);
|
||||||
const addFormDiloag = ref();
|
const addFormDiloag = ref();
|
||||||
|
const showEdit = ref(false);
|
||||||
const IntelligentParsingRef = ref();
|
const IntelligentParsingRef = ref();
|
||||||
const searchBox = ref();
|
const searchBox = ref();
|
||||||
const queryFrom = ref({});
|
const queryFrom = ref({});
|
||||||
@ -156,8 +154,10 @@ const pageData = reactive({
|
|||||||
},
|
},
|
||||||
controlsWidth: 160,
|
controlsWidth: 160,
|
||||||
tableColumn: [
|
tableColumn: [
|
||||||
{ label: "发掘类型", prop: "fjLx", showSolt: true },
|
{ label: "数据来源", prop: "sjly",showSolt:true},
|
||||||
{ label: "发掘文本 ", prop: "fjWb", showOverflowTooltip: true }
|
{ label: "数据时间", prop: "sj", showOverflowTooltip: true,},
|
||||||
|
{ label: "指向地点", prop: "dd", showOverflowTooltip: true,},
|
||||||
|
{ label: "数据内容", prop: "nr", showOverflowTooltip: true},
|
||||||
],
|
],
|
||||||
tableColumn2: [
|
tableColumn2: [
|
||||||
{ label: "姓名", prop: "ryXm", showOverflowTooltip: true },
|
{ label: "姓名", prop: "ryXm", showOverflowTooltip: true },
|
||||||
@ -183,7 +183,6 @@ const pageData = reactive({
|
|||||||
const onSearch = (val) => {
|
const onSearch = (val) => {
|
||||||
queryFrom.value = { ...val };
|
queryFrom.value = { ...val };
|
||||||
pageData.pageConfiger.pageCurrent = 1;
|
pageData.pageConfiger.pageCurrent = 1;
|
||||||
getList();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const changeNo = (val) => {
|
const changeNo = (val) => {
|
||||||
@ -195,17 +194,6 @@ const changeSize = (val) => {
|
|||||||
getModelList();
|
getModelList();
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取内容列表
|
|
||||||
const getList = () => {
|
|
||||||
pageData.tableConfiger.loading = true;
|
|
||||||
let data = { ...queryFrom.value };
|
|
||||||
qcckGet(data, "/mosty-gsxt/tbGsxtRqfjNr/selectPage").then((res) => {
|
|
||||||
pageData.tableData = res.records || [];
|
|
||||||
pageData.tableConfiger.loading = false;
|
|
||||||
}).catch(() => {
|
|
||||||
pageData.tableConfiger.loading = false;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
//获取模型识别列表
|
//获取模型识别列表
|
||||||
const getModelList = () => {
|
const getModelList = () => {
|
||||||
@ -222,29 +210,13 @@ const getModelList = () => {
|
|||||||
};
|
};
|
||||||
//新增- 编辑
|
//新增- 编辑
|
||||||
const handleData = (type, row) => {
|
const handleData = (type, row) => {
|
||||||
addFormDiloag.value.init(type, row);
|
showEdit.value = true;
|
||||||
};
|
nextTick(()=>{
|
||||||
// 智能解析
|
addFormDiloag.value.init(type, row);
|
||||||
const intelligent = () => {
|
})
|
||||||
IntelligentParsingRef.value.init();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 选择数据
|
|
||||||
const chooseDataTop = (val) => {
|
|
||||||
if (Array.isArray(val)) idsTop.value = val.map((item) => item.id);
|
|
||||||
};
|
|
||||||
|
|
||||||
//删除操作
|
|
||||||
const deleteRow = (ids) => {
|
|
||||||
proxy.$confirm("确定要删除", "警告", { type: "warning" }).then(() => {
|
|
||||||
ids.forEach((id) => {
|
|
||||||
qcckGet({}, "/mosty-gsxt/tbGsxtRqfjNr/closeById/" + id).then((res) => {
|
|
||||||
ElMessage.success("删除成功");
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
const deleteRowBottom = (id) => {
|
const deleteRowBottom = (id) => {
|
||||||
proxy.$confirm("确定要删除", "警告", { type: "warning" }).then(() => {
|
proxy.$confirm("确定要删除", "警告", { type: "warning" }).then(() => {
|
||||||
qcckDelete({}, "/mosty-gsxt/tbGsxtRqfjRy/" + id).then((res) => {
|
qcckDelete({}, "/mosty-gsxt/tbGsxtRqfjRy/" + id).then((res) => {
|
||||||
@ -289,6 +261,28 @@ const changeRadio = () =>{
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//删除操作
|
||||||
|
const deleteRow = (id) => {
|
||||||
|
pageData.tableData = pageData.tableData.filter(v=>v.id != id);
|
||||||
|
};
|
||||||
|
|
||||||
|
const updateDate = (val) =>{
|
||||||
|
let index = pageData.tableData.findIndex(v=>v.id == val.id);
|
||||||
|
if(index != -1) pageData.tableData[index] = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
const handelSub = (val) =>{
|
||||||
|
pageData.tableData = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 智能解析
|
||||||
|
const intelligent = () => {
|
||||||
|
if(pageData.tableData.length == 0) return proxy.$message({ type: "warning", message: "请先选择数据" });;
|
||||||
|
IntelligentParsingRef.value.init();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const tabHeightFn = () => {
|
const tabHeightFn = () => {
|
||||||
pageData.tableHeight2 = window.innerHeight - searchBox.value.offsetHeight - 650;
|
pageData.tableHeight2 = window.innerHeight - searchBox.value.offsetHeight - 650;
|
||||||
window.onresize = function () {
|
window.onresize = function () {
|
||||||
@ -297,7 +291,6 @@ const tabHeightFn = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
|
||||||
tabHeightFn();
|
tabHeightFn();
|
||||||
getModelList();
|
getModelList();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user