Browse Source

fix:修改样式

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

190
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
class="diy-button--export" style="margin-left: 10px"
size="small" class="diy-button--export"
@click="handleExportModule()">下载核酸检测点模板</el-button> size="small"
@click="handleExportModule()"
>下载核酸检测点模板</el-button
>
<el-upload style="" <el-upload
ref="upload_room" style=""
:multiple='false' ref="upload_room"
:show-file-list='false' :multiple="false"
:before-upload="((file)=>{beforeUpload(file)})" :show-file-list="false"
action="" :before-upload="
accept=".xls,.xlsx" (file) => {
:http-request="(()=>{uploadFile()})"> beforeUpload(file);
<el-button style="margin-left:10px" }
size="small" "
class="diy-button--delete">导入核酸监测点数据</el-button> action=""
accept=".xls,.xlsx"
:http-request="
() => {
uploadFile();
}
"
>
<el-button
style="margin-left: 10px"
size="small"
class="diy-button--delete"
>导入核酸监测点数据</el-button
>
</el-upload> </el-upload>
</div> </div>
<el-table <el-table
@ -118,21 +137,21 @@
@current-change="pageCurrentChangeHandle" @current-change="pageCurrentChangeHandle"
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<el-dialog
:visible.sync="addOrUpdateVisible"
:title="!dataForm.id ? $t('add') : $t('update')"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
>
<add-or-update
ref="addOrUpdate"
@refreshDataList="getDataList"
></add-or-update>
</el-dialog>
</div> </div>
</el-card> <!-- 弹窗, 新增 / 修改 -->
<el-dialog
:visible.sync="addOrUpdateVisible"
:title="!dataForm.id ? $t('add') : $t('update')"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
>
<add-or-update
ref="addOrUpdate"
@refreshDataList="getDataList"
></add-or-update>
</el-dialog>
</div>
</template> </template>
<script> <script>
@ -157,19 +176,18 @@ export default {
components: { components: {
AddOrUpdate, AddOrUpdate,
}, },
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);
@ -177,53 +195,56 @@ 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>
.exportBtn{ @import "@/assets/scss/modules/visual/communityManage.scss";
display: flex; @import "@/assets/scss/modules/management/list-main.scss";
align-items: center; .exportBtn {
margin-bottom: 20px; display: flex;
} align-items: center;
margin-bottom: 20px;
}
.div_left_table {
margin-top: 10px;
margin-left: 15px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
}
</style> </style>

180
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
class="diy-button--export" style="margin-left: 10px"
size="small" class="diy-button--export"
@click="handleExportModule()">下载疫苗接种点模板</el-button> size="small"
@click="handleExportModule()"
>下载疫苗接种点模板</el-button
>
<el-upload style="" <el-upload
ref="upload_room" style=""
:multiple='false' ref="upload_room"
:show-file-list='false' :multiple="false"
:before-upload="((file)=>{beforeUpload(file)})" :show-file-list="false"
action="" :before-upload="
accept=".xls,.xlsx" (file) => {
:http-request="(()=>{uploadFile()})"> beforeUpload(file);
<el-button style="margin-left:10px" }
size="small" "
class="diy-button--delete">导入疫苗接种点数据</el-button> action=""
accept=".xls,.xlsx"
:http-request="
() => {
uploadFile();
}
"
>
<el-button
style="margin-left: 10px"
size="small"
class="diy-button--delete"
>导入疫苗接种点数据</el-button
>
</el-upload> </el-upload>
</div> </div>
<el-table <el-table
@ -160,21 +178,21 @@
@current-change="pageCurrentChangeHandle" @current-change="pageCurrentChangeHandle"
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<el-dialog
:visible.sync="addOrUpdateVisible"
:title="!dataForm.id ? $t('add') : $t('update')"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
>
<add-or-update
ref="addOrUpdate"
@refreshDataList="getDataList"
></add-or-update>
</el-dialog>
</div> </div>
</el-card> <!-- 弹窗, 新增 / 修改 -->
<el-dialog
:visible.sync="addOrUpdateVisible"
:title="!dataForm.id ? $t('add') : $t('update')"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
>
<add-or-update
ref="addOrUpdate"
@refreshDataList="getDataList"
></add-or-update>
</el-dialog>
</div>
</template> </template>
<script> <script>
@ -199,19 +217,18 @@ export default {
components: { components: {
AddOrUpdate, AddOrUpdate,
}, },
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);
@ -219,53 +236,56 @@ 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,26 +296,26 @@ 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>
.exportBtn{ .exportBtn {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
} }
</style> </style>

Loading…
Cancel
Save