Browse Source

fix:修改样式

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

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

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

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

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

Loading…
Cancel
Save