串联同功能
This commit is contained in:
@ -95,7 +95,7 @@ public class SysContractController extends BaseController {
|
|||||||
public AjaxResult getfile(@PathVariable long id) {
|
public AjaxResult getfile(@PathVariable long id) {
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
SysContract contract = sysContractService.selectSysContractById(id);
|
SysContract contract = sysContractService.selectSysContractById(id);
|
||||||
if (contract.getPath() != null && !contract.getPath().equals("")) {
|
if (contract.getStatus() == 1) {
|
||||||
ajax.put("url", contract.getPath());
|
ajax.put("url", contract.getPath());
|
||||||
} else {
|
} else {
|
||||||
Map<String, String> data = new HashMap<>();
|
Map<String, String> data = new HashMap<>();
|
||||||
|
@ -60,6 +60,7 @@ public class SysContractServiceImpl implements ISysContractService {
|
|||||||
public int insertSysContract(SysContract sysContract) {
|
public int insertSysContract(SysContract sysContract) {
|
||||||
sysContract.setId(DateUtils.getNowDate().getTime());
|
sysContract.setId(DateUtils.getNowDate().getTime());
|
||||||
sysContract.setCreateTime(DateUtils.getNowDate());
|
sysContract.setCreateTime(DateUtils.getNowDate());
|
||||||
|
sysContract.setPath("/file/contract/" + sysContract.getId());
|
||||||
return sysContractMapper.insertSysContract(sysContract);
|
return sysContractMapper.insertSysContract(sysContract);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
"@riophae/vue-treeselect": "0.4.0",
|
"@riophae/vue-treeselect": "0.4.0",
|
||||||
"axios": "0.18.1",
|
"axios": "0.18.1",
|
||||||
"base-64": "^1.0.0",
|
"base-64": "^1.0.0",
|
||||||
"clipboard": "2.0.4",
|
"clipboard": "^2.0.6",
|
||||||
"core-js": "3.6.5",
|
"core-js": "3.6.5",
|
||||||
"dayjs": "^1.9.1",
|
"dayjs": "^1.9.1",
|
||||||
"echarts": "4.2.1",
|
"echarts": "4.2.1",
|
||||||
|
@ -94,7 +94,13 @@
|
|||||||
<el-table-column label="电话" align="center" prop="phone"/>
|
<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="serveTime" :formatter="serveTimeFormat"/>
|
||||||
<el-table-column label="金额" align="center" prop="amount"/>
|
<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" prop="remark"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -172,6 +178,8 @@
|
|||||||
updateContract
|
updateContract
|
||||||
} from "@/api/custom/contract";
|
} from "@/api/custom/contract";
|
||||||
|
|
||||||
|
import Clipboard from 'clipboard';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Contract",
|
name: "Contract",
|
||||||
data() {
|
data() {
|
||||||
@ -196,6 +204,8 @@
|
|||||||
open: false,
|
open: false,
|
||||||
// 服务时间字典
|
// 服务时间字典
|
||||||
serveTimeOptions: [],
|
serveTimeOptions: [],
|
||||||
|
//
|
||||||
|
copyValue: '',
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -340,6 +350,16 @@
|
|||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
}).catch(function () {
|
}).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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user