feat: add "导入" and modify title , icon

This commit is contained in:
ruofei.yu 2025-09-05 20:46:54 +08:00
parent efba375d59
commit b874f3a316
6 changed files with 880 additions and 772 deletions

View File

@ -11,7 +11,7 @@
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<!-- <script src="https://cdn.jsdelivr.net/gh/WangYuLue/image-conversion/build/conversion.js"></script> --> <!-- <script src="https://cdn.jsdelivr.net/gh/WangYuLue/image-conversion/build/conversion.js"></script> -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>江西心诚药业有限公司</title> <title>工业互联网平台</title>
</head> </head>
<body> <body>

View File

@ -19,6 +19,9 @@ const yxkAPI = {
params: param, params: param,
responseType: "blob" responseType: "blob"
}); });
} },
autoGenerate(param) {
return axiosJson.get(`${base.url}/apis/deviceOperation/autoGenerate`, { params: param });
},
}; };
export default yxkAPI; export default yxkAPI;

View File

@ -111,6 +111,17 @@ export default {
imgShow: 0 imgShow: 0
}; };
}, },
async created() {
// companyInfo
await this.ensureCompanyInfo();
const info = this.$store.state.common.companyInfo;
if (info && info.name) {
document.title = info.name;
}
if (info && info.favicon) {
this.setFavicon(info.logoUrl);
}
},
computed: { computed: {
//query //query
key() { key() {
@ -151,8 +162,21 @@ export default {
}, },
methods: { methods: {
...mapActions({ ...mapActions({
getLogoUrl: "common/getLogoUrl" getLogoUrl: "common/getLogoUrl",
}), }),
async ensureCompanyInfo() {
if (!this.$store.state.common.companyInfo ||
!this.$store.state.common.companyInfo.name) {
for (let i = 0; i < 10; i++) {
await new Promise(resolve => setTimeout(resolve, 100));
if (this.$store.state.common.companyInfo &&
this.$store.state.common.companyInfo.name) {
break;
}
}
}
},
// 线 // 线
changeMenu() { changeMenu() {
this.isShow = true; this.isShow = true;
@ -206,7 +230,16 @@ export default {
}, },
notreadnum(newv) { notreadnum(newv) {
this.thisNotRedNum = newv; this.thisNotRedNum = newv;
},
'$store.state.common.companyInfo': {
handler(newVal) {
if (newVal && newVal.name) {
document.title = newVal.name;
}
},
immediate: true
} }
} }
}; };
</script> </script>

View File

@ -55,6 +55,9 @@ export default {
companyInfo: state => state.common.companyInfo companyInfo: state => state.common.companyInfo
}), }),
}, },
created() {
document.title = '登录'
},
methods: { methods: {
...mapActions({ ...mapActions({
login: "auth/loginByUser", login: "auth/loginByUser",

View File

@ -47,10 +47,13 @@
<el-date-picker v-model="search_data.yf" type="month" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker v-model="search_data.yf" type="month" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
<div class="form_item_btn_out"> <div class="form_item_btn_out" >
<el-form-item> <el-form-item>
<el-button type="primary" @click="search()">查询</el-button> <el-button type="primary" @click="search()">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" @click="dialogVisible = true">导入</el-button>
</el-form-item>
</div> </div>
</el-form> </el-form>
</div> </div>
@ -78,6 +81,31 @@
:current-page="search_data.pageno" :page-sizes="pageSizes" :page-size="search_data.pagesize" :current-page="search_data.pageno" :page-sizes="pageSizes" :page-size="search_data.pagesize"
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div> </div>
<el-dialog
title="导入"
:visible.sync="dialogVisible"
width="45%"
>
<el-form ref="form" label-width="80px">
<el-form-item label="选择时间">
<el-date-picker
v-model="choiceDate"
type="datetimerange"
:picker-options="pickerOptions"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
align="right">
</el-date-picker>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" style="padding-right: 20px;box-sizing: border-box;">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="queryAutoGenerate"> </el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
@ -93,6 +121,8 @@ export default {
name: "ydnfx", name: "ydnfx",
data() { data() {
return { return {
choiceDate:'',
dialogVisible:false,
total: 0, // total: 0, //
pageSizes: [10, 20, 50], // pageSizes: [10, 20, 50], //
search_data: { search_data: {
@ -103,7 +133,33 @@ export default {
planTime: "", planTime: "",
statusList: [], // statusList: [], //
getUserList: [], // getUserList: [], //
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
btnDelDisabled: true, btnDelDisabled: true,
btnOtherDisabled: true, btnOtherDisabled: true,
chooseUserVisible: false, chooseUserVisible: false,
@ -130,6 +186,19 @@ export default {
}, },
methods: { methods: {
async queryAutoGenerate(){
console.log(this.choiceDate)
const res = await this.$api.yxkAPI.autoGenerate({startTime:this.choiceDate[0],endTime:this.choiceDate[1]}).catch(()=>{
this.dialogVisible = false
})
if(res.code===0){
this.$message.success("操作成功")
this.dialogVisible = false
}else{
this.$message.error(res.msg)
this.dialogVisible = false
}
},
async initChart(){ async initChart(){
const res = await this.$api.yxkAPI const res = await this.$api.yxkAPI
.yxkPost('/apis/hl/nhfx/bt', this.search_data) .yxkPost('/apis/hl/nhfx/bt', this.search_data)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB