|
@@ -7,10 +7,13 @@
|
|
|
<template #default="scope">
|
|
|
<el-popover :width="600" placement="right" trigger="click">
|
|
|
<template #reference>
|
|
|
- <el-button text @click="getMuBanXinXiClick(scope.row)">{{ scope.row.name }}</el-button>
|
|
|
+ <el-button text @click="getMuBanXinXiClick(scope.row)" type="primary" :title="scope.row.name">
|
|
|
+ {{ scope.row.name }}
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<!-- 这里是弹出框中的数据 -->
|
|
|
- <el-table :data="muBanXiangQing" :height="windowSize.h - 170" class="eltable" @selection-change="xuanZeXiangMuTable">
|
|
|
+ <el-table :data="muBanXiangQing" :height="windowSize.h - 170" class="eltable"
|
|
|
+ @selection-change="xuanZeXiangMuTable">
|
|
|
<el-table-column type="selection"></el-table-column>
|
|
|
<el-table-column label="项目名称" prop="chargeName"></el-table-column>
|
|
|
<el-table-column label="国家编码" prop="nationalCode"></el-table-column>
|
|
@@ -30,12 +33,12 @@
|
|
|
<el-table-column>
|
|
|
<template #default="scope">
|
|
|
<el-popconfirm
|
|
|
- cancel-button-text="取消"
|
|
|
- confirm-button-text="确认"
|
|
|
- icon="el-icon-info"
|
|
|
- iconColor="red"
|
|
|
- title="是否删除该数据"
|
|
|
- @confirm="shanChuMuBanClick(scope.$index, scope.row)"
|
|
|
+ cancel-button-text="取消"
|
|
|
+ confirm-button-text="确认"
|
|
|
+ icon="el-icon-info"
|
|
|
+ iconColor="red"
|
|
|
+ title="是否删除该数据"
|
|
|
+ @confirm="shanChuMuBanClick(scope.$index, scope.row)"
|
|
|
>
|
|
|
<template #reference>
|
|
|
<el-button type="danger">删除</el-button>
|
|
@@ -45,24 +48,24 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination
|
|
|
- :current-page="templateData.currentPage"
|
|
|
- :page-size="templateData.pageSize"
|
|
|
- :pager-count="5"
|
|
|
- :total="templateData.total"
|
|
|
- layout=" prev, pager, next"
|
|
|
- small
|
|
|
- style="margin-top: 5px"
|
|
|
- @current-change="templatePaging"
|
|
|
+ :current-page="templateData.currentPage"
|
|
|
+ :page-size="templateData.pageSize"
|
|
|
+ :pager-count="5"
|
|
|
+ :total="templateData.total"
|
|
|
+ layout=" prev, pager, next"
|
|
|
+ small
|
|
|
+ style="margin-top: 5px"
|
|
|
+ @current-change="templatePaging"
|
|
|
></el-pagination>
|
|
|
</el-aside>
|
|
|
</el-container>
|
|
|
</template>
|
|
|
|
|
|
<script name="HuoQuMuBan" setup>
|
|
|
-import { onMounted, ref } from 'vue'
|
|
|
-import { getMuBan, getMuBanXinXi, shanChuMuBan } from '@/api/yibao/xiang-mu-lu-ru'
|
|
|
+import {onMounted, ref} from 'vue'
|
|
|
+import {getMuBan, getMuBanXinXi, shanChuMuBan} from '@/api/yibao/xiang-mu-lu-ru'
|
|
|
import store from '@/store'
|
|
|
-import { ElMessageBox } from 'element-plus'
|
|
|
+import {ElMessageBox} from 'element-plus'
|
|
|
|
|
|
const emit = defineEmits(['selectionFeiYong'])
|
|
|
|
|
@@ -96,7 +99,7 @@ const muBanXiangQing = ref([])
|
|
|
|
|
|
// 获取选择的数据
|
|
|
const xuanZeXiangMuTable = (val) => {
|
|
|
- emit('selectionFeiYong', { val })
|
|
|
+ emit('selectionFeiYong', {val})
|
|
|
}
|
|
|
|
|
|
const shanChuMuBanClick = (index, data) => {
|
|
@@ -104,12 +107,13 @@ const shanChuMuBanClick = (index, data) => {
|
|
|
ElMessageBox.confirm('该模板非本人创建是否强制删除', '提示', {
|
|
|
type: 'error',
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- shanChuMuBan(data.name, data.opIdCode).then((res) => {
|
|
|
- templateData.data.splice(index, 1)
|
|
|
+ .then(() => {
|
|
|
+ shanChuMuBan(data.name, data.opIdCode).then((res) => {
|
|
|
+ templateData.data.splice(index, 1)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
})
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
} else {
|
|
|
shanChuMuBan(data.name, data.opIdCode).then((res) => {
|
|
|
templateData.data.splice(index, 1)
|