|
@@ -100,7 +100,6 @@
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
:span-method="objectSpanMethod"
|
|
|
-
|
|
|
:header-cell-style="{background:'#e1e4e5',color:'#2b2b2b', lineHeight: '30px'}"
|
|
|
:cell-style="cellStyle"
|
|
|
class="table"
|
|
@@ -191,30 +190,51 @@
|
|
|
align="left"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <!-- <el-button-->
|
|
|
- <!-- size="mini"-->
|
|
|
- <!-- icon="el-icon-delete"-->
|
|
|
- <!-- @click="deleteObject(scope.$index, scope.row)">-->
|
|
|
- <!-- </el-button>-->
|
|
|
- <el-popconfirm
|
|
|
- title="确定删除吗?"
|
|
|
- @onConfirm="deleteObject(scope.$index, scope.row)"
|
|
|
- >
|
|
|
- <el-button slot="reference" size="mini" icon="el-icon-delete"/>
|
|
|
- </el-popconfirm>
|
|
|
+ <!-- <el-popconfirm-->
|
|
|
+ <!-- title="确定删除吗?"-->
|
|
|
+ <!-- @onConfirm="deleteObject(scope.$index, scope.row)"-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- <el-button slot="reference" size="mini" icon="el-icon-delete"/>-->
|
|
|
+ <!-- </el-popconfirm>-->
|
|
|
+ <!-- </template>-->
|
|
|
+
|
|
|
+ <!-- <el-popover-->
|
|
|
+ <!-- placement="button"-->
|
|
|
+ <!-- width="160"-->
|
|
|
+ <!-- v-model="visible">-->
|
|
|
+ <!-- <p>确定删除吗?</p>-->
|
|
|
+ <!-- <div style="text-align: right; margin: 0">-->
|
|
|
+ <!-- <el-button size="mini" type="text" @click="visible = false">取消</el-button>-->
|
|
|
+ <!-- <el-button type="primary" size="mini" @click="deleteObject(scope.$index, scope.row)">确定</el-button>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- <el-button slot="reference" size="mini" icon="el-icon-delete"/>-->
|
|
|
+ <!-- </el-popover>-->
|
|
|
+ <el-button slot="reference" size="mini" icon="el-icon-delete"
|
|
|
+ @click="deleteObject(scope.$index, scope.row)"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</section>
|
|
|
<!-- 分页 -->
|
|
|
-<!-- <el-pagination-->
|
|
|
-<!-- @size-change="handleSizeChange"-->
|
|
|
-<!-- @current-change="handleCurrentChange"-->
|
|
|
-<!-- :current-page="currentPage"-->
|
|
|
-<!-- :page-sizes="pageSizes"-->
|
|
|
-<!-- :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"-->
|
|
|
-<!-- style="float:right;margin-top:10px;padding:2px 5px;">-->
|
|
|
-<!-- </el-pagination>-->
|
|
|
+ <!-- <el-pagination-->
|
|
|
+ <!-- @size-change="handleSizeChange"-->
|
|
|
+ <!-- @current-change="handleCurrentChange"-->
|
|
|
+ <!-- :current-page="currentPage"-->
|
|
|
+ <!-- :page-sizes="pageSizes"-->
|
|
|
+ <!-- :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"-->
|
|
|
+ <!-- style="float:right;margin-top:10px;padding:2px 5px;">-->
|
|
|
+ <!-- </el-pagination>-->
|
|
|
+ <el-dialog
|
|
|
+ title="提示"
|
|
|
+ :visible.sync="visible"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <span>确定删除吗?</span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="visible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="confirmDelete">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<exportExcel
|
|
|
ref="export"
|
|
|
:values="values"
|
|
@@ -236,12 +256,13 @@
|
|
|
import exportExcel from "../../../components/relation/relationShip/Modal/exportExcel";
|
|
|
import addRelationShip from "../../../components/relation/relationShip/Modal/addRelationShip";
|
|
|
import editRelationShip from "../../../components/relation/relationShip/Modal/editRelationShip";
|
|
|
- import {relAdd, relDelete, relQuery} from "../../../api/relation/api";
|
|
|
+ import {relDelete, relQuery} from "../../../api/relation/api";
|
|
|
|
|
|
export default {
|
|
|
name: "index",
|
|
|
data() {
|
|
|
return {
|
|
|
+ visible: false,
|
|
|
MainObject: `(限制条件:对象类型的范围(包括:${localStorage.getItem('MainObject')}类型)`,
|
|
|
FromObject: `(限制条件:对象类型的范围(包括:${localStorage.getItem('FromObject')}类型)`,
|
|
|
pageSizes: [10, 20, 50, 100],
|
|
@@ -319,9 +340,9 @@
|
|
|
}]
|
|
|
}],
|
|
|
tableData: [],
|
|
|
-
|
|
|
+ delParam: {},
|
|
|
loading: false,
|
|
|
- needMergeArr: ['Name', 'LocalId', 'LocalName', 'CADID','btn'],
|
|
|
+ needMergeArr: ['Name', 'LocalId', 'LocalName', 'CADID', 'btn'],
|
|
|
rowMergeArrs: {}
|
|
|
// needMergeArr: ['name', 'id'], // 有合并项的列
|
|
|
// rowMergeArrs: {}, // 包含需要一个或多个合并项信息的对象
|
|
@@ -431,31 +452,6 @@
|
|
|
console.log(res, '==object==')
|
|
|
})
|
|
|
},
|
|
|
- // addShip(index) {
|
|
|
- // let that = this
|
|
|
- // relAdd(index).then(res => {
|
|
|
- // if (res.data.Result === "failure") {
|
|
|
- // if(res.data.ErrorType == 1) {
|
|
|
- // this.mainError = res.data.Message
|
|
|
- // debugger
|
|
|
- // } else if(res.data.ErrorType == 2) {
|
|
|
- //
|
|
|
- // } else {
|
|
|
- // debugger
|
|
|
- // this.$message.error(res.data.Message);
|
|
|
- //
|
|
|
- // }
|
|
|
- //
|
|
|
- // } else if (res.data.Result === "success") {
|
|
|
- // this.$message.success(res.data.Message);
|
|
|
- // this.init()
|
|
|
- // that.$refs.addShipComponent.addShipDialog = false
|
|
|
- // that.$refs.addShipComponent.codeValue = ''
|
|
|
- // that.$refs.addShipComponent.ruleForm.codeList = [{value:''}]
|
|
|
- // that.$refs.addShipComponent.ruleForm.main = ''
|
|
|
- // }
|
|
|
- // })
|
|
|
- // },
|
|
|
//分页更换size
|
|
|
handleSizeChange(val) {
|
|
|
this.currentPage = 1;
|
|
@@ -477,14 +473,21 @@
|
|
|
// this.$refs.editShipComponent.editShipDialog = true
|
|
|
},
|
|
|
deleteObject(index, row) {
|
|
|
-
|
|
|
- let param = {
|
|
|
+ this.visible = true
|
|
|
+ this.delParam = {
|
|
|
"FromId": row.Id,
|
|
|
"RelType": localStorage.getItem('RelManualType'),
|
|
|
"ToId": row.cId
|
|
|
}
|
|
|
- relDelete(param, res => {
|
|
|
+ // relDelete(param, res => {
|
|
|
+ // this.init()
|
|
|
+ // })
|
|
|
+ },
|
|
|
+ confirmDelete() {
|
|
|
+ relDelete(this.delParam, res => {
|
|
|
this.init()
|
|
|
+ this.visible = false
|
|
|
+ this.$message.success('删除成功')
|
|
|
})
|
|
|
},
|
|
|
cellStyle({row, column, rowIndex, columnIndex}) {
|