|
@@ -2,7 +2,7 @@
|
|
|
* @Author : yuanrunwei
|
|
|
* @Date : 2021-11-01 18:02:58
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
- * @LastEditTime: 2022-01-06 12:02:24
|
|
|
+ * @LastEditTime: 2022-01-10 09:38:20
|
|
|
* @FilePath : \spfm-market-front\src\pages\main\performance\components\table.vue
|
|
|
-->
|
|
|
<template>
|
|
@@ -28,12 +28,16 @@
|
|
|
@change="handleModify"
|
|
|
/>
|
|
|
</div>
|
|
|
+ <div v-if="type === 'number'">{{ scope.$index + 1 }}</div>
|
|
|
<div v-else-if="type === 'textarea'">
|
|
|
<pre class="simple-table-break">{{ scope.row[props] }}</pre>
|
|
|
</div>
|
|
|
<div v-else-if="type === 'date'">
|
|
|
<div>{{ $formatDate(scope.row[props], "YYYY-MM-DD") }}</div>
|
|
|
</div>
|
|
|
+ <div v-else-if="type === 'time'">
|
|
|
+ <div>{{ $formatDate(scope.row[props], "YYYY-MM-DD HH:00:00") }}</div>
|
|
|
+ </div>
|
|
|
<div v-else-if="type === 'click'">
|
|
|
<div
|
|
|
class="simple-table-click cursor-pointer"
|
|
@@ -73,6 +77,7 @@
|
|
|
<el-table-column
|
|
|
v-if="handleRow.length"
|
|
|
label="操作"
|
|
|
+ :align="'center'"
|
|
|
:width="handleRow.length * 50"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
@@ -85,7 +90,7 @@
|
|
|
<el-popconfirm
|
|
|
v-if="popconfirm"
|
|
|
:title="`确定要${label}吗?`"
|
|
|
- @confirm="handleClick(props, scope.row)"
|
|
|
+ @onConfirm="handleClick(props, scope.row)"
|
|
|
@cancel="handleCancel"
|
|
|
>
|
|
|
<el-button slot="reference" type="text" size="small">{{
|
|
@@ -150,14 +155,13 @@ export default {
|
|
|
return visible;
|
|
|
},
|
|
|
handleClick(props, row) {
|
|
|
- console.log("aaaaaaaaa");
|
|
|
this.$emit(props, row);
|
|
|
},
|
|
|
handleCancel() {
|
|
|
console.log("我被关闭了");
|
|
|
},
|
|
|
- handleSelectionChange(val){
|
|
|
- this.$emit("selection",val)
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.$emit("selection", val);
|
|
|
},
|
|
|
handleModify() {
|
|
|
this.$emit("modify", this.computed_list);
|