mch 2 years ago
parent
commit
b3648df70f
  1. 43
      src/components/patientRegister/PatientRegisterList.vue
  2. 8
      src/main.js
  3. 2
      src/router/index.js
  4. 4
      src/views/login/Login.vue

43
src/components/patientRegister/PatientRegisterList.vue

@ -168,9 +168,6 @@
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="guidePrint">打指引单</el-button>
</div>
<div class="listBtn">
<el-button id="btntyfghkjhjhgfyudhfsojkafa" type="primary" data-parms="{'title':'electron'}" class="btnClass">electron</el-button>
</div>
</div>
<!-- 体检人员登记 -->
@ -230,19 +227,37 @@ export default {
...mapState(["window", "dict", "patientRegister", "customerOrg"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
//
async guidePrint(){
console.log('点击指引单按钮')
this.dialogGuide = true;
try{
console.log('window.electronApI',window.electronApI)
this.guideMsg = await window.electronApI.printPre("print parameters");
}catch(err){
console.log('点击指引单按钮错误:',err)
}
},
let token = localStorage.getItem('token');
let user = localStorage.getItem('user');
let toOutShell = '';
let msg ='';
//http://140.143.162.39:9529/api/app/print-report/patient-register-guide-report/3a0c7f6e-3ff1-fef6-c568-6f541aabe87a
getapi(`/api/app/print-report/patient-register-guide-report/${msg}`)
.then((res) => {
if (res.code != -1) {
res.data;
return this.$electronAPI.printPre('web 传入参数');
}
})
.then(res => {
msg = res;
});
console.log(msg);
},
handleSelectionChange(val) {
this.multipleSelection = val;
//console.log('this.multipleSelection',this.multipleSelection)

8
src/main.js

@ -17,6 +17,14 @@ Vue.use(ElementUI);
console.log('vue',Vue.prototype)
Vue.prototype.$axios = axios;
//全局注册 electronAPI 对象
try {
Vue.prototype.$electronAPI = window.electronAPI;
} catch (error) {
Vue.prototype.$electronAPI = null;
}
Vue.use(Print);
Vue.component("downloadExcel", JsonExcel);
Vue.config.productionTip = false;

2
src/router/index.js

@ -259,6 +259,8 @@ const routes = [
];
const router = new VueRouter({
//mode: "history",
//base: process.env.BASE_URL,
routes,
});

4
src/views/login/Login.vue

@ -29,9 +29,6 @@
<el-button type="primary" class="btn" @click="onSubmit(form)"
>用户登录</el-button
>
<!--
<el-button id="btn" type="primary" data-parms="11111111" class="btn">测试</el-button>
-->
</el-form>
</div>
</div>
@ -65,6 +62,7 @@ export default {
};
},
methods: {
onSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {

Loading…
Cancel
Save