串联同功能

This commit is contained in:
huangdeliang
2020-10-28 10:28:43 +08:00
parent a51b318a42
commit f095bd8c8c
4 changed files with 24 additions and 3 deletions

View File

@ -43,7 +43,7 @@
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.18.1",
"base-64": "^1.0.0",
"clipboard": "2.0.4",
"clipboard": "^2.0.6",
"core-js": "3.6.5",
"dayjs": "^1.9.1",
"echarts": "4.2.1",

View File

@ -94,7 +94,13 @@
<el-table-column label="电话" align="center" prop="phone"/>
<el-table-column label="服务时间" align="center" prop="serveTime" :formatter="serveTimeFormat"/>
<el-table-column label="金额" align="center" prop="amount"/>
<el-table-column label="合同地址" align="center" prop="path"/>
<el-table-column label="合同地址" align="center" prop="path">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-copy-document" @click="handleCopy(scope.row.path)" class="copyBtn"
:data-clipboard-text="copyValue">复制
</el-button>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -172,6 +178,8 @@
updateContract
} from "@/api/custom/contract";
import Clipboard from 'clipboard';
export default {
name: "Contract",
data() {
@ -196,6 +204,8 @@
open: false,
// 服务时间字典
serveTimeOptions: [],
//
copyValue: '',
// 查询参数
queryParams: {
pageNum: 1,
@ -340,6 +350,16 @@
this.download(response.msg);
}).catch(function () {
});
},
handleCopy(path) {
this.copyValue = window.location.origin + path;
const btnCopy = new Clipboard('.copyBtn');
// btnCopy.destroy();
this.$message({
message: '拷贝成功',
type: 'success'
});
// console.log(this.copyValue);
}
}
};