pengjun 1 year ago
parent
commit
24036df22a
  1. 3
      public/sysConfig.json
  2. 105
      src/components/patientRegister/ImportOrgData.vue
  3. 2
      src/components/patientRegister/PatientRegisterList.vue
  4. 16
      src/views/Home.vue
  5. 19
      src/views/login/Login.vue

3
public/sysConfig.json

@ -1,3 +1,4 @@
{ {
"apiurl": "http://10.1.12.140:9529"
"apiurl": "http://10.1.12.140:9529",
"softName":"创业体检管理系统"
} }

105
src/components/patientRegister/ImportOrgData.vue

@ -13,26 +13,49 @@
</div> </div>
<div style="margin-left: 20px"> <div style="margin-left: 20px">
<span>单位体检次数</span> <span>单位体检次数</span>
<el-select v-model="customerOrgRegister" placeholder="次数" style="width: 60px; margin-left: 10px" size="small"
@change="changeTimes" value-key="id">
<el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes" :value="item.id" />
<el-select v-model="customerOrgRegisterId" placeholder="次数" style="width: 60px; margin-left: 10px" size="small"
value-key="id">
<el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
:value="item.id" />
</el-select> </el-select>
</div> </div>
<div style="margin-left: 10px"> <div style="margin-left: 10px">
<el-button class="commonbutton" @click="btnImport">开始导入</el-button> <el-button class="commonbutton" @click="btnImport">开始导入</el-button>
</div> </div>
</div> </div>
<div>
<el-table :data="tableData" ref="customerOrgGroups" style="margin-top: 2px" row-key="id" border height="240px"
size="small" highlight-current-row :row-class-name="handleRowClassName" @row-click="rowClick">
<el-table-column type="index" label="序号" width="40" align="center" />
<el-table-column prop="importSuccessNum" label="导入成功数" min-width="60" />
<el-table-column prop="importErrorNum" label="导入错误数" min-width="60" />
<el-table-column prop="deleteSuccessNum" label="删除成功数" min-width="60" />
<el-table-column prop="deleteErrorNum" label="删除错误数" min-width="60" />
<el-table-column prop="importErrorMessages" label="导入错误信息" min-width="200" />
<el-table-column prop="deleteErrorMessages" label="删除错误信息" min-width="200" />
</el-table>
<div style="margin-top: 15px; height: 240px;overflow-y: auto;">
<div style="display: flex;justify-content: space-between;">
<div>
<span>导入成功数</span>
<div>{{ importState.importSuccessNum }}</div>
</div>
<div>
<span>导入错误数</span>
<div>{{ importState.importErrorNum }}</div>
</div>
<div></div>
</div>
<div style="margin-top: 5px; display: flex;justify-content: space-between;">
<div>
<span>删除成功数</span>
<div>{{ importState.deleteSuccessNum }}</div>
</div>
<div>
<span>删除错误数</span>
<div>{{ importState.deleteErrorNum }}</div>
</div>
<div></div>
</div>
<div style="margin-top: 5px;">
<span>导入错误信息</span>
<el-input type="textarea" v-model="importState.importErrorMessages" size="small"
:autosize="{ minRows: 3, maxRows: 3 }"></el-input>
</div>
<div style="margin-top: 5px;">
<span>删除错误信息</span>
<el-input type="textarea" v-model="importState.deleteErrorMessages" size="small"
:autosize="{ minRows: 3, maxRows: 3 }"></el-input>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -67,7 +90,14 @@ export default {
customerOrgId: "", //id customerOrgId: "", //id
customerOrgRegisterList: [], // customerOrgRegisterList: [], //
customerOrgRegisterId: '', // customerOrgRegisterId: '', //
importState: {
importSuccessNum: "",
importErrorNum: "",
deleteSuccessNum: "",
deleteErrorNum: "",
importErrorMessages: "",
deleteErrorMessages: ""
},
}; };
}, },
computed: { computed: {
@ -90,10 +120,6 @@ export default {
dddw, dddw,
deepCopy, deepCopy,
// //
handleRowClassName({ row, rowIndex }) { handleRowClassName({ row, rowIndex }) {
// highLightBg 'selected' // highLightBg 'selected'
@ -142,13 +168,7 @@ export default {
changeCustomerOrg(v) { changeCustomerOrg(v) {
if (!v) { if (!v) {
this.customerOrgRegisterList = []; this.customerOrgRegisterList = [];
this.customerOrgRegister = {};
this.customerOrgGroups = [];
this.isDrag = false;
this.form.id = "";
setTimeout(() => {
this.dataTransOpts.refresh.customer_org_group_detail.M++;
}, 20);
this.customerOrgRegisterId = "";
return; return;
} }
getapi( getapi(
@ -157,32 +177,30 @@ export default {
if (res.code != -1) { if (res.code != -1) {
this.customerOrgRegisterList = res.data; this.customerOrgRegisterList = res.data;
if (res.data.length > 0) { if (res.data.length > 0) {
this.customerOrgRegister = res.data[res.data.length - 1];
this.getCustomerOrgGroup(this.customerOrgRegister.id);
this.customerOrgRegisterId = res.data[res.data.length - 1].id;
} else { } else {
this.customerOrgRegister = {};
this.customerOrgGroups = [];
this.isDrag = false;
this.customerOrgRegisterId = '';
} }
} }
}); });
}, },
//
changeTimes(v) {
this.getCustomerOrgGroup(v.id);
},
// //
btnImport() { btnImport() {
if (!this.customerOrgRegisterId) {
this.$message.warning({ showClose: true, message: '请选择体检次数' })
return
}
let body = { let body = {
customerOrgRegisterId: this.customerOrgRegisterId customerOrgRegisterId: this.customerOrgRegisterId
} }
postapi('/api/app/patientregister/CreatePatientRegisterFromCustomerOrgInterface', body) postapi('/api/app/patientregister/CreatePatientRegisterFromCustomerOrgInterface', body)
.then(res => { .then(res => {
if (res.code > -1) {
//
if (res.code > -1 && res.data) {
this.importState = res.data
} }
}) })
}, },
@ -193,6 +211,19 @@ export default {
}, },
}, },
//()
watch: {
"dataTransOpts.plus.ImportOrgData": {
// immediate:true,
handler(newVal, oldVal) {
//console.log(`watch newVal: ${newVal}, oldVal: ${oldVal} `);
if (newVal != oldVal) {
this.importState = {}
}
}
},
},
}; };
</script> </script>
<style scoped> <style scoped>

2
src/components/patientRegister/PatientRegisterList.vue

@ -209,7 +209,7 @@
</el-dialog> </el-dialog>
<!-- 导入企业数据 --> <!-- 导入企业数据 -->
<el-dialog title="导入企业数据" :visible.sync="dialogWin.ImportOrgData" width="600"
<el-dialog title="导入企业数据" :visible.sync="dialogWin.ImportOrgData" width="800px"
:append-to-body="true" :close-on-click-modal="false"> :append-to-body="true" :close-on-click-modal="false">
<ImportOrgData /> <ImportOrgData />
</el-dialog> </el-dialog>

16
src/views/Home.vue

@ -14,7 +14,7 @@
<el-header style="height:50px; line-height: 40px" class="principalheader"> <el-header style="height:50px; line-height: 40px" class="principalheader">
<div class="navs"> <div class="navs">
<img src="@/assets/images/logo2.png" alt="" style="width: 24px; height: 24px" /> <img src="@/assets/images/logo2.png" alt="" style="width: 24px; height: 24px" />
<div class="maintitle">神豚体检管理系统</div>
<div class="maintitle">{{ lsysConfig.softName }}</div>
<!--动态生成菜单 add by pengj 'text-align: center;width:' + (window.pageWidth - 280) + 'px;display:flex;' <!--动态生成菜单 add by pengj 'text-align: center;width:' + (window.pageWidth - 280) + 'px;display:flex;'
<div :style="'display:flex;justify-content:center;width:' + (window.pageWidth - 300) + 'px;'"> <div :style="'display:flex;justify-content:center;width:' + (window.pageWidth - 300) + 'px;'">
@ -201,10 +201,14 @@ export default {
} }
}, },
LocalConfigInit: {}, LocalConfigInit: {},
lsysConfig: {
apiurl: "http://10.1.12.140:9529",
softName: "创业体检管理系统"
}
}; };
}, },
computed: { computed: {
...mapState(["window", "dialogWin"]),
...mapState(["window", "dialogWin", "sysConfig"]),
}, },
created() { created() {
let expires_in = parseInt(window.sessionStorage.getItem("expires_in")); let expires_in = parseInt(window.sessionStorage.getItem("expires_in"));
@ -214,6 +218,12 @@ export default {
return; return;
} }
try {
this.lsysConfig = JSON.parse(window.sessionStorage.getItem("sysConfig"))
} catch (error) {
this.lsysConfig = this.sysConfig
}
this.password = this.changepassword; this.password = this.changepassword;
// console.log(this.password); // console.log(this.password);
// console.log(this.$store.state.changepassword, "ssssssssssss"); // console.log(this.$store.state.changepassword, "ssssssssssss");
@ -330,7 +340,7 @@ export default {
this.form.oldPassWord = "" this.form.oldPassWord = ""
this.confirmpassword = "" this.confirmpassword = ""
this.form.newPassWord = "" this.form.newPassWord = ""
this.dialogVisible = true;
this.dialogVisible = true;
}, },
//退 //退
logout() { logout() {

19
src/views/login/Login.vue

@ -14,10 +14,11 @@
<div class="mainbody"> <div class="mainbody">
<div class="title"> <div class="title">
<img src="@/assets/images/logo1.png" /> <img src="@/assets/images/logo1.png" />
<div>神豚体检管理系统</div>
<div>{{ sysConfig.softName }}</div>
</div> </div>
<div class="userform"> <div class="userform">
<div style="color: #232748;font-size: 24px;font-weight: 700;margin-bottom: 20px;font-family: NotoSansSC-Bold;">
<div
style="color: #232748;font-size: 24px;font-weight: 700;margin-bottom: 20px;font-family: NotoSansSC-Bold;">
登录账号</div> 登录账号</div>
<el-form :model="form" :rules="rules" ref="form" class="demo-ruleForm"> <el-form :model="form" :rules="rules" ref="form" class="demo-ruleForm">
<el-form-item label="" prop="Username" style="margin-bottom: 20px"> <el-form-item label="" prop="Username" style="margin-bottom: 20px">
@ -63,11 +64,11 @@ import { writetoken } from "@/utlis/istoken";
import { deepCopy } from "@/utlis/proFunc"; import { deepCopy } from "@/utlis/proFunc";
import axios from "axios"; import axios from "axios";
import { Loading } from "element-ui"; import { Loading } from "element-ui";
import { mapState,mapMutations } from "vuex";
import { mapState, mapMutations } from "vuex";
export default { export default {
data() { data() {
return {
return {
form: { form: {
Username: "", Username: "",
Password: "", Password: "",
@ -90,12 +91,12 @@ export default {
LocalConfigInit: {} LocalConfigInit: {}
}; };
}, },
created() { created() {
}, },
async mounted() { async mounted() {
@ -194,7 +195,7 @@ export default {
userName: this.form.Username, userName: this.form.Username,
passWord: this.form.Password, passWord: this.form.Password,
}).then(ret => { }).then(ret => {
console.log('api/identity/users/login',ret)
console.log('api/identity/users/login', ret)
let res = ret.data let res = ret.data
if (res.code > -1) { if (res.code > -1) {
@ -207,7 +208,7 @@ export default {
window.sessionStorage.setItem("operatorType", res.data.operatorType); window.sessionStorage.setItem("operatorType", res.data.operatorType);
window.sessionStorage.setItem("userId", res.data.userId); //ID window.sessionStorage.setItem("userId", res.data.userId); //ID
window.sessionStorage.setItem("user", this.form.Username); window.sessionStorage.setItem("user", this.form.Username);
this.$router.push({ path: "/home" }); this.$router.push({ path: "/home" });
this.$store.state.changepassword = this.form.Password; this.$store.state.changepassword = this.form.Password;
} else { } else {

Loading…
Cancel
Save