仪器说明书

master
382696293@qq.com 2 years ago
parent c6a2bd5781
commit ae96c92b69

@ -37,6 +37,11 @@ public class WxInstrumentInstructions extends BaseEntity {
@Excel(name = "说明书链接") @Excel(name = "说明书链接")
private String link; private String link;
/**
* 使
*/
private String nameUrl;
/** /**
* 0 1 * 0 1
*/ */
@ -83,6 +88,14 @@ public class WxInstrumentInstructions extends BaseEntity {
return status; return status;
} }
public String getNameUrl() {
return nameUrl;
}
public void setNameUrl(String nameUrl) {
this.nameUrl = nameUrl;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -6,6 +6,8 @@ import com.flossom.common.core.domain.entity.WxInstrumentInstructions;
import com.flossom.common.core.mapper.WxInstrumentInstructionsMapper; import com.flossom.common.core.mapper.WxInstrumentInstructionsMapper;
import com.flossom.common.core.utils.DateUtils; import com.flossom.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.flossom.system.service.IWxInstrumentInstructionsService; import com.flossom.system.service.IWxInstrumentInstructionsService;
@ -16,11 +18,15 @@ import com.flossom.system.service.IWxInstrumentInstructionsService;
* @date 2024-01-16 * @date 2024-01-16
*/ */
@Service @Service
@RefreshScope
public class WxInstrumentInstructionsServiceImpl implements IWxInstrumentInstructionsService { public class WxInstrumentInstructionsServiceImpl implements IWxInstrumentInstructionsService {
@Autowired @Autowired
private WxInstrumentInstructionsMapper wxInstrumentInstructionsMapper; private WxInstrumentInstructionsMapper wxInstrumentInstructionsMapper;
@Value("${instruction.domain}")
private String instructionDomain;
/** /**
* *
* *
@ -40,7 +46,15 @@ public class WxInstrumentInstructionsServiceImpl implements IWxInstrumentInstruc
*/ */
@Override @Override
public List<WxInstrumentInstructions> selectWxInstrumentInstructionsList(WxInstrumentInstructions wxInstrumentInstructions) { public List<WxInstrumentInstructions> selectWxInstrumentInstructionsList(WxInstrumentInstructions wxInstrumentInstructions) {
return wxInstrumentInstructionsMapper.selectWxInstrumentInstructionsList(wxInstrumentInstructions); List<WxInstrumentInstructions> instructionList = wxInstrumentInstructionsMapper.selectWxInstrumentInstructionsList(wxInstrumentInstructions);
if (instructionList != null && instructionList.size() > 0) {
for (WxInstrumentInstructions instrumentInstructions : instructionList) {
StringBuffer url = new StringBuffer(instructionDomain);
StringBuffer nameUrl = url.append("/book?type=").append(instrumentInstructions.getName()).append("&id=").append(instrumentInstructions.getInstrumentId());
instrumentInstructions.setNameUrl(nameUrl.toString());
}
}
return instructionList;
} }
/** /**

@ -1188,26 +1188,33 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
v-if="scope.row.link != null"
size="mini"
type="text"
@click="copyInstructionNameUrl(scope.row)"
>复制说明书
</el-button>
<el-button <el-button
v-if="scope.row.link != null"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-save"
@click="viewInstrumentInstruction(scope.row)" @click="viewInstrumentInstruction(scope.row)"
>查看 >查看说明书
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.link != null"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-save"
@click="saveInstrumentInstruction(scope.row)" @click="saveInstrumentInstruction(scope.row)"
>保存 >保存说明书
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.link != null"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete"
@click="delInstrumentInstruction(scope)" @click="delInstrumentInstruction(scope)"
>删除 >删除说明书
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -2279,7 +2286,7 @@ export default {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.instrumentInstructions.instructionList[i].fileList = [ this.instrumentInstructions.instructionList[i].fileList = [
{ {
name: response.data[i].name + '.pdf', name: response.data[i].name,
url: response.data[i].url, url: response.data[i].url,
}, },
] ]
@ -2346,8 +2353,13 @@ export default {
} }
}, },
viewInstrumentInstruction(item) { viewInstrumentInstruction(item) {
window.open(item.link, '_blank') window.open(item.nameUrl, '_blank')
}, },
copyInstructionNameUrl(item) {
navigator.clipboard.writeText(item.nameUrl).then(() => {
this.$message.success('已成功复制到剪贴板')
});
},
/* 模式 */ /* 模式 */
openModeIdDialog() { openModeIdDialog() {
this.mode.modeIdsValueTemp = [] this.mode.modeIdsValueTemp = []

@ -43,8 +43,9 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://110.41.134.131:8080`, // target: `http://110.41.134.131:8080`,
// target: `http://192.168.10.147:8080`, // target: `http://localhost:8080`,
target: `http://192.168.10.147:8080`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save