Browse Source

fix:修改样式

master
123456 3 years ago
parent
commit
a652ed1ffa
  1. 134
      src/views/modules/plugins/point/icpointnucleicmonitoring.vue
  2. 124
      src/views/modules/plugins/point/icpointvaccinesinoculation.vue

134
src/views/modules/plugins/point/icpointnucleicmonitoring.vue

@ -1,6 +1,6 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <div class="div_main">
<div class="mod-user__icPointNucleicMonitoring}"> <div class="div_search">
<el-form <el-form
:inline="true" :inline="true"
:model="dataForm" :model="dataForm"
@ -10,10 +10,10 @@
<el-input v-model="dataForm.id" placeholder="id" clearable></el-input> <el-input v-model="dataForm.id" placeholder="id" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="getDataList()">{{ $t("query") }}</el-button> <el-button class="diy-button--search" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ <el-button class="diy-button--add" type="primary" @click="addOrUpdateHandle()">{{
$t("add") $t("add")
}}</el-button> }}</el-button>
</el-form-item> </el-form-item>
@ -23,23 +23,42 @@
}}</el-button> }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
<div class="div_table">
<div class="exportBtn"> <div class="exportBtn">
<el-button style=";margin-left:10px" <el-button
style="margin-left: 10px"
class="diy-button--export" class="diy-button--export"
size="small" size="small"
@click="handleExportModule()">下载核酸检测点模板</el-button> @click="handleExportModule()"
>下载核酸检测点模板</el-button
>
<el-upload style="" <el-upload
style=""
ref="upload_room" ref="upload_room"
:multiple='false' :multiple="false"
:show-file-list='false' :show-file-list="false"
:before-upload="((file)=>{beforeUpload(file)})" :before-upload="
(file) => {
beforeUpload(file);
}
"
action="" action=""
accept=".xls,.xlsx" accept=".xls,.xlsx"
:http-request="(()=>{uploadFile()})"> :http-request="
<el-button style="margin-left:10px" () => {
uploadFile();
}
"
>
<el-button
style="margin-left: 10px"
size="small" size="small"
class="diy-button--delete">导入核酸监测点数据</el-button> class="diy-button--delete"
>导入核酸监测点数据</el-button
>
</el-upload> </el-upload>
</div> </div>
<el-table <el-table
@ -118,6 +137,7 @@
@current-change="pageCurrentChangeHandle" @current-change="pageCurrentChangeHandle"
> >
</el-pagination> </el-pagination>
</div>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<el-dialog <el-dialog
:visible.sync="addOrUpdateVisible" :visible.sync="addOrUpdateVisible"
@ -132,7 +152,6 @@
></add-or-update> ></add-or-update>
</el-dialog> </el-dialog>
</div> </div>
</el-card>
</template> </template>
<script> <script>
@ -159,17 +178,16 @@ export default {
}, },
methods: { methods: {
handleExportModule() { handleExportModule() {
let title = '核酸检测点模板' let title = "核酸检测点模板";
let url = "/epmetuser/icPointNucleicMonitoring/exporttemplate" let url = "/epmetuser/icPointNucleicMonitoring/exporttemplate";
let params = {} let params = {};
app.ajax.exportFilePost( app.ajax.exportFilePost(
url, url,
params, params,
(data, rspMsg) => { (data, rspMsg) => {
this.download(data, title + ".xls");
this.download(data, title + '.xls')
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.$message.error(rspMsg); this.$message.error(rspMsg);
@ -180,50 +198,53 @@ export default {
beforeUpload(file) { beforeUpload(file) {
this.files = file; this.files = file;
const isText = file.type === 'application/vnd.ms-excel' const isText = file.type === "application/vnd.ms-excel";
const isTextComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' const isTextComputer =
file.type ===
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
if (!isText && !isTextComputer) { if (!isText && !isTextComputer) {
this.$message.error('请选择正确格式的文件') this.$message.error("请选择正确格式的文件");
this.files = null this.files = null;
this.fileName = '' this.fileName = "";
return false return false;
} else { } else {
this.fileName = file.name; this.fileName = file.name;
return true return true;
} }
}, },
async uploadFile() { async uploadFile() {
if (this.fileName == "") { if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!') this.$message.warning("请选择要上传的文件!");
return false return false;
} }
this.$message({ this.$message({
showClose: true, showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度', message: "导入中,请到系统管理-导入记录中查看进度",
duration: 0 duration: 0,
}) });
// //
let url = '' let url = "";
let fileFormData = new FormData(); let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip fileFormData.append("file", this.files); //filenamefiletest.zip
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip fileFormData.append("orgId", this.agencyObj.id); //filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level === 'grid' ? 'grid' : 'agency');//filenamefiletest.zip fileFormData.append(
"orgType",
this.agencyObj.level === "grid" ? "grid" : "agency"
); //filenamefiletest.zip
this.$refs['upload_room'].clearFiles() this.$refs["upload_room"].clearFiles();
url = '/epmetuser/icPointNucleicMonitoring/pointNucleicMonitoringImport' url = "/epmetuser/icPointNucleicMonitoring/pointNucleicMonitoringImport";
this.importRoomLoading = true this.importRoomLoading = true;
window.app.ajax.post2(url, fileFormData, window.app.ajax.post2(
url,
fileFormData,
(data, rspMsg) => { (data, rspMsg) => {
if (data.code === 0 && data.msg == "success") {
if (data.code === 0 && data.msg == 'success') {
// this.$message.success('') // this.$message.success('')
} else { } else {
// this.$message({ // this.$message({
@ -234,26 +255,35 @@ export default {
// }) // })
// this.$message.error(rspMsg) // this.$message.error(rspMsg)
} }
this.$emit('refreshTree') this.$emit("refreshTree");
this.loadTable() this.loadTable();
// this.showMessage(rspMsg) // this.showMessage(rspMsg)
this.importRoomLoading = false this.importRoomLoading = false;
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.importRoomLoading = false this.importRoomLoading = false;
// this.$message.error(rspMsg) // this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } })
}, },
} { headers: { "Content-Type": "multipart/form-data" } }
);
},
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManage.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.exportBtn { .exportBtn {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
} }
.div_left_table {
margin-top: 10px;
margin-left: 15px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
}
</style> </style>

124
src/views/modules/plugins/point/icpointvaccinesinoculation.vue

@ -1,6 +1,6 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <div class="div_main">
<div class="mod-user__icPointVaccinesInoculation}"> <div class="div_search">
<el-form <el-form
:inline="true" :inline="true"
:model="dataForm" :model="dataForm"
@ -10,10 +10,10 @@
<el-input v-model="dataForm.id" placeholder="id" clearable></el-input> <el-input v-model="dataForm.id" placeholder="id" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="getDataList()">{{ $t("query") }}</el-button> <el-button class="diy-button--search" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ <el-button class="diy-button--add" type="primary" @click="addOrUpdateHandle()">{{
$t("add") $t("add")
}}</el-button> }}</el-button>
</el-form-item> </el-form-item>
@ -23,23 +23,41 @@
}}</el-button> }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
<div class="div_table">
<div class="exportBtn"> <div class="exportBtn">
<el-button style=";margin-left:10px" <el-button
style="margin-left: 10px"
class="diy-button--export" class="diy-button--export"
size="small" size="small"
@click="handleExportModule()">下载疫苗接种点模板</el-button> @click="handleExportModule()"
>下载疫苗接种点模板</el-button
>
<el-upload style="" <el-upload
style=""
ref="upload_room" ref="upload_room"
:multiple='false' :multiple="false"
:show-file-list='false' :show-file-list="false"
:before-upload="((file)=>{beforeUpload(file)})" :before-upload="
(file) => {
beforeUpload(file);
}
"
action="" action=""
accept=".xls,.xlsx" accept=".xls,.xlsx"
:http-request="(()=>{uploadFile()})"> :http-request="
<el-button style="margin-left:10px" () => {
uploadFile();
}
"
>
<el-button
style="margin-left: 10px"
size="small" size="small"
class="diy-button--delete">导入疫苗接种点数据</el-button> class="diy-button--delete"
>导入疫苗接种点数据</el-button
>
</el-upload> </el-upload>
</div> </div>
<el-table <el-table
@ -160,6 +178,7 @@
@current-change="pageCurrentChangeHandle" @current-change="pageCurrentChangeHandle"
> >
</el-pagination> </el-pagination>
</div>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<el-dialog <el-dialog
:visible.sync="addOrUpdateVisible" :visible.sync="addOrUpdateVisible"
@ -174,7 +193,6 @@
></add-or-update> ></add-or-update>
</el-dialog> </el-dialog>
</div> </div>
</el-card>
</template> </template>
<script> <script>
@ -201,17 +219,16 @@ export default {
}, },
methods: { methods: {
handleExportModule() { handleExportModule() {
let title = '疫苗接种点模板' let title = "疫苗接种点模板";
let url = "/epmetuser/icPointNucleicMonitoring/exporttemplate" let url = "/epmetuser/icPointNucleicMonitoring/exporttemplate";
let params = {} let params = {};
app.ajax.exportFilePost( app.ajax.exportFilePost(
url, url,
params, params,
(data, rspMsg) => { (data, rspMsg) => {
this.download(data, title + ".xls");
this.download(data, title + '.xls')
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.$message.error(rspMsg); this.$message.error(rspMsg);
@ -222,50 +239,53 @@ export default {
beforeUpload(file) { beforeUpload(file) {
this.files = file; this.files = file;
const isText = file.type === 'application/vnd.ms-excel' const isText = file.type === "application/vnd.ms-excel";
const isTextComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' const isTextComputer =
file.type ===
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
if (!isText && !isTextComputer) { if (!isText && !isTextComputer) {
this.$message.error('请选择正确格式的文件') this.$message.error("请选择正确格式的文件");
this.files = null this.files = null;
this.fileName = '' this.fileName = "";
return false return false;
} else { } else {
this.fileName = file.name; this.fileName = file.name;
return true return true;
} }
}, },
async uploadFile() { async uploadFile() {
if (this.fileName == "") { if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!') this.$message.warning("请选择要上传的文件!");
return false return false;
} }
this.$message({ this.$message({
showClose: true, showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度', message: "导入中,请到系统管理-导入记录中查看进度",
duration: 0 duration: 0,
}) });
// //
let url = '' let url = "";
let fileFormData = new FormData(); let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip fileFormData.append("file", this.files); //filenamefiletest.zip
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip fileFormData.append("orgId", this.agencyObj.id); //filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level === 'grid' ? 'grid' : 'agency');//filenamefiletest.zip fileFormData.append(
"orgType",
this.agencyObj.level === "grid" ? "grid" : "agency"
); //filenamefiletest.zip
this.$refs['upload_room'].clearFiles() this.$refs["upload_room"].clearFiles();
url = '/epmetuser/icPointNucleicMonitoring/pointNucleicMonitoringImport' url = "/epmetuser/icPointNucleicMonitoring/pointNucleicMonitoringImport";
this.importRoomLoading = true this.importRoomLoading = true;
window.app.ajax.post2(url, fileFormData, window.app.ajax.post2(
url,
fileFormData,
(data, rspMsg) => { (data, rspMsg) => {
if (data.code === 0 && data.msg == "success") {
if (data.code === 0 && data.msg == 'success') {
// this.$message.success('') // this.$message.success('')
} else { } else {
// this.$message({ // this.$message({
@ -276,20 +296,20 @@ export default {
// }) // })
// this.$message.error(rspMsg) // this.$message.error(rspMsg)
} }
this.$emit('refreshTree') this.$emit("refreshTree");
this.loadTable() this.loadTable();
// this.showMessage(rspMsg) // this.showMessage(rspMsg)
this.importRoomLoading = false this.importRoomLoading = false;
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.importRoomLoading = false this.importRoomLoading = false;
// this.$message.error(rspMsg) // this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } })
}, },
} { headers: { "Content-Type": "multipart/form-data" } }
);
},
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

Loading…
Cancel
Save