|
@@ -2,7 +2,7 @@
|
|
|
* @Author : yuanrunwei
|
|
|
* @Date : 2021-11-01 18:02:58
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
- * @LastEditTime: 2022-01-23 16:54:13
|
|
|
+ * @LastEditTime: 2022-02-10 11:17:50
|
|
|
* @FilePath : /spfm-market-front/src/pages/main/performance/components/table.vue
|
|
|
-->
|
|
|
<template>
|
|
@@ -59,7 +59,7 @@
|
|
|
v-for="(item, index) in scope.row[props].split(',')"
|
|
|
:key="index"
|
|
|
class="simple-table-click cursor-pointer"
|
|
|
- @click="handleClick(props, { ...scope.row,index })"
|
|
|
+ @click="handleClick(props, { ...scope.row, index })"
|
|
|
>
|
|
|
{{ scope.row[props].split(",")[index] }}
|
|
|
</span>
|
|
@@ -132,7 +132,7 @@
|
|
|
class="padding-right-5"
|
|
|
>
|
|
|
<span v-if="handleFormat(visible, scope.row)">
|
|
|
- <el-popconfirm
|
|
|
+ <!-- <el-popconfirm
|
|
|
v-if="popconfirm"
|
|
|
:title="`确定要${label}吗?`"
|
|
|
@confirm="handleClick(props, scope.row)"
|
|
@@ -141,7 +141,14 @@
|
|
|
<el-button slot="reference" type="text" size="small">{{
|
|
|
label
|
|
|
}}</el-button>
|
|
|
- </el-popconfirm>
|
|
|
+ </el-popconfirm> -->
|
|
|
+ <el-button
|
|
|
+ v-if="popconfirm"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="handleConfirm(label, props, scope.row)"
|
|
|
+ >{{ label }}</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
v-else
|
|
|
@click="handleClick(props, scope.row)"
|
|
@@ -202,6 +209,19 @@ export default {
|
|
|
}
|
|
|
return visible;
|
|
|
},
|
|
|
+ handleConfirm(label, props, row) {
|
|
|
+ this.$confirm(`确定要${label}吗?`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "error",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$emit(props, row);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ console.log("error");
|
|
|
+ });
|
|
|
+ },
|
|
|
handleClick(props, row) {
|
|
|
this.$emit(props, row);
|
|
|
},
|