Compare commits

..

37 Commits

Author SHA1 Message Date
‘937886381’
35fb0d8bfb Merge branch 'projects/line-new' into projects/line-new-zhp 2025-12-24 16:35:44 +08:00
‘937886381’
0c52306cc6 修改 2025-12-24 16:34:37 +08:00
a5fba28ff7 Merge pull request 'projects/line-new-zhp' (#468) from projects/line-new-zhp into projects/line-new
Reviewed-on: #468
2025-12-23 08:53:19 +08:00
‘937886381’
1f8b994218 Merge branch 'projects/line-new' into projects/line-new-zhp 2025-12-23 08:49:07 +08:00
‘937886381’
ccfa73f3bc xiugai 2025-12-23 08:46:44 +08:00
‘937886381’
89ff79bfd7 修改 2025-12-23 08:35:46 +08:00
70a0fbb170 Merge pull request 'projects/line-new-zhp' (#466) from projects/line-new-zhp into projects/line-new
Reviewed-on: #466
2025-12-17 16:30:30 +08:00
‘937886381’
c86d94ac92 修改 2025-12-17 16:26:21 +08:00
‘937886381’
484ba6ca53 Merge branch 'projects/line-new' into projects/line-new-zhp 2025-12-15 10:45:49 +08:00
‘937886381’
f403375594 修改bug 2025-12-15 10:45:06 +08:00
1cd0b13aae Merge pull request 'projects/line-new-zhp' (#463) from projects/line-new-zhp into projects/line-new
Reviewed-on: #463
2025-12-12 16:54:55 +08:00
‘937886381’
d2b0565cd1 Merge branch 'projects/line-new' into projects/line-new-zhp 2025-12-12 16:53:32 +08:00
‘937886381’
7661dc5691 修改 2025-12-12 16:52:45 +08:00
1d698848c2 Merge pull request 'projects/line-new-zhp' (#461) from projects/line-new-zhp into projects/line-new
Reviewed-on: #461
2025-12-12 14:18:34 +08:00
‘937886381’
6d367b121c Merge branch 'projects/line-new' into projects/line-new-zhp 2025-12-12 14:17:56 +08:00
‘937886381’
e2385cf813 修改 2025-12-12 14:17:21 +08:00
552b1e6d6a Merge pull request '更新' (#460) from projects/line-new-zwq into projects/line-new
Reviewed-on: #460
2025-12-11 12:52:11 +08:00
zwq
4383067eb1 更新 2025-12-11 12:51:41 +08:00
f80644e07c Merge pull request 'projects/line-new-zhp' (#458) from projects/line-new-zhp into projects/line-new
Reviewed-on: #458
2025-12-09 17:03:35 +08:00
‘937886381’
1e12b653d6 Merge branch 'projects/line-new' into projects/line-new-zhp 2025-12-09 16:59:54 +08:00
‘937886381’
b7ba173ca3 修改 2025-12-09 16:57:38 +08:00
c203f1e1dd Merge pull request 'projects/line-new-zhp' (#457) from projects/line-new-zhp into projects/line-new
Reviewed-on: #457
2025-12-09 13:11:32 +08:00
‘937886381’
ccb925003e Merge branch 'projects/line-new' into projects/line-new-zhp 2025-12-09 13:10:45 +08:00
‘937886381’
b9f286005c 生产 2025-12-09 13:07:09 +08:00
0e343279ac Merge pull request '更新' (#456) from projects/line-new-zwq into projects/line-new
Reviewed-on: #456
2025-12-01 14:52:38 +08:00
zwq
00ac3dec45 更新 2025-12-01 14:52:21 +08:00
a84f765e73 Merge pull request '班组bug' (#455) from projects/line-new-zwq into projects/line-new
Reviewed-on: #455
2025-11-28 16:29:25 +08:00
zwq
ffa0b2e8dd 班组bug 2025-11-28 16:29:06 +08:00
1e6c6c5656 Merge pull request '班组bug' (#448) from projects/line-new-zwq into projects/line-new
Reviewed-on: #448
2025-11-11 15:38:56 +08:00
zwq
0e76fe7dbf 班组bug 2025-11-11 15:38:31 +08:00
399e2bc965 Merge pull request '更新班组' (#447) from projects/line-new-zwq into projects/line-new
Reviewed-on: #447
2025-11-05 13:58:22 +08:00
zwq
7bee1f7863 更新班组 2025-11-05 13:57:58 +08:00
0e1e813dc2 Merge pull request '更新班组' (#446) from projects/line-new-zwq into projects/line-new
Reviewed-on: #446
2025-10-30 13:39:06 +08:00
zwq
c9c8f82910 更新 2025-10-30 13:37:52 +08:00
d859ba62c8 Merge pull request '更新班组' (#446) from projects/line-new-zwq into projects/line-new
Reviewed-on: #446
2025-10-24 11:43:01 +08:00
zwq
31bafae4aa 更新班组 2025-10-24 11:42:24 +08:00
67b6b88863 Merge pull request 'projects/line-new-zhp' (#445) from projects/line-new-zhp into projects/line-new
Reviewed-on: #445
2025-10-24 11:21:24 +08:00
109 changed files with 25543 additions and 11347 deletions

View File

@@ -12,8 +12,10 @@ ENV = 'development'
VUE_APP_TITLE = 智能监控分析系统
# 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://192.168.8.22:48080'
VUE_APP_BASE_API = 'http://172.16.33.65:48082'
# VUE_APP_BASE_API = 'http://172.16.33.187:48082'
VUE_APP_BASE_API = 'http://line.kszny.picaiba.com'
# VUE_APP_BASE_API = 'http://172.16.32.79:48082'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

BIN
dist.zip Normal file

Binary file not shown.

View File

@@ -6,7 +6,7 @@
"license": "MIT",
"scripts": {
"local": "vue-cli-service serve --mode local",
"dev": "vue-cli-service serve --mode dev",
"dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode dev",
"front": "vue-cli-service serve --mode front",
"build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode prod",
"build:stage": "vue-cli-service build --mode stage",
@@ -49,7 +49,7 @@
"bpmn-js-token-simulation": "0.10.0",
"chinese-lunar": "^0.1.4",
"clipboard": "2.0.8",
"code-brick-zj": "^1.0.2",
"code-brick-zj": "^1.1.1",
"core-js": "^3.26.0",
"crypto-js": "^4.0.0",
"diagram-js": "^12.3.0",

View File

@@ -59,3 +59,34 @@ export function getEquipmentAll() {
method: 'get'
})
}
export function getTree(query) {
return request({
url: '/base/factory/getTreeSimple',
method: 'get',
params: query,
});
}
export function getEquipmentOverall(data) {
return request({
url: '/monitoring/equipment-overall/get',
method: 'post',
data: data,
});
}
export function getParamMonitor(data) {
return request({
url: '/monitoring/equipment-monitor/paramMonitor',
method: 'post',
data: data,
});
}
export function getAlarmDet(data) {
return request({
url: 'monitoring/equipment-overall/alarmDet',
method: 'post',
data: data,
});
}

View File

@@ -52,3 +52,5 @@ export function exportEquipmentTypeExcel(query) {
responseType: 'blob'
})
}

View File

@@ -50,6 +50,15 @@ export function getPdlAutoReportNewSearchNow(data) {
});
}
export function getPdlAutoReportNewSearchLastGroup(data) {
return request({
url: '/monitoring/production-monitor/getPdlAutoReportNewSearchLastGroup',
method: 'post',
data: data,
timeout: 60000,
});
}
// 班组自动报表分页
export function getTeamReportPage(data) {
@@ -93,3 +102,17 @@ export function getProcessAutoReportNew(data) {
data: data,
});
}
export function getPLlistByFactory(data) {
return request({
url: 'base/production-line/listByFactory',
method: 'post',
data: data,
});
}
export function getProcessAutoReportLastGroup(data) {
return request({
url: '/monitoring/production-monitor/getProcessAutoReportLastGroup',
method: 'post',
data: data,
});
}

View File

@@ -57,7 +57,66 @@ export function listByDeptId(id) {
method: 'get'
})
}
// 作废计划
export function disablePlan(id) {
return request({
url: '/base/group-scheduling-plan/disablePlan?id='+id,
method: 'delete',
})
}
// 同步节假日
export function updateScheduleLater(data) {
return request({
url: '/base/group-holiday/updateScheduleLater',
method: 'post',
data:data
})
}
// 复制计划
export function copyPlan(id) {
return request({
url: '/base/group-scheduling-plan/copyPlan?id='+id,
method: 'get'
})
}
// 列表草稿编辑
export function draftEditing(id) {
return request({
url: '/base/group-scheduling-plan/draftEditing?id='+id,
method: 'get'
})
}
// 排班计划-详情
export function getPlan(id) {
return request({
url: '/base/group-scheduling-plan/get?id='+id,
method: 'get'
})
}
// 弹窗-取消
export function cancelStepThree(id) {
return request({
url: '/base/group-scheduling-plan/cancelStepThree?id='+id,
method: 'delete',
})
}
// 第三步确认并执行 检查计划时间是否冲突,如果有,返回冲突的计划列表
export function checkPlan(data) {
return request({
url: '/base/group-scheduling-plan/checkPlan',
method: 'post',
data:data
})
}
// 第三步确认并执行 执行
export function createStepFour(id) {
return request({
url: '/base/group-scheduling-plan/createStepFour',
method: 'post',
data:id
})
}
// 班组班次下一步至获取预览
export function createStepTwo(data) {
return request({
@@ -73,3 +132,22 @@ export function returnStepTwo(id) {
method: 'delete',
})
}
// 第三步获取预览
export function getPerView(data) {
return request({
url: '/base/group-scheduling-plan/getPerView',
method: 'post',
data:data
})
}
// 导出 Excel
export function exportExcel(query) {
return request({
url: '/base/group-scheduling-plan/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

18
src/api/group/calendar.js Normal file
View File

@@ -0,0 +1,18 @@
import request from '@/utils/request'
// 获取部门及下级部门排班list
export function getDeptSchedulingList(data) {
return request({
url: '/base/group-team-scheduling/getDeptSchedulingList',
method: 'post',
data: data
})
}
// 某个班组的排班list
export function getClassSchedulingList(data) {
return request({
url: '/base/group-team-scheduling/getClassSchedulingList',
method: 'post',
data: data
})
}

View File

@@ -26,6 +26,13 @@ export function getGroup(id) {
method: 'get'
})
}
// 检查更新-生产班组
export function updateIsProduction(id) {
return request({
url: '/base/group-team/updateIsProduction?id=' + id,
method: 'get'
})
}
// 获得班组基础信息分页
export function getGroupPage(query) {

View File

@@ -2,19 +2,28 @@
* @Author: zwq
* @Date: 2025-10-18 21:24:37
* @LastEditors: zwq
* @LastEditTime: 2025-10-18 23:07:37
* @LastEditTime: 2025-10-22 14:34:29
* @Description:
*/
import request from '@/utils/request'
// 获得节假日基础信息分页
export function deptHolidayList(query) {
export function deptHolidayPage(query) {
return request({
url: '/base/group-holiday/page',
method: 'get',
params: query
})
}
// 获得部门节假日信息
export function deptHolidayList(data) {
return request({
url: '/base/group-holiday/deptHolidayList',
method: 'post',
data: data
})
}
// 创建节假日基础信息
export function createHoliday(data) {
@@ -24,6 +33,14 @@ export function createHoliday(data) {
data: data
})
}
// 节假日操作后直接更新排班日历
export function updateSchedule(data) {
return request({
url: '/base/group-holiday/updateSchedule',
method: 'post',
data: data
})
}
// 更新节假日基础信息
export function updateHoliday(data) {
@@ -33,14 +50,30 @@ export function updateHoliday(data) {
data: data
})
}
// 删除节假日基础信息前校验是否影响排班
export function checkDeleteHoliday(id) {
return request({
url: '/base/group-holiday/checkDelete?id=' + id,
method: 'delete'
})
}
// 删除
export function deleteHolidayn(id) {
export function deleteHoliday(id) {
return request({
url: '/base/group-holiday/delete?id=' + id,
method: 'delete'
})
}
// 获得节假日基础信息
export function getHoliday(id) {
return request({
url: '/base/group-holiday/get?id=' + id,
method: 'get'
})
}
// 获得节假日变动日志分页
export function deptHolidayLogList(query) {
return request({
@@ -49,3 +82,37 @@ export function deptHolidayLogList(query) {
params: query
})
}
// 获得用户本人及以下的部门扁平化结构
export function getEnableData() {
return request({
url: '/base/group-team-scheduling/getEnableData',
method: 'get',
})
}
// 解除继承节假日
export function disExtends(data) {
return request({
url: '/base/group-holiday/disExtends',
method: 'post',
data: data
})
}
// 恢复继承节假日
export function reExtends(data) {
return request({
url: '/base/group-holiday/reExtends',
method: 'post',
data: data
})
}
// 获得部门节假日继承设置信息设置
export function getSet(query) {
return request({
url: '/base/group-holiday-dept-set/getSet',
method: 'get',
params: query
})
}

View File

@@ -0,0 +1,56 @@
import request from '@/utils/request'
// 创建能源监控配置
export function getDefectSummaryTable(data) {
return request({
url: '/extend/check-gaozhun-record/defectSummaryTable',
method: 'post',
data: data,
});
}
export function getTranslucentPage(data) {
return request({
url: '/monitoring/translucent/page',
method: 'get',
params: data,
});
}
export function exportTranslucent(data) {
return request({
url: '/monitoring/translucent/export-excel',
method: 'get',
params: data,
responseType: 'blob',
});
}
export function getDefectAnalysis(data) {
return request({
url: '/extend/check-gaozhun-record/defectAnalysis',
method: 'post',
data: data,
});
}
export function getSectionDefect(data) {
return request({
url: '/extend/check-gaozhun-record/sectionDefect',
method: 'post',
data: data,
});
}
export function getDefectSummaryChart(data) {
return request({
url: '/extend/check-gaozhun-record/defectSummaryChart',
method: 'post',
data: data,
});
}
export function getDefectSummaryDet(data) {
return request({
url: '/extend/check-gaozhun-record/defectSummaryDet',
method: 'post',
data: data,
});
}

View File

@@ -0,0 +1,63 @@
/*
* @Author: zhp
* @Date: 2023-12-08 15:26:59
* @LastEditTime: 2023-12-11 15:21:44
* @LastEditors: zhp
* @Description:
*/
import request from '@/utils/request'
export function getQualityIsraPage(query) {
return request({
url: '/extend/check-isra-statistics/getIsraData',
method: 'get',
params: query,
});
}
export function getQualityIsraDayMap(query) {
return request({
url: '/base/quality-isra-statistics/dayMap',
method: 'get',
params: query
})
}
export function getQualityIsraWeekMap(query) {
return request({
url: '/base/quality-isra-statistics/weekMap',
method: 'get',
params: query
})
}
export function getQualityIsraMonthMap(query) {
return request({
url: '/base/quality-isra-statistics/monthMap',
method: 'get',
params: query
})
}
export function getQualityIsraDayList(query) {
return request({
url: '/base/quality-isra-statistics/dayList',
method: 'get',
params: query
})
}
export function getQualityIsraWeekList(query) {
return request({
url: '/base/quality-isra-statistics/weekList',
method: 'get',
params: query
})
}
export function getQualityIsraMonthList(query) {
return request({
url: '/base/quality-isra-statistics/monthList',
method: 'get',
params: query
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/assets/img/home-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

View File

@@ -54,7 +54,7 @@ export default {
};
},
created() {
this.currentMenu = this.menus[0];
// this.currentMenu = this.menus[0];
},
watch: {
currentMenu(val) {

View File

@@ -6,104 +6,48 @@
-->
<template>
<el-form
ref="form"
:model="form"
:label-width="`${labelWidth}px`"
:size="size"
:label-position="labelPosition"
v-loading="formLoading">
<el-row :gutter="20" v-for="(row, rindex) in rows" :key="rindex">
<el-col v-for="col in row" :key="col.label" :span="24 / row.length">
<el-form-item :label="col.label" :prop="col.prop" :rules="col.rules">
<el-input
v-if="col.input"
v-model="form[col.prop]"
@change="$emit('update', form)"
:placeholder="`请输入${col.label}`"
v-bind="col.bind" />
<el-input
v-if="col.textarea"
type="textarea"
v-model="form[col.prop]"
@change="$emit('update', form)"
:placeholder="`请输入${col.label}`"
v-bind="col.bind" />
<el-select
v-if="col.select"
v-model="form[col.prop]"
:placeholder="`请选择${col.label}`"
@change="$emit('update', form)"
v-bind="col.bind">
<el-option
v-for="opt in optionListOf[col.prop]"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
<el-date-picker
v-if="col.datetime"
v-model="form[col.prop]"
type="datetime"
:placeholder="`请选择${col.label}`"
value-format="timestamp"
v-bind="col.bind"></el-date-picker>
<el-switch
v-if="col.switch"
v-model="form[col.prop]"
active-color="#0b58ff"
inactive-color="#e1e1e1"
v-bind="col.bind"></el-switch>
<component
v-if="col.subcomponent"
:key="col.key"
:is="col.subcomponent"
:inlineStyle="col.style"></component>
<el-form ref="form" :model="form" :label-width="`${labelWidth}px`" :size="size" :label-position="labelPosition"
v-loading="formLoading">
<el-row :gutter="20" v-for="(row, rindex) in rows" :key="rindex">
<el-col v-for="col in row" :key="col.label" :span="24 / row.length">
<el-form-item :label="col.label" :prop="col.prop" :rules="col.rules">
<el-input v-if="col.input" v-model="form[col.prop]" @change="$emit('update', form)"
:placeholder="`请输入${col.label}`" v-bind="col.bind" />
<el-input v-if="col.textarea" type="textarea" v-model="form[col.prop]" @change="$emit('update', form)"
:placeholder="`请输入${col.label}`" v-bind="col.bind" />
<el-select v-if="col.select" v-model="form[col.prop]" :placeholder="`请选择${col.label}`"
@change="$emit('update', form)" v-bind="col.bind">
<el-option v-for="opt in optionListOf[col.prop]" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select>
<el-date-picker v-if="col.datetime" v-model="form[col.prop]" type="datetime" :placeholder="`请选择${col.label}`"
value-format="timestamp" v-bind="col.bind"></el-date-picker>
<el-switch v-if="col.switch" v-model="form[col.prop]" active-color="#0b58ff" inactive-color="#e1e1e1"
v-bind="col.bind" @change="handleSwitchChange(col.prop)"></el-switch>
<component v-if="col.subcomponent" :key="col.key" :is="col.subcomponent" :inlineStyle="col.style"></component>
<div
class="upload-area"
:class="uploadOpen ? '' : 'height-48'"
ref="uploadArea"
v-if="col.upload">
<span class="close-icon" :class="uploadOpen ? 'open' : ''">
<el-button
type="text"
icon="el-icon-arrow-right"
@click="handleFilesOpen" />
</span>
<!-- :file-list="uploadedFileList" -->
<el-upload
class="upload-in-dialog"
v-if="col.upload"
:action="uploadUrl"
:headers="uploadHeaders"
:show-file-list="false"
icon="el-icon-upload2"
:before-upload="beforeUpload"
:on-success="handleUploadSuccess"
v-bind="col.bind">
<el-button size="mini" :disabled="col.bind?.disabled || false">
<svg-icon
icon-class="icon-upload"
style="color: inherit"></svg-icon>
上传文件
</el-button>
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
{{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }}
</div>
</el-upload>
<uploadedFile
class="file"
v-for="file in form[col.prop] || []"
:file="file"
:key="file.fileUrl"
@delete="handleDeleteFile(file)"
@Preview="handlePreview(file)" />
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="upload-area" :class="uploadOpen ? '' : 'height-48'" ref="uploadArea" v-if="col.upload">
<span class="close-icon" :class="uploadOpen ? 'open' : ''">
<el-button type="text" icon="el-icon-arrow-right" @click="handleFilesOpen" />
</span>
<!-- :file-list="uploadedFileList" -->
<el-upload class="upload-in-dialog" v-if="col.upload" :action="uploadUrl" :headers="uploadHeaders"
:show-file-list="false" icon="el-icon-upload2" :before-upload="beforeUpload"
:on-success="handleUploadSuccess" v-bind="col.bind">
<el-button size="mini" :disabled="col.bind?.disabled || false">
<svg-icon icon-class="icon-upload" style="color: inherit"></svg-icon>
上传文件
</el-button>
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
{{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }}
</div>
</el-upload>
<uploadedFile class="file" v-for="file in form[col.prop] || []" :file="file" :key="file.fileUrl"
@delete="handleDeleteFile(file)" @Preview="handlePreview(file)" />
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
@@ -134,7 +78,8 @@ const uploadedFile = {
data() {
return {};
},
methods: {
methods: {
handleDelete() {
this.$emit('delete', this.file);
},
@@ -251,7 +196,12 @@ export default {
// 处理 options
this.handleOptions();
},
methods: {
methods: {
handleSwitchChange(prop) {
// 触发 update 事件,将最新的 form 数据传递给父组件
this.$emit('update', { ...this.form });
console.log(`switch ${prop} 变化:`, this.form[prop]);
},
/** 模拟透传 ref */
validate(cb) {
return this.$refs.form.validate(cb);

View File

@@ -16,7 +16,7 @@ export default {
},
tableData: [], //table数据
listQuery: { //分页
pageSize: 10,
pageSize: 20,
pageNo: 1,
total: 1,
},

View File

@@ -1,10 +1,10 @@
import axios from 'axios'
import {Message, MessageBox, Notification, Loading} from 'element-ui'
import { Message, MessageBox, Notification, Loading } from 'element-ui'
import store from '@/store'
import {getAccessToken, getRefreshToken, getTenantId, setToken} from '@/utils/auth'
import { getAccessToken, getRefreshToken, getTenantId, setToken } from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import {getPath, getTenantEnable} from "@/utils/ruoyi";
import {refreshToken} from "@/api/login";
import { getPath, getTenantEnable } from "@/utils/ruoyi";
import { refreshToken } from "@/api/login";
// 需要忽略的提示。忽略后,自动 Promise.reject('error')
const ignoreMsgs = [
@@ -86,7 +86,7 @@ service.interceptors.request.use(config => {
for (const propName of Object.keys(config.params)) {
const value = config.params[propName];
const part = encodeURIComponent(propName) + '='
if (value !== null && typeof(value) !== "undefined") {
if (value !== null && typeof (value) !== "undefined") {
if (typeof value === 'object') {
for (const key of Object.keys(value)) {
let params = propName + '[' + key + ']';
@@ -104,9 +104,9 @@ service.interceptors.request.use(config => {
}
return config
}, error => {
tryHideFullScreenLoading()
console.log(error)
Promise.reject(error)
tryHideFullScreenLoading()
console.log(error)
Promise.reject(error)
})
// 响应拦截器
@@ -176,36 +176,38 @@ service.interceptors.response.use(async res => {
+ '<div>5 分钟搭建本地环境</div>',
})
return Promise.reject(new Error(msg))
} else if (code === 400) {
//【班组管理】【排班计划】提交的校验按照原型图补充完整,排班计划是否重叠code400 有两个不同的返回信息
return res.data
} else if (code !== 200) {
if (msg === '无效的刷新令牌') { // hard coding忽略这个提示直接登出
console.log(msg)
} else {
Notification.error({
title: msg
})
//【班组管理】【排班计划】提交的校验按照原型图补充完整,排班计划是否重叠code400 有两个不同的返回信息
return res.data
}
return Promise.reject('error')
} else {
return res.data
}
}, error => {
tryHideFullScreenLoading()
console.log('err' + error)
let {message} = error;
if (message === "Network Error") {
message = "后端接口连接异常";
} else if (message.includes("timeout")) {
message = "系统接口请求超时";
} else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常";
}
Message({
message: message,
type: 'error',
duration: 5 * 1000
})
return Promise.reject(error)
tryHideFullScreenLoading()
console.log('err' + error)
let { message } = error;
if (message === "Network Error") {
message = "后端接口连接异常";
} else if (message.includes("timeout")) {
message = "系统接口请求超时";
} else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常";
}
Message({
message: message,
type: 'error',
duration: 5 * 1000
})
return Promise.reject(error)
}
)
export function getBaseHeader() {
@@ -219,10 +221,10 @@ function handleAuthorized() {
if (!isRelogin.show) {
isRelogin.show = true;
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
confirmButtonText: '重新登录',
cancelButtonText: '取消',
type: 'warning'
}
confirmButtonText: '重新登录',
cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
isRelogin.show = false;
store.dispatch('LogOut').then(() => {

View File

@@ -6,35 +6,27 @@
-->
<template>
<el-drawer
:visible="visible"
:show-close="false"
:wrapper-closable="false"
class="drawer"
custom-class="mes-drawer"
:size="size || '50%'"
@closed="$emit('destroy')">
<SmallTitle slot="title">
{{
mode.includes('detail')
? '详情'
: mode.includes('edit')
? '编辑'
: '新增'
}}
</SmallTitle>
<el-drawer :visible="visible" :show-close="false" :wrapper-closable="false" class="drawer" custom-class="mes-drawer"
:size="size || '50%'" @closed="$emit('destroy')">
<SmallTitle slot="title">
{{
mode.includes('detail')
? '详情'
: mode.includes('edit')
? '编辑'
: '新增'
}}
</SmallTitle>
<div class="drawer-body flex">
<div class="drawer-body__content">
<section v-for="(section, index) in sections" :key="section.key">
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
<div class="drawer-body flex">
<div class="drawer-body__content">
<section v-for="(section, index) in sections" :key="section.key">
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
<div
class="form-part"
v-if="section.key == 'base'"
style="border-bottom: 1px solid #dfdfdf; margin-bottom: 24px">
<el-skeleton v-if="!showForm" animated />
<!-- <BaseInfoForm
<div class="form-part" v-if="section.key == 'base'"
style="border-bottom: 1px solid #dfdfdf; margin-bottom: 24px">
<el-skeleton v-if="!showForm" animated />
<!-- <BaseInfoForm
key="drawer-dialog-form"
v-if="showForm"
ref="form"
@@ -42,141 +34,87 @@
v-model="form"
:rows="formRows" /> -->
<!-- if -->
<el-row v-if="mode.includes('detail')" style="margin-bottom: 24px">
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备名
</div>
<div class="value" style="font-size: 14px">
{{ form.equipmentName }}
</div>
</el-col>
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
关联表名
</div>
<div class="value" style="font-size: 14px">
{{ form.plcName }}
</div>
</el-col>
</el-row>
<!-- else -->
<el-row v-else style="margin-bottom: 24px" :gutter="20">
<el-form ref="form" :model="form">
<el-col :span="8">
<el-form-item
class="title"
label="设备名"
style="font-size: 16px; margin: 8px 0">
<el-select
v-model="form.equipmentId"
filterable
clearable
placeholder="请选择设备">
<el-option
v-for="eq in eqList"
:key="eq.id"
:label="eq.name"
:value="eq.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
class="title"
label="设备关联表名"
style="font-size: 16px; margin: 8px 0">
<el-select
v-model="form.plcId"
filterable
clearable
placeholder="请选择关联表">
<el-option
v-for="plc in plcList"
:key="plc.id"
:label="plc.plcTableName"
:value="plc.id"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-form>
</el-row>
</div>
<!-- if -->
<el-row v-if="mode.includes('detail')" style="margin-bottom: 24px">
<el-col :span="8">
<div class="title" style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备名
</div>
<div class="value" style="font-size: 14px">
{{ form.equipmentName }}
</div>
</el-col>
<el-col :span="8">
<div class="title" style="font-weight: 700; font-size: 16px; margin: 8px 0">
关联表名
</div>
<div class="value" style="font-size: 14px">
{{ form.plcName }}
</div>
</el-col>
</el-row>
<!-- else -->
<el-row v-else style="margin-bottom: 24px" :gutter="20">
<el-form ref="form" :model="form">
<el-col :span="8">
<el-form-item class="title" label="设备名" style="font-size: 16px; margin: 8px 0">
<el-select v-model="form.equipmentId" filterable clearable placeholder="请选择设备">
<el-option v-for="eq in eqList" :key="eq.id" :label="eq.name" :value="eq.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="title" label="设备关联表名" style="font-size: 16px; margin: 8px 0">
<el-select v-model="form.plcId" filterable clearable placeholder="请选择关联表">
<el-option v-for="plc in plcList" :key="plc.id" :label="plc.plcTableName"
:value="plc.id"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-form>
</el-row>
</div>
<div
v-if="section.key == 'attrs'"
style="position: relative; margin-top: 12px">
<div
v-if="!mode.includes('detail')"
style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i>
添加参数
</el-button>
</div>
<base-table
v-loading="attrListLoading"
:table-props="section.props"
:page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10"
:table-data="list"
@emitFun="handleEmitFun">
<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
<div v-if="section.key == 'attrs'" style="position: relative; margin-top: 12px">
<div v-if="!mode.includes('detail')" style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i>
添加参数
</el-button>
</div>
<base-table v-loading="attrListLoading" :table-props="section.props" :page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10" :table-data="list" @emitFun="handleEmitFun">
<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr" -->
<method-btn
v-if="section.tableBtn && !mode.includes('detail')"
slot="handleBtn"
label="操作"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<method-btn v-if="section.tableBtn && !mode.includes('detail')" slot="handleBtn" label="操作"
:method-list="tableBtn" @clickBtn="handleTableBtnClick" />
</base-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="attrQuery.params.pageNo"
:limit.sync="attrQuery.params.pageSize"
@pagination="getAttrList" />
</div>
</section>
</div>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="attrQuery.params.pageNo"
:limit.sync="attrQuery.params.pageSize" @pagination="getAttrList" />
</div>
</section>
</div>
<div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<el-button
type="primary"
v-if="!mode.includes('detail')"
@click="handleSave">
保存
</el-button>
</div>
</div>
<div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<el-button type="primary" v-if="!mode.includes('detail')" @click="handleSave">
保存
</el-button>
</div>
</div>
<!-- 属性对话框 -->
<base-dialog
v-if="sections[1].allowAdd"
:dialogTitle="attrTitle"
:dialogVisible="attrFormVisible"
width="45%"
:append-to-body="true"
custom-class="baseDialog"
@close="closeAttrForm"
@cancel="closeAttrForm"
@confirm="submitAttrForm">
<!-- :disabled="mode.includes('detail')" -->
<DialogForm
v-if="attrFormVisible"
ref="attrForm"
v-model="attrForm"
:rows="attrRows" />
</base-dialog>
</el-drawer>
<!-- 属性对话框 -->
<base-dialog v-if="sections[1].allowAdd" :dialogTitle="attrTitle" :dialogVisible="attrFormVisible" width="45%"
:append-to-body="true" custom-class="baseDialog" @close="closeAttrForm" @cancel="closeAttrForm"
@confirm="submitAttrForm">
<!-- :disabled="mode.includes('detail')" -->
<DialogForm v-if="attrFormVisible" ref="attrForm" v-model="attrForm" :data-form="attrForm"
:rows="attrRows"
@update="handleAttrFormUpdate"/>
</base-dialog>
</el-drawer>
</template>
<script>
@@ -232,7 +170,9 @@ export default {
defaultValue: '',
description: '',
remark: '',
alarmContent: '',
alarmContent: '',
displayTip: false,
alarmTip: false,
},
attrFormVisible: false,
attrRows: [
@@ -342,7 +282,27 @@ export default {
},
],
},
],
],
[
{
switch: true,
label: '是否展示',
prop: 'displayTip',
bind: {
'active-value': true,
'inactive-value': false,
},
},
{
switch: true,
label: '超出阈值是否报警',
prop: 'alarmTip',
bind: {
'active-value': true,
'inactive-value': false,
},
},
],
[
{
input: true,
@@ -436,7 +396,24 @@ export default {
}
}
},
methods: {
methods: {
handleAttrFormUpdate(updatedForm) {
console.log('updatedForm', updatedForm);
// 只同步需要的字段,避免覆盖其他数据
this.attrForm = {
...this.attrForm,
...updatedForm,
// 确保开关值是布尔类型(双重保险)
displayTip: Boolean(updatedForm.displayTip),
alarmTip: Boolean(updatedForm.alarmTip),
collection: Number(updatedForm.collection) // 采集开关保持数字类型
};
console.log('开关值同步:', {
displayTip: this.attrForm.displayTip,
alarmTip: this.attrForm.alarmTip
});
},
handleTableBtnClick({ type, data }) {
switch (type) {
case 'edit':
@@ -502,7 +479,8 @@ export default {
name: '',
plcParamName: '',
unit: '',
collection: 1,
collection: 1,
minValue: '',
maxValue: '',
defaultValue: '',
@@ -510,7 +488,9 @@ export default {
remark: '',
equipmentParamType: '',
productionParamType: '',
alarmContent: '',
alarmContent: '',
displayTip: false,
alarmTip: false,
};
this.attrTitle = '添加参数绑定信息';
this.attrFormVisible = true;
@@ -523,8 +503,15 @@ export default {
method: 'get',
params: { id: attrId },
});
if (res.code == 0) {
this.attrForm = res.data;
if (res.code == 0) {
console.log('res.data', res.data);
this.attrForm = {
...res.data,
// // 强制转为数字类型,避免字符串类型导致绑定失败
// displayTip: Number(res.data.displayTip) || 0,
// alarmTip: Number(res.data.alarmTip) || 0
};
this.attrTitle = '编辑参数绑定信息';
this.attrFormVisible = true;
}
@@ -563,7 +550,8 @@ export default {
this.$refs['attrForm'].validate(async (valid) => {
if (!valid) {
return;
}
}
console.log('this.attrForm', this.attrForm);
const isEdit = this.attrForm.id != null;
this.attrFormSubmitting = true;
@@ -583,8 +571,9 @@ export default {
type: 'success',
duration: 1500,
onClose: () => {
this.getAttrList();
this.shouldRefreshPageView = true;
this.shouldRefreshPageView = true;
this.getAttrList();
},
});
}

View File

@@ -88,7 +88,32 @@ export default {
};
},
created() {},
methods: {
methods: {
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
// 修改的提交
if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
// 添加的提交
this.urlOptions.createURL(this.dataForm).then(response => {
if (response.code === 1001033 || response.code === 1001034) {
return this.$modal.msgError(response.msg);
}
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
},
},
};
</script>

View File

@@ -63,7 +63,7 @@
style="width: 75%"
v-model="dataForm.price"
clearable
placeholder="请输入允许留存时间" />
placeholder="请输入单价" />
{{ unit }}
</el-form-item>
</el-col>
@@ -103,7 +103,7 @@ export default {
id: null,
code: '',
materialId: '',
price: '',
price: undefined,
startTime: new Date().getTime(),
endTime: null,
remark: '',
@@ -140,17 +140,42 @@ export default {
setTimeout(this.setCode(), 1000);
}
},
setCode() {
setCode() {
console.log('this.MaterialList', this.urlOptions.dictArr.dict0);
this.MaterialList.forEach((item) => {
if (item.id === this.dataForm.materialId) {
this.dataForm.code = item.code;
this.unit =
'元/' +
this.urlOptions.dictArr.dict0.find((d) => d.value === item.unit)
this.urlOptions.dictArr.dict0.find((d) => d.value == item.unit)
.label;
}
});
},
},
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
// 修改的提交
if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
// 添加的提交
this.urlOptions.createURL(this.dataForm).then(response => {
// console.log('response',);
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
},
},
};
</script>

View File

@@ -47,15 +47,15 @@ const tableProps = [
prop: 'equipmentName',
label: '设备',
},
{
prop: 'size',
label: '规格',
showOverflowtooltip: true,
},
{
prop: 'process',
label: '产品工艺',
},
// {
// prop: 'size',
// label: '规格',
// showOverflowtooltip: true,
// },
// {
// prop: 'process',
// label: '产品工艺',
// },
{
prop: 'standardCt',
label: '标准节拍pcs/min',
@@ -128,7 +128,7 @@ export default {
this.tableData = response.data;
this.dataListLoading = false;
});
},
},
handleClick(val) {
const data = {
...this.time,

View File

@@ -64,7 +64,7 @@
<script>
import eqDetail from './eq-detail';
import { parseTime } from '../../mixins/code-filter';
import { getPdList } from '@/api/core/monitoring/auto';
import { getPLlistByFactory } from '@/api/core/monitoring/auto';
import { getNewCTNow, getNewCTCharts } from '@/api/core/analysis/index';
import { getFactoryPage } from '@/api/core/base/factory';
// import codeFilter from '../../mixins/code-filter'
@@ -134,14 +134,17 @@ export default {
type: 'select',
label: '工厂',
selectOptions: [],
param: 'factoryId',
param: 'factoryId',
collapseTags: true,
multiple: true,
onchange: true,
},
{
type: 'select',
label: '产线',
selectOptions: [],
param: 'lineId',
param: 'lineId',
collapseTags: true,
multiple: true,
},
{
@@ -232,9 +235,9 @@ export default {
return exportTableOut;
},
getPdLineList() {
getPdList().then((res) => {
this.formConfig[1].selectOptions = res.data || [];
});
// getPLlistByFactory().then((res) => {
// this.formConfig[1].selectOptions = res.data || [];
// });
const params = {
pageSize: 100,
pageNo: 1,
@@ -274,7 +277,7 @@ export default {
handleSearchBarChanged({ param, value }) {
this.listQuery.lineId = [];
this.$refs.searchBarForm.formInline.lineId = undefined;
getPdList(value).then((res) => {
getPLlistByFactory({ factoryIds: this.$refs.searchBarForm.formInline.factoryId }).then((res) => {
this.formConfig[1].selectOptions = res.data || [];
});
},

View File

@@ -1,273 +1,261 @@
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<div v-if="tableData.length">
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:max-height="tableH"
:table-data="tableData" />
<SearchBar :formConfigs="[{ label: '产品产量对比图', type: 'title' }]" />
<line-chart ref="lineChart" />
</div>
<div v-else class="no-data-bg"></div>
<!-- <pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" /> -->
</div>
<div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<div v-if="tableData.length">
<base-table v-loading="dataListLoading" :table-props="tableProps" :max-height="tableH" :table-data="tableData" />
<SearchBar :formConfigs="[{ label: '产品产量对比图', type: 'title' }]" />
<line-chart ref="lineChart" />
</div>
<div v-else class="no-data-bg"></div>
</div>
</template>
<script>
// import basicPage from '../../mixins/basic-page';
import { parseTime } from '../../mixins/code-filter';
import { getYieldAnalysisPageData } from '@/api/core/analysis/index';
import { getProductionLinePage } from '@/api/core/base/productionLine';
import lineChart from '../LineChart';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
// import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
// const tableProps = [
// // {
// // prop: 'lineName',
// // label: '产线',
// // align: 'center',
// // },
// // {
// // prop: 'sum',
// // label: '合计',
// // align: 'center',
// // },
// // {
// // prop: 'dynamicValue',
// // label: 'dynamicName',
// // align: 'center',
// // children:[
// // ]
// // }
// ];
export default {
components: {
lineChart,
},
mixins: [tableHeightMixin],
data() {
return {
urlOptions: {
getDataListURL: getYieldAnalysisPageData,
},
tableProps: [],
dataListLoading: false,
tableData: [],
listQuery: {
lineIds: [],
time: '',
},
dateLabelList: [],
optionArrUrl: [getProductionLinePage],
formConfig: [
{
type: 'select',
label: '产线',
selectOptions: [],
param: 'lineIds',
defaultSelect: [],
multiple: true,
filterable: true,
width: 200,
},
{
type: 'datePicker',
label: '时间',
dateType: 'month',
format: 'yyyy-MM',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'time',
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
],
};
},
created() {
this.getArr();
},
methods: {
getArr() {
const params = {
page: 1,
limit: 500,
};
this.optionArrUrl.forEach((item, index) => {
item(params).then((response) => {
this.formConfig[index].selectOptions = response.data.list;
// this.formConfig[0].defaultSelect = response.data.list[0].id
// this.$set(this.formConfig[0], 'defaultSelect', response.data.list[0].id)
});
});
},
getData() {
// this.listQuery.lineIds = ['1672847052717821953']
// this.listQuery.productId = val.productId;
// this.listQuery.time = '1694486098000';
this.urlOptions.getDataListURL(this.listQuery).then((res) => {
let arr = [
{
prop: 'lineName',
label: '产线',
fixed: 'left',
},
{
prop: 'sum',
label: '合计[片]',
fixed: 'left',
},
{
prop: res.data ? res.data.nameData[0].name : undefined,
label: res.data ? res.data.nameData[0].name : undefined,
align: 'center',
children: [],
},
];
// console.log(res.data.nameData.slice(1))
let xData = [];
let yAllData = [];
let lineName = [];
if (res.data) {
let tempDateList = [];
res.data.nameData.forEach((date) => {
tempDateList.push(date.name);
});
this.dateLabelList = Array.from(new Set(tempDateList));
components: {
lineChart,
},
mixins: [tableHeightMixin],
data() {
return {
urlOptions: {
getDataListURL: getYieldAnalysisPageData,
},
tableProps: [],
dataListLoading: false,
tableData: [],
listQuery: {
lineIds: [],
time: '', // 存储时间选择器的选中值(时间戳/格式化字符串,根据接口要求调整)
},
dateLabelList: [],
optionArrUrl: [getProductionLinePage],
formConfig: [
{
type: 'datePicker',
label: '时间',
dateType: 'month', // 单个月份选择
format: 'yyyy-MM', // 显示格式
valueFormat: 'yyyy-MM-dd HH:mm:ss', // 绑定值的格式
param: 'time',
defaultSelect: '', // 新增:默认月份值
},
{
type: 'select',
label: '产线',
selectOptions: [],
param: 'lineIds',
defaultSelect: [], // 产线默认选择值(多选数组)
multiple: true,
collapseTags: true,
filterable: true,
width: 300,
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
],
};
},
mounted() {
// 1. 初始化默认当月时间
this.initDefaultMonth();
// 2. 获取产线数据
this.getArr();
},
methods: {
/**
* 初始化默认当月时间(单个月份)
*/
initDefaultMonth() {
const now = new Date();
const year = now.getFullYear();
const month = now.getMonth(); // 月份从0开始直接使用取当月1号
// 创建当月1号0点0分0秒的日期对象
const firstDayOfMonth = new Date(year, month, 1, 0, 0, 0);
// 转换为时间戳(毫秒级)
const defaultTimeStamp = firstDayOfMonth.getTime();
// 给时间选择器赋值默认值
this.formConfig[0].defaultSelect = firstDayOfMonth;
// this.listQuery.time = defaultTimeStamp;
},
/**
* 获取产线数据
*/
getArr() {
const params = {
page: 1,
limit: 500,
};
// 原代码forEach遍历冗余直接调用第一个方法即可
this.optionArrUrl[0](params)
.then((response) => {
const lineList = response.data.list;
this.formConfig[1].selectOptions = lineList;
// 产线默认选择第一条数据(多选需用数组格式)
if (lineList.length > 0) {
const firstLineId = lineList[0].id;
this.formConfig[1].defaultSelect = [firstLineId];
// 给查询参数赋值
this.listQuery.lineIds = [firstLineId];
}
})
.catch((err) => {
console.error('获取产线数据失败:', err);
});
},
/**
* 获取产量分析数据
*/
getData() {
this.dataListLoading = true; // 开启加载状态
this.urlOptions.getDataListURL(this.listQuery)
.then((res) => {
let arr = [
{
prop: 'lineName',
label: '产线',
fixed: 'left',
},
{
prop: 'sum',
label: '合计[片]',
fixed: 'left',
},
{
prop: res.data ? res.data.nameData[0].name : undefined,
label: res.data ? res.data.nameData[0].name : undefined,
align: 'center',
children: [],
},
];
this.dateLabelList.forEach((item) => {
if (item.indexOf('年') === -1) {
// 构造表头
const props = {
prop: item,
label: item,
};
arr[2].children.push(props);
let xData = [];
let yAllData = [];
let lineName = [];
if (res.data) {
// 处理日期标签去重
let tempDateList = [];
res.data.nameData.forEach((date) => {
tempDateList.push(date.name);
});
this.dateLabelList = Array.from(new Set(tempDateList));
// 构造echarts横坐标
xData.push(item);
}
});
// res.data.nameData.slice(1).forEach(item => {
// const props = {
// 'prop': item.name,
// 'label': item.name,
// 'align': 'center'
// }
// arr[2].children.push(props)
// })
let tableDataArr = [];
res.data.data.forEach((item) => {
let obj = {};
(obj.lineName = item.lineName),
(obj.sum = item.sum),
item.data.forEach((ele, index) => {
// console.log(ele)
ele.children.forEach((e) => {
console.log(e.dynamicName);
obj['' + e.dynamicName + ''] = e.dynamicValue;
console.log(obj['' + e.dynamicName + '']);
});
});
tableDataArr.push(obj);
});
this.tableData = tableDataArr;
this.tableProps = arr;
// 构造表头children和echarts横坐标
this.dateLabelList.forEach((item) => {
if (item.indexOf('年') === -1) {
arr[2].children.push({
prop: item,
label: item,
});
xData.push(item);
}
});
// let tempList = []
// res.data.nameData.slice(1).forEach(item => {
// tempList.push(item.name)
// // arr[2].children.push(props)
// })
// xData = Array.from(new Set(tempList))
// 构造表格数据
let tableDataArr = [];
res.data.data.forEach((item) => {
let obj = {
lineName: item.lineName,
sum: item.sum,
};
item.data.forEach((ele) => {
ele.children.forEach((e) => {
obj[e.dynamicName] = e.dynamicValue;
});
});
tableDataArr.push(obj);
});
this.tableData = tableDataArr;
this.tableProps = arr;
res.data.data.forEach((item) => {
let yData = [];
lineName.push(item.lineName);
// let obj = {}
// obj.lineName = item.lineName,
// obj.sum = item.sum,
item.data.forEach((ele, index) => {
// console.log(ele)
ele.children.forEach((e) => {
// let yData = []
yData.push(e.dynamicValue);
});
});
yAllData.push(yData);
});
console.log(lineName);
} else {
this.tableProps = arr;
this.tableData = [];
xData = [];
yAllData = [];
lineName = [];
}
// res.data.data[0].data[0].children.forEach((item, index) => {
// // console.log(item)
// yData.push(item.dynamicValue)
// // let data = 'data' + Number(index+1)
// // obj['' + item.dynamicName + ''] = item.dynamicValue
// })
// console.log(this.yData)
this.$nextTick(() => {
this.$refs.lineChart.initChart(xData, yAllData, lineName);
});
// this.total = response.data.total;
// this.dataListLoading = false;
});
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.lineIds = val.lineIds ? val.lineIds : undefined;
// this.listQuery.productId = val.productId;
this.listQuery.time = val.time
? new Date(val.time).getTime()
: undefined;
// this.listQuery.pageNo = 1;
// this.listQuery.pageSize = 10;
if (val.time) {
this.getData();
} else {
this.$message({
message: '请选择时间',
type: 'warning',
});
}
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
default:
console.log(val);
}
},
},
// 构造图表数据
res.data.data.forEach((item) => {
let yData = [];
lineName.push(item.lineName);
item.data.forEach((ele) => {
ele.children.forEach((e) => {
yData.push(e.dynamicValue);
});
});
yAllData.push(yData);
});
} else {
this.tableProps = arr;
this.tableData = [];
xData = [];
yAllData = [];
lineName = [];
}
// 初始化图表
this.$nextTick(() => {
this.$refs.lineChart.initChart(xData, yAllData, lineName);
});
})
.catch((err) => {
console.error('获取产量数据失败:', err);
this.tableData = [];
})
.finally(() => {
this.dataListLoading = false; // 关闭加载状态
});
},
/**
* 搜索栏按钮点击事件
* @param {Object} val - 按钮/表单传递的参数
*/
buttonClick(val) {
switch (val.btnName) {
case 'search':
// 处理产线参数避免undefined空值设为空数组
this.listQuery.lineIds = val.lineIds || [];
// 处理时间参数:如果是时间字符串,可转换为时间戳(根据接口要求调整)
if (val.time) {
// this.listQuery.time = val.time;
// 若接口需要时间戳,取消下面注释:
this.listQuery.time = new Date(val.time).getTime();
} else {
this.$message({
message: '请选择时间',
type: 'warning',
});
return;
}
// 验证产线是否选择(可选,根据业务需求调整)
if (this.listQuery.lineIds.length === 0) {
this.$message({
message: '请选择至少一条产线',
type: 'warning',
});
return;
}
this.getData();
break;
case 'reset':
// 重置表单
this.$refs.searchBarForm.resetForm();
// 恢复默认值
this.listQuery = {
lineIds: this.formConfig[1].defaultSelect || [],
time: this.formConfig[0].defaultValue || '',
};
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@@ -279,7 +279,8 @@ export default {
filterable: true,
clearable: true,
},
},
},
// {
// select: true,
// label: '设备分组',

View File

@@ -92,7 +92,7 @@ export default {
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ prop: 'name', label: '设备类型名称' },
{ prop: 'code', label: '检测类型编码' },
{ prop: 'code', label: '设备类型编码' },
{ prop: 'remark', label: '备注' },
],
searchBarFormConfig: [

View File

@@ -66,20 +66,30 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="完成单位产品用时" prop="processTime">
<el-input :disabled="isdetail" v-model="dataForm.processTime" placeholder="请输入完成单位产品用时" />
<el-form-item label="完成单位产品用时(S)" prop="processTime">
<el-input :disabled="isdetail" v-model="dataForm.processTime" placeholder="请输入完成单位产品用时(S)" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label=" 加工属性" prop="processType">
<el-select v-model="dataForm.processType" clearable style="width: 100%" :disabled="isdetail"
placeholder="请选择加工属性">
<el-option v-for="dict in processTypeList" :key="dict.id" :label="dict.label"
:value="dict.id" />
<el-form-item label=" 产品工艺" prop="processTypes">
<el-select :disabled="isdetail" collapse-tags multiple v-model="dataForm.processTypes" clearable
style="width: 100%" placeholder="请选择产品工艺">
<el-option v-for="dict in processTypeList" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="20">
<el-col :span="12">
<el-form-item label=" 基板类型" prop="typeDictValue">
<el-select :disabled="isdetail" v-model="dataForm.typeDictValue" clearable
style="width: 100%" placeholder="请选择基板类型">
<el-option v-for="dict in typeList" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row> -->
</el-form>
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
@@ -131,317 +141,361 @@
<script>
import {
deleteProductAttr,
getProductAttrPage,
deleteProductAttr,
getProductAttrPage,
} from '@/api/core/base/productAttr';
import {
createProduct,
updateProduct,
getProduct,
getCode,
createProduct,
updateProduct,
getProduct,
getCode,
} from '@/api/core/base/product';
import productAttrAdd from './attr-add';
import { parseTime } from '../../mixins/code-filter';
import SmallTitle from './SmallTitle';
import { listData } from "@/api/system/dict/data"; //数据字典接口
const tableBtn = [
{
type: 'edit',
btnName: '编辑',
},
{
type: 'delete',
btnName: '删除',
},
{
type: 'edit',
btnName: '编辑',
},
{
type: 'delete',
btnName: '删除',
},
];
const tableProps = [
{
prop: 'createTime',
label: '添加时间',
filter: parseTime,
},
{
prop: 'name',
label: '属性名',
},
{
prop: 'value',
label: '属性值',
},
{
prop: 'createTime',
label: '添加时间',
filter: parseTime,
},
{
prop: 'name',
label: '属性名',
},
{
prop: 'value',
label: '属性值',
},
];
export default {
components: { productAttrAdd, SmallTitle },
data() {
return {
visible: false,
addOrUpdateVisible: false,
tableBtn,
tableProps,
productAttributeList: [],
dataForm: {
id: null,
name: '', // 产品名称
code: '', // 产品编码
area: 0, // 深加工单位平方数(float only)
typeDictValue: null, // 产品类型id
processTime: null, // 单位产品用时 (s)
specifications: '', // 深加工规格
unitDictValue: '', // 单位id
originalSpecifications: '', // 原片规格
components: { productAttrAdd, SmallTitle },
data() {
return {
visible: false,
addOrUpdateVisible: false,
tableBtn,
tableProps,
productAttributeList: [],
dataForm: {
id: null,
name: '', // 产品名称
code: '', // 产品编码
area: 0, // 深加工单位平方数(float only)
typeDictValue: null, // 产品类型id
processTime: null, // 单位产品用时 (s)
specifications: '', // 深加工规格
unitDictValue: '', // 单位id
originalSpecifications: '', // 原片规格
originalArea: 0, // 原片单位平方数
processType:undefined,
},
listQuery: {
pageSize: 10,
pageNo: 1,
total: 0,
processTypes: [],
typeDictValue: null,
},
typeList:[],
listQuery: {
pageSize: 10,
pageNo: 1,
total: 0,
},
processTypeList: [
{
id: '0',
label:'压花丝印'
},
{
id: '1',
label: '无印打孔'
},
{
id: '2',
label: '单层镀膜'
}, {
id: '3',
label: '双层镀膜'
}
// {
// value: '1',
// label: '压花丝印'
// },
// {
// value: '2',
// label: '无印打孔'
// },
// {
// value: '3',
// label: '单层镀膜'
// }, {
// value: '4',
// label: '双层镀膜'
// }
],
dataRule: {
code: [
{
required: true,
message: '产品编码不能为空',
trigger: 'blur',
},
// {
// type: 'number',
// message: '产品编码为数字类型',
// trigger: 'blur',
// transfom: 'val => Number(val)',
// },
],
name: [
{
required: true,
message: '产品名称不能为空',
trigger: 'blur',
},
],
typeDictValue: [
{
required: true,
message: '产品类型不能为空',
trigger: 'blur',
},
],
area: [
{
type: 'number',
message: '请输入正确的数值',
trigger: 'change',
transform: (val) => Number(val),
},
],
processTime: [
{
required: true,
message: '完成单位产品用时不能为空',
trigger: 'blur',
},
{
type: 'number',
message: '请输入正确的数值',
trigger: 'blur',
transform: (val) => Number(val),
},
],
},
isdetail: false,
};
},
methods: {
initData() {
this.productAttributeList.splice(0);
this.listQuery.total = 0;
},
init(id, isdetail) {
this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || null;
this.visible = true;
dataRule: {
code: [
{
required: true,
message: '产品编码不能为空',
trigger: 'blur',
},
// {
// type: 'number',
// message: '产品编码为数字类型',
// trigger: 'blur',
// transfom: 'val => Number(val)',
// },
],
name: [
{
required: true,
message: '产品名称不能为空',
trigger: 'blur',
},
],
typeDictValue: [
{
required: true,
message: '产品类型不能为空',
trigger: 'blur',
},
],
area: [
{
type: 'number',
message: '请输入正确的数值',
trigger: 'change',
transform: (val) => Number(val),
},
],
processTime: [
{
required: true,
message: '完成单位产品用时不能为空',
trigger: 'blur',
},
{
type: 'number',
message: '请输入正确的数值',
trigger: 'blur',
transform: (val) => Number(val),
},
],
},
isdetail: false,
};
},
methods: {
async initData() {
this.productAttributeList.splice(0);
this.listQuery.total = 0;
const typeRes = await listData({
pageNo:
1,
pageSize
: 10,
dictType
: 'product_type'
})
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
this.typeList = typeRes.data.list
console.log('typeRes', this.typeList);
const processTypeRes = await listData({
pageNo:
1,
pageSize
: 10,
dictType
: 'process_type'
})
if (this.dataForm.id) {
// 获取产品详情
getProduct(id).then((response) => {
this.dataForm = response.data;
});
// 获取产品的属性列表
this.getList();
} else {
getCode().then((res) => {
this.dataForm.code = res.data;
});
}
});
},
this.processTypeList = processTypeRes.data.list
console.log('typeRes', this.typeList);
},
init(id, isdetail) {
this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || null;
// this.dataForm.processTypes = [] // 清空工艺选择
this.visible = true;
getList() {
// 获取产品的属性列表
getProductAttrPage({
...this.listQuery,
productId: this.dataForm.id,
}).then((response) => {
this.productAttributeList = response.data.list;
this.listQuery.total = response.data.total;
});
},
handleClick(raw) {
if (raw.type === 'delete') {
this.$confirm(
`确定对${
raw.data.name
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
deleteProductAttr(raw.data.id).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getList();
},
});
});
})
.catch(() => {});
} else {
this.addNew(raw.data.id);
}
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
// 修改的提交
if (this.dataForm.id) {
updateProduct(this.dataForm).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList');
});
return;
}
// 添加的提交
createProduct(this.dataForm).then((response) => {
this.$modal.msgSuccess('新增成功');
this.$confirm(`是否新增产品属性?`, '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
// 获取产品详情
getProduct(id).then((res) => {
const resData = res.data || {};
// 逐个字段赋值(保留响应式)
this.dataForm.name = resData.name || '';
this.dataForm.code = resData.code || '';
this.dataForm.area = resData.area || 0;
this.dataForm.typeDictValue = resData.typeDictValue || null;
this.dataForm.processTime = resData.processTime || null;
this.dataForm.specifications = resData.specifications || '';
this.dataForm.unitDictValue = resData.unitDictValue || '';
this.dataForm.originalSpecifications = resData.originalSpecifications || '';
this.dataForm.originalArea = resData.originalArea || 0;
// 处理工艺列表:确保是数组,过滤空值
this.dataForm.processTypes = resData.processType
? resData.processType.split(',').filter(Boolean)
: [];
console.log('工艺列表(编辑时):', this.dataForm.processTypes); // 验证是否为 ["1","2"] 格式
});
// 获取产品的属性列表
this.getList();
} else {
getCode().then((res) => {
this.dataForm.code = res.data;
});
}
});
},
getList() {
// 获取产品的属性列表
getProductAttrPage({
...this.listQuery,
productId: this.dataForm.id,
}).then((response) => {
this.productAttributeList = response.data.list;
this.listQuery.total = response.data.total;
});
},
handleClick(raw) {
if (raw.type === 'delete') {
this.$confirm(
`确定对${raw.data.name
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
deleteProductAttr(raw.data.id).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getList();
},
});
});
})
.catch(() => { });
} else {
this.addNew(raw.data.id);
}
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
// 修改的提交
if (this.dataForm.id) {
updateProduct(this.dataForm).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList');
});
return;
}
// 添加的提交
createProduct(this.dataForm).then((response) => {
this.$modal.msgSuccess('新增成功');
this.$confirm(`是否新增产品属性?`, '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.dataForm.id = response.data
this.addNew();
})
.catch(() => {
this.visible = false;
this.$emit('refreshDataList');
});
});
}
});
},
goEdit() {
this.isdetail = false;
},
// 新增 / 修改
addNew(id) {
if (this.dataForm.id) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id);
});
} else {
this.$message('请先创建产品!');
}
},
goback() {
this.$emit('refreshDataList');
this.visible = false;
this.initData();
},
},
this.addNew();
})
.catch(() => {
this.visible = false;
this.$emit('refreshDataList');
});
});
}
});
},
goEdit() {
this.isdetail = false;
},
// 新增 / 修改
addNew(id) {
if (this.dataForm.id) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id);
});
} else {
this.$message('请先创建产品!');
}
},
goback() {
this.$emit('refreshDataList');
this.visible = false;
this.initData();
},
},
};
</script>
<style scoped>
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
display: flex;
flex-direction: column;
.drawer>>>.el-drawer {
border-radius: 8px 0 0 8px;
display: flex;
flex-direction: column;
}
.drawer >>> .el-form-item__label {
padding: 0;
.drawer>>>.el-form-item__label {
padding: 0;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
}
.drawer >>> .el-drawer__body {
flex: 1;
height: 1px;
display: flex;
flex-direction: column;
.drawer>>>.el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
}
.drawer >>> .content {
padding: 30px 24px;
flex: 1;
display: flex;
flex-direction: column;
/* height: 100%; */
.drawer>>>.el-drawer__body {
flex: 1;
height: 1px;
display: flex;
flex-direction: column;
}
.drawer >>> .visual-part {
flex: 1 auto;
max-height: 76vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px; /* 调整滚动条样式 */
.drawer>>>.content {
padding: 30px 24px;
flex: 1;
display: flex;
flex-direction: column;
/* height: 100%; */
}
.drawer >>> .el-form,
.drawer >>> .attr-list {
padding: 0 16px;
.drawer>>>.visual-part {
flex: 1 auto;
max-height: 76vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px;
/* 调整滚动条样式 */
}
.drawer>>>.el-form,
.drawer>>>.attr-list {
padding: 0 16px;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
display: flex;
justify-content: flex-end;
padding: 18px;
}
</style>

View File

@@ -1,139 +1,142 @@
<template>
<el-dialog
:visible.sync="visible"
:width="'35%'"
:append-to-body="true"
:close-on-click-modal="false"
class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">
{{ !dataForm.id ? '新增' : '编辑' }}
</div>
</slot>
</template>
<el-dialog v-loading="isLoading" loading-text="处理中..." loading-spinner="el-icon-loading"
loading-background="rgba(255, 255, 255, 0.7)" :visible.sync="visible" :width="'35%'" :append-to-body="true"
:close-on-click-modal="false" class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">
{{ !dataForm.id ? '新增' : '编辑' }}
</div>
</slot>
</template>
<el-form
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="100px"
@keyup.enter.native="dataFormSubmit()">
<el-form-item label="属性" prop="name">
<el-input
v-model="dataForm.name"
placeholder="请输入属性名"
clearable />
</el-form-item>
<el-form-item label="属性值" prop="value">
<el-input
v-model="dataForm.value"
placeholder="请输入属性值"
clearable />
</el-form-item>
</el-form>
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
@keyup.enter.native="dataFormSubmit()">
<el-form-item label="属性名" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入属性名" clearable />
</el-form-item>
<el-form-item label="属性值" prop="value">
<el-input v-model="dataForm.value" placeholder="请输入属性" clearable />
</el-form-item>
</el-form>
<el-row style="text-align: right">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</el-row>
</el-dialog>
<el-row style="text-align: right">
<el-button @click="visible = false">取消</el-button>
<el-button :loading="isLoading" type="primary" @click="dataFormSubmit()">确定</el-button>
</el-row>
</el-dialog>
</template>
<script>
import {
createProductAttr,
updateProductAttr,
getProductAttr,
createProductAttr,
updateProductAttr,
getProductAttr,
} from '@/api/core/base/productAttr';
export default {
props: {
productId: {
type: String,
default: '',
},
},
data() {
return {
visible: false,
dataForm: {
id: 0,
name: '',
value: '',
},
dataRule: {
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
},
};
},
methods: {
init(id) {
this.dataForm.id = id || '';
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
getProductAttr(this.dataForm.id).then((res) => {
const { name, value } = res.data;
this.dataForm.name = name;
this.dataForm.value = value;
});
}
});
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
// 修改的提交
if (this.dataForm.id) {
updateProductAttr({
...this.dataForm,
productId: this.productId,
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList');
});
return;
}
// 添加的提交
createProductAttr({
...this.dataForm,
productId: this.productId,
}).then((response) => {
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList');
});
}
});
},
},
props: {
productId: {
type: String,
default: '',
},
},
data() {
return {
visible: false,
isLoading: false,
dataForm: {
id: 0,
name: '',
value: '',
},
dataRule: {
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
},
};
},
methods: {
init(id) {
this.dataForm.id = id || '';
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
getProductAttr(this.dataForm.id).then((res) => {
const { name, value } = res.data;
this.dataForm.name = name;
this.dataForm.value = value;
}).catch(err => {
console.error('获取属性详情失败:', err);
this.$modal.msgError('获取数据失败,请重试');
});
}
});
},
// 表单提交(优化加载状态和错误处理)
async dataFormSubmit() {
// 先验证表单
const valid = await new Promise((resolve) => {
this.$refs['dataForm'].validate((isValid) => resolve(isValid));
});
if (!valid) return;
this.isLoading = true; // 开始加载
try {
if (this.dataForm.id) {
// 编辑操作
await updateProductAttr({
...this.dataForm,
productId: this.productId,
});
this.$modal.msgSuccess('修改成功');
} else {
// 新增操作
await createProductAttr({
...this.dataForm,
productId: this.productId,
});
this.$modal.msgSuccess('新增成功');
}
this.visible = false;
this.$emit('refreshDataList');
} catch (error) {
// 错误处理
console.error('提交失败:', error);
this.$modal.msgError('操作失败,请重试');
} finally {
// 无论成功失败,都关闭加载状态
this.isLoading = false;
}
},
},
};
</script>
<style scoped>
.dialog >>> .el-dialog__body {
padding: 30px 24px;
.dialog>>>.el-dialog__body {
padding: 30px 24px;
}
.dialog >>> .el-dialog__header {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
padding: 13px 24px;
border-bottom: 1px solid #e9e9e9;
.dialog>>>.el-dialog__header {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
padding: 13px 24px;
border-bottom: 1px solid #e9e9e9;
}
.dialog >>> .el-dialog__header .titleStyle::before {
content: '';
display: inline-block;
width: 4px;
height: 16px;
background-color: #0b58ff;
border-radius: 1px;
margin-right: 8px;
position: relative;
top: 2px;
.dialog>>>.el-dialog__header .titleStyle::before {
content: '';
display: inline-block;
width: 4px;
height: 16px;
background-color: #0b58ff;
border-radius: 1px;
margin-right: 8px;
position: relative;
top: 2px;
}
</style>

View File

@@ -104,7 +104,11 @@ export default {
getDataListURL: getProductionLinePage,
deleteURL: deleteProductionLine,
exportURL: exportProductionLineExcel,
},
},
listQuery: {
pageSize: 20,
pageNo:1
},
tableProps,
tableBtn: [
this.$auth.hasPermi(`base:production-line:update`)
@@ -212,7 +216,7 @@ export default {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.factoryId = val.factoryId || undefined;
this.listQuery.name = val.name;
this.getDataList();
@@ -220,7 +224,7 @@ export default {
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageSize: 20,
pageNo: 1,
total: 1,
};

View File

@@ -262,6 +262,14 @@ export default {
tooltip: {
valueFormatter: (value) => `${value} %`,
},
label: {
show: true,
position: 'top',
distance: 6,
fontSize: 11,
color: '#333333',
formatter: (params) => `${params.value}` // 显示单位
},
data: this.barData.map((item) => item.processingRatio),
},
],

File diff suppressed because it is too large Load Diff

View File

@@ -77,7 +77,7 @@ const tableProps = [
},
{
prop: 'palletNum',
label: '下片托数'
label: '一托玻璃数量/片'
},
{
prop: 'startTime',
@@ -92,7 +92,7 @@ const tableProps = [
width: 160
},
{
prop: 'outputNum',
prop: 'length',
label: '玻璃长度/mm'
},
{
@@ -101,7 +101,7 @@ const tableProps = [
},
{
prop: 'thick',
label: '玻璃度/mm'
label: '玻璃度/mm'
},
];
@@ -204,94 +204,88 @@ export default {
);
});
},
test() {
var target = document.getElementsByClassName("right-aside")[0]
target.style.background = '#FFFFFF'
var that = this
setTimeout(() => {
html2canvas(target).then(function(canvas) {
var contentWidth = canvas.width
var contentHeight = canvas.height
// 一页pdf显示html页面生成的canvas高度
var pageHeight = contentHeight / 592.28 * 841.89
// 未生成pdf的html页面高度
var leftHeight = contentHeight
// 页面偏移
var position = 0
// a4纸的尺寸[595.28,841.89]html页面生成的canvas在pdf中图片的高度
var imgWidth = 595.28
var imgHeight = 592.28 / contentWidth * contentHeight
var pageData = canvas.toDataURL('image/jpeg', 1.0)
console.log('nihc URL', leftHeight, pageHeight)
var pdf = new jsPDF('', 'pt', 'a4')
if (leftHeight < pageHeight) {
pdf.addImage(pageData, 'JPEG', 0, 20, imgWidth, imgHeight)
} else {
while(leftHeight > 0) {
pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight
position -= 841.89
// 避免空白页
if (leftHeight > 0) {
pdf.addPage()
}
}
}
pdf.save(that.fileName + '工段统计.pdf')
})
}, 300)
},
exportECL() {
let tables = document.querySelector('.el-table').cloneNode(true)
const fix = tables.querySelector('.el-table__fixed')
const fixRight = tables.querySelector('.el-table__fixed-right')
if (fix) {
tables.removeChild(tables.querySelector('.el-table__fixed'))
}
if (fixRight) {
tables.removeChild(tables.querySelector('.el-table__fixed-right'))
}
let exportTable = XLSX.utils.table_to_book(tables)
var exportTableOut = XLSX.write(exportTable, {
bookType: 'xlsx', bookSST: true, type: 'array'
})
// sheetjs.xlsx为导出表格的标题名称
try {
FileSaver.saveAs(new Blob([exportTableOut], {
type: 'application/octet-stream'
}), this.fileName + '工段统计.xlsx')
} catch (e) {
if (typeof console !== 'undefined') console.log(e, exportTableOut)
exportXlsx() {
if (!this.showData.length) {
this.$message.warning('暂无数据可导出');
return;
}
return exportTableOut
},
exportPdf() {
this.test()
setTimeout(() =>{
this.dialogVisible = false
this.showData = this.tableData
}, 600)
},
exportXlsx() {
this.exportECL()
this.dialogVisible = false
this.showData = this.tableData
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
},
this.exportLoading = true;
try {
// 1. 处理导出数据(格式化时间字段)
const exportData = this.showData.map(item => {
const formatItem = { ...item };
// 格式化时间字段
if (formatItem.startTime) formatItem.startTime = parseTime(formatItem.startTime);
if (formatItem.endTime) formatItem.endTime = parseTime(formatItem.endTime);
return formatItem;
});
// 2. 构建表头映射:{ prop: label },只保留表格配置中存在的列
const headerMap = {};
this.tableProps.forEach(col => {
if (col.prop && col.label) {
headerMap[col.prop] = col.label;
}
});
// 3. 转换数据将prop键名替换为label按tableProps顺序排列列
const formattedData = exportData.map(item => {
const newItem = {};
// 按表格配置顺序遍历列确保Excel列顺序与表格一致
this.tableProps.forEach(col => {
const prop = col.prop;
const label = col.label;
if (prop && label) {
// 处理可能的undefined值避免导出为空字符串
newItem[label] = item[prop] ?? '';
}
});
return newItem;
});
// 4. 创建工作表使用处理后的带label表头的数据
const worksheet = XLSX.utils.json_to_sheet(formattedData);
// 5. 创建工作簿并添加工作表
const workbook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(workbook, worksheet, '下片日志数据');
// 6. 生成Excel文件
const excelBuffer = XLSX.write(workbook, {
bookType: 'xlsx',
type: 'array'
});
// 7. 保存文件
const blob = new Blob([excelBuffer], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
});
// 8. 生成文件名(包含查询条件信息)
let fileName = '下片历史';
if (this.listQuery.productionLineId) {
const lineItem = this.formConfig[0].selectOptions.find(
item => item.id === this.listQuery.productionLineId
);
if (lineItem) fileName += lineItem.name + '_';
}
if (this.listQuery.thick) {
fileName += this.listQuery.thick + '_';
}
// 添加时间戳避免文件名重复
fileName + '.xlsx';
FileSaver.saveAs(blob, fileName);
this.$message.success('导出成功');
} catch (error) {
console.error('导出失败:', error);
this.$message.error('导出失败,请重试');
} finally {
this.exportLoading = false;
}
},
getPdLineList() {
getPdList().then((res) => {
this.formConfig[0].selectOptions = res.data || []
@@ -314,15 +308,16 @@ export default {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.productId = val.productId ? val.productId : undefined;
this.listQuery.startTime = val.timeVal ? val.timeVal[0]: undefined;
this.listQuery.endTime = val.timeVal ? val.timeVal[1]: undefined;
this.listQuery.productionLineId = val.productionLineId ? val.productionLineId : undefined;
this.listQuery.thick = val.thick ? val.thick : undefined;
this.listQuery.startTime = val.timeVal ? val.timeVal[0] : undefined;
this.listQuery.endTime = val.timeVal ? val.timeVal[1] : undefined;
//this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined;
this.getDataList();
break;
case 'export':
this.handleExport();
this.exportXlsx();
break;
default:
console.log(val);
@@ -350,12 +345,6 @@ export default {
this.listQuery.pageNo = val;
this.getDataList();
},
handleExport() {
if (this.selectedList.length > 0) {
this.showData = this.selectedList
}
this.dialogVisible = true
}
},
};
</script>

View File

@@ -77,7 +77,7 @@ const tableProps = [
},
{
prop: 'palletNum',
label: '下片托数'
label: '一托玻璃数量/片'
},
{
prop: 'startTime',
@@ -92,7 +92,7 @@ const tableProps = [
width: 160
},
{
prop: 'outputNum',
prop: 'length',
label: '玻璃长度/mm'
},
{
@@ -358,8 +358,6 @@ export default {
handleExport() {
// 处理查询参数
let params = { ...this.listQuery };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出下片日志?').then(() => {
this.exportLoading = true;
return exportDownLogData(params);

View File

@@ -262,6 +262,14 @@ export default {
tooltip: {
valueFormatter: (value) => `${value} %`,
},
label: {
show: true,
position: 'top',
distance: 6,
fontSize: 11,
color: '#333333',
formatter: (params) => `${params.value}` // 显示单位
},
data: this.barData.map((item) => item.processingRatio),
},
],

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,8 @@
<!--
* @Author: Do not edit
* @Date: 2023-08-29 14:59:29
* @LastEditTime: 2024-12-02 13:44:47
* @LastEditors: zwq
* @Description:
-->
<template>
<div class="app-container">
<!-- :isFold="true" 控制展开 -->
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick"
@select-changed="selectType" />
<base-table v-if="tableData.length" class="right-aside" v-loading="dataListLoading" :table-props="tableProps"
:page="listQuery.pageNo" :limit="listQuery.pageSize" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@@ -17,34 +11,47 @@
<div v-else class="no-data-bg"></div>
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@pagination="getDataList" />
<!-- <el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose">
<el-button type="primary" @click="exportXlsx">xlsx</el-button>
<el-button type="success" @click="exportPdf">pdf</el-button>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog> -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" />
</div>
</template>
<script>
import Vue from 'vue';
import AddOrUpdate from './add-or-updata';
import { parseTime } from '../../mixins/code-filter';
import { getCostOriginRadioHisData, getPdList } from '@/api/core/monitoring/index'
import * as XLSX from 'xlsx'
import FileSaver from 'file-saver'
import jsPDF from 'jspdf'
import html2canvas from 'html2canvas'
import { getCostOriginRadioHisData, getPdList } from '@/api/core/monitoring/index';
import { exportCostOriginRadioHisData } from '../../../../api/core/monitoring';
const tableProps = [
// Vue2 中注册全局方法(如果需要)
Vue.prototype.$download = Vue.prototype.$download || {
excel: (response, fileName) => {
const blob = new Blob([response.data], { type: 'application/vnd.ms-excel' });
const url = window.URL.createObjectURL(blob);
const aLink = document.createElement('a');
aLink.style.display = 'none';
aLink.href = url;
aLink.setAttribute('download', fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink);
window.URL.revokeObjectURL(url);
}
};
Vue.prototype.$modal = Vue.prototype.$modal || {
confirm: (message) => {
return new Promise((resolve, reject) => {
if (window.confirm(message)) {
resolve();
} else {
reject();
}
});
}
};
const tableProps = [
{
prop: 'reportType',
label: '报表类型'
@@ -52,12 +59,11 @@ const tableProps = [
{
prop: 'time',
label: '日期',
// filter: parseTime,
width: 160
},
{
{
prop: 'bindObjectName',
label: '产线'
label: '产线'
},
{
prop: 'thick',
@@ -67,11 +73,11 @@ const tableProps = [
prop: 'speed',
label: '在线速度'
},
{
{
prop: 'width',
label: '掰边宽度'
},
{
},
{
prop: 'inArea',
label: '拉引量/㎡'
},
@@ -79,21 +85,83 @@ const tableProps = [
prop: 'outArea',
label: '下片面积/㎡'
},
{
{
prop: 'ratio',
label: '良品率'
},
label: '良品率/%'
},
];
/**
* 工具函数获取选择时间所在周的起始和结束时间Vue2 兼容)
* @param {String|Date} selectTime - 选择的时间支持格式yyyy-MM-dd、yyyy-MM-dd HH:mm:ss 或 Date 对象)
* @returns {Array} [startDate, endDate] - 所在周周一 00:00:00 至 周日 23:59:59Date 对象)
*/
function getSelectedWeekRange(selectTime) {
// 兼容 String 类型时间和 Date 对象,统一转为 Date 实例
const targetDate = new Date(selectTime);
// 处理无效日期(若传入非法时间,返回当前时间的本周范围)
// if (isNaN(targetDate.getTime())) {
// console.warn('传入的时间格式无效,将使用当前时间计算本周范围');
// return getCurrentWeekRange(); // 可根据需求改为抛出错误或返回空
// }
const day = targetDate.getDay() || 7; // 周日为 7避免周日 -0 天仍为周日)
const start = new Date(targetDate);
start.setDate(targetDate.getDate() - day + 1); // 计算所在周的周一
start.setHours(0, 0, 0, 0); // 重置时分秒为 00:00:00.000
const end = new Date(start);
end.setDate(start.getDate() + 6); // 周一 +6 天 = 周日
end.setHours(23, 59, 59, 999); // 重置时分秒为 23:59:59.999
return [start, end];
}
/**
* 工具函数获取选择时间所在年的起始和结束时间Vue2 兼容)
* @param {String|Date} selectTime - 选择的时间支持格式yyyy-MM-dd、yyyy-MM-dd HH:mm:ss 或 Date 对象)
* @returns {Array} [startDate, endDate] - 所在年 1月1日 00:00:00 至 12月31日 23:59:59Date 对象)
*/
function getSelectedYearRange(selectTime) {
// 兼容 String 类型时间和 Date 对象,统一转为 Date 实例
const targetDate = new Date(selectTime);
// 处理无效日期(若传入非法时间,返回当前时间的本年范围)
// if (isNaN(targetDate.getTime())) {
// console.warn('传入的时间格式无效,将使用当前时间计算本年范围');
// return getCurrentYearRange(); // 可根据需求改为抛出错误或返回空
// }
const year = targetDate.getFullYear(); // 获取选择时间的年份
const start = new Date(year, 0, 1); // 所在年 1月1日月份从 0 开始)
start.setHours(0, 0, 0, 0); // 重置时分秒为 00:00:00.000
const end = new Date(year, 11, 31); // 所在年 12月31日11 代表 12 月)
end.setHours(23, 59, 59, 999); // 重置时分秒为 23:59:59.999
return [start, end];
}
// 格式化时间为 yyyy-MM-dd HH:mm:ssVue2 兼容)
function formatDateTime(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
export default {
components: {
AddOrUpdate
},
data() {
return {
urlOptions: {
getDataListURL: getCostOriginRadioHisData
},
data() {
return {
urlOptions: {
getDataListURL: getCostOriginRadioHisData
},
tableData: [],
listQuery: {
pageSize: 10,
@@ -101,181 +169,368 @@ export default {
total: 1,
bindObjectId: undefined,
statisticType: undefined,
startTime: undefined,
endTime: undefined
},
pdLineList:[],
pdLineList: [],
exportLoading: false,
dataListLoading: false,
selectedList: [],
dialogVisible: false,
selectedList: [],
dialogVisible: false,
addOrEditTitle: '',
addOrUpdateVisible: false,
tableProps,
tableProps,
tableBtn: [
{
type: 'edit',
btnName: '编辑',
},
].filter((v) => v),
tableData: [],
fileName: '',
].filter(v => v),
fileName: '',
formConfig: [
{
type: 'select',
label: '维度',
label: '报表类型',
onchange: true,
selectOptions: [
{
id: '0',
name:'班组'
},
{
id: '1',
name: '日'
},
{
id: '2',
name: '周'
},
{
id: '3',
name: '月'
},
{
id: '4',
name: '年'
}
{ id: '0', name: '班组' },
{ id: '1', name: '日' },
{ id: '2', name: '周' },
{ id: '3', name: '月' },
{ id: '4', name: '年' }
],
param: 'statisticType'
param: 'statisticType',
index: 1,
extraOptions: [
{
parent: 'statisticType',
type: 'datePicker',
label: '统计时间',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
defaultTime: ['00:00:00', '23:59:59'],
defaultSelect: [],
width: 250,
key: 'datePicker-0', // 唯一 key触发重新渲染
appendToBody: true // 优化定位:挂载到 body 下
},
// 日 - 日期范围选择
{
parent: 'statisticType',
type: 'datePicker',
label: '统计时间',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeValDay',
defaultTime: ['00:00:00', '23:59:59'],
defaultSelect: [],
width: 250,
key: 'datePicker-1', // 唯一 key触发重新渲染
appendToBody: true // 优化定位:挂载到 body 下
},
// 周 - 单个日期选择(自动获取本周范围)
{
parent: 'statisticType',
type: 'datePicker',
label: '统计时间',
dateType: 'week',
placeholder: '选择日期',
format: 'yyyy 第 WW 周',
pickerOptions: {
firstDayOfWeek: 1 // 数字1表示周一作为周的第一天0=周日1=周一,依此类推)
},
valueFormat: 'yyyy-MM-dd',
param: 'timeValWeek',
width: 250,
key: 'datePicker-2', // 唯一 key触发重新渲染
appendToBody: true // 优化定位:挂载到 body 下
},
// 月 - 日期范围选择
{
parent: 'statisticType',
type: 'datePicker',
label: '统计时间',
dateType: 'monthrange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeValMonth',
defaultTime: ['00:00:00', '23:59:59'],
width: 250,
key: 'datePicker-3', // 唯一 key触发重新渲染
appendToBody: true // 优化定位:挂载到 body 下
},
// 年 - 单个日期选择(自动获取本年范围)
{
parent: 'statisticType',
type: 'datePicker',
label: '统计时间',
dateType: 'year',
placeholder: '选择年份',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
param: 'timeValYear',
width: 250,
key: 'datePicker-4', // 唯一 key触发重新渲染
appendToBody: true // 优化定位:挂载到 body 下
}
]
},
{
type: 'select',
label: '产线',
selectOptions: [],
{
type: 'select',
label: '产线',
selectOptions: [],
param: 'bindObjectId'
},
{
type: 'datePicker',
label: '统计开始时间',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: "yyyy-MM-dd HH:mm:ss",
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
defaultTime: ['00:00:00', '23:59:59'],
defaultSelect: []
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
type: 'button',
btnName: '导出',
name: 'export',
color: 'warning',
}
],
};
},
{
type: 'separate',
},
{
type: 'button',
btnName: '导出',
name: 'export',
color: 'warning',
}
],
};
},
watch: {
// 监听报表类型变化,强制刷新日期选择器
'listQuery.statisticType'(newVal, oldVal) {
if (newVal !== oldVal && this.$refs.searchBarForm) {
// 触发 search-bar 组件重新渲染(如果 search-bar 支持)
if (this.$refs.searchBarForm.$forceUpdate) {
this.$refs.searchBarForm.$forceUpdate();
}
// 延迟重置定位,确保 DOM 已更新
setTimeout(() => {
const datePickerEl = this.$refs.searchBarForm.$el.querySelector('.el-date-picker');
if (datePickerEl) {
// 触发 Element UI 日期选择器重新计算定位(内部方法)
const datePickerInstance = datePickerEl.__vue__;
if (datePickerInstance && datePickerInstance.updatePopper) {
datePickerInstance.updatePopper();
}
}
}, 100);
}
}
},
mounted() {
this.$refs.searchBarForm.formInline.statisticType = '1';
// Vue2 中 $refs 需在 $nextTick 中访问(确保 DOM 渲染完成)
this.$nextTick(() => {
if (this.$refs.searchBarForm) {
this.$refs.searchBarForm.formInline.statisticType = '1';
}
});
this.listQuery.statisticType = '1';
this.getDataList()
this.getPdLineList()
},
this.getDataList();
this.getPdLineList();
},
methods: {
selectType(val) {
// 报表类型切换时的回调(如需扩展可在此添加逻辑)
console.log('报表类型切换:', val);
},
handleClick(val) {
console.log(val);
console.log('操作按钮点击:', val);
if (val.type === 'edit') {
this.addOrUpdateVisible= true
this.addOrUpdateVisible = true;
// Vue2 中 $nextTick 确保子组件已渲染
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data);
});
}
},
getPdLineList() {
getPdList().then((res) => {
this.formConfig[1].selectOptions = res.data || []
this.pdLineList = res.data || []; // 保存产线数据
})
},
selectChange(val) {
console.log(val)
this.selectedList = val
},
buttonClick(val) {
console.log('val', val);
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.bindObjectId = val.bindObjectId ? val.bindObjectId : undefined;
this.listQuery.statisticType = val.statisticType ? val.statisticType : undefined;
this.listQuery.startTime = val.timeVal ? val.timeVal[0]: undefined;
this.listQuery.endTime = val.timeVal ? val.timeVal[1]: undefined;
//this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined;
this.getDataList();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
// 获取数据列表
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => {
const arr = ['班组','日', '周', '月', '年'];
this.tableData = response.data?.list?.map((item) => {
item.reportType = arr[this.listQuery.statisticType];
item.statisticType = this.listQuery.statisticType
// 匹配 bindObjectName
const targetLine = this.pdLineList.find(line => line.id === item.bindObjectId);
item.bindObjectName = targetLine ? targetLine.name : ''; // 赋值名称,无匹配则为空
return item;
});
this.listQuery.total = response.data.total;
this.dataListLoading = false;
getPdLineList() {
getPdList().then(res => {
// Vue2 中数组赋值需确保响应式
this.$set(this.formConfig[1], 'selectOptions', res.data || []);
this.pdLineList = res.data || [];
}).catch(err => {
console.error('获取产线列表失败:', err);
});
},
// 每页数
selectChange(val) {
console.log('选择变更:', val);
this.selectedList = val;
},
buttonClick(val) {
console.log('头部按钮点击:', val);
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.bindObjectId = val.bindObjectId ? val.bindObjectId : undefined;
this.listQuery.statisticType = val.statisticType ? val.statisticType : undefined;
// 处理不同时间维度的时间范围
this.handleTimeRange(val);
this.getDataList();
break;
case 'export':
this.handleExport();
break;
default:
console.log('未知按钮:', val);
}
},
// 处理不同时间维度的时间范围
handleTimeRange(val) {
const statisticType = val.statisticType;
const timeVal = val.timeVal;
const timeValDay = val.timeValDay;
const timeValWeek = val.timeValWeek;
const timeValMonth = val.timeValMonth;
const timeValYear = val.timeValYear;
// 重置时间参数
this.listQuery.startTime = undefined;
this.listQuery.endTime = undefined;
switch (statisticType) {
case '0': // 班组 - 沿用原时间范围
if (timeVal && timeVal.length === 2) {
this.listQuery.startTime = timeVal[0];
this.listQuery.endTime = timeVal[1];
}
break;
case '1': // 日 - 沿用原时间范围
if (timeValDay && timeValDay.length === 2) {
this.listQuery.startTime = timeValDay[0];
this.listQuery.endTime = timeValDay[1];
}
break;
case '3': // 月 - 沿用原时间范围
if (timeValMonth && timeValMonth.length === 2) {
this.listQuery.startTime = timeValMonth[0];
this.listQuery.endTime = timeValMonth[1];
}
break;
case '2': // 周 - 自动计算本周范围
if (timeValWeek) {
const [start, end] = getSelectedWeekRange(timeValWeek);
this.listQuery.startTime = formatDateTime(start);
this.listQuery.endTime = formatDateTime(end);
}
break;
case '4': // 年 - 自动计算本年范围
if (timeValYear) {
const [start, end] = getSelectedYearRange(timeValYear);
this.listQuery.startTime = formatDateTime(start);
this.listQuery.endTime = formatDateTime(end);
}
break;
}
},
// 获取数据列表
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery)
.then(response => {
const arr = ['班组', '日', '周', '月', '年'];
// Vue2 中数组赋值确保响应式
this.tableData = (response.data?.list || []).map(item => {
item.reportType = arr[this.listQuery.statisticType] || '';
item.statisticType = this.listQuery.statisticType;
// 匹配产线名称
// const targetLine = this.pdLineList.find(line => line.id === item.bindObjectId);
// item.bindObjectName = targetLine ? targetLine.name : ''
return item;
})
this.listQuery.total = response.data?.total || 0;
})
.catch(err => {
console.error('获取数据失败:', err);
this.tableData = [];
this.listQuery.total = 0;
})
.finally(() => {
this.dataListLoading = false;
});
},
// 每页数变更
sizeChangeHandle(val) {
this.listQuery.pageSize = val;
this.listQuery.pageNo = 1;
this.getDataList();
},
// 当前页
// 当前页变更
currentChangeHandle(val) {
this.listQuery.pageNo = val;
this.getDataList();
},
// 导出处理
handleExport() {
// 处理查询参数
let params = { ...this.listQuery };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出原片报表?').then(() => {
this.exportLoading = true;
return exportCostOriginRadioHisData(params);
}).then(response => {
this.$download.excel(response, '原片报表.xls');
this.exportLoading = false;
}).catch(() => { });
const params = { ...this.listQuery };
// 移除分页参数
delete params.pageNo;
delete params.pageSize;
delete params.total;
this.$modal.confirm('是否确认导出原片报表?')
.then(() => {
this.exportLoading = true;
return exportCostOriginRadioHisData(params);
})
.then(response => {
this.$download.excel(response, '原片报表.xls');
})
.catch(err => {
console.error('导出失败:', err);
})
.finally(() => {
this.exportLoading = false;
});
}
},
},
// Vue2 中监听数据变化(如需)
watch: {
'listQuery.statisticType'(newVal) {
console.log('报表类型变更:', newVal);
// 可添加类型变更后的额外逻辑
}
}
};
</script>
<style scoped>
.app-container {
padding: 16px;
}
.no-data-bg {
height: 400px;
background-color: #f5f7fa;
display: flex;
align-items: center;
justify-content: center;
color: #999;
}
.right-aside {
margin-bottom: 16px;
}
</style>

View File

@@ -0,0 +1,274 @@
<template>
<div class="searchBarBox divHeight" ref="searchBarRef" :style="{ paddingRight: isFold ? '55px' : '0px' }">
<el-form :inline="true" ref="searchBarForm" :model="formInline" class="searchBar">
<span class="blue-block" v-if="removeBlue ? false : true"></span>
<template v-for="item in formConfig">
<el-form-item v-if="item.type !== ''" :key="item.param" :label="item.label ? item.label : ''"
:required="item.required ? item.required : false">
<el-input v-if="item.type === 'input'" v-model="formInline[item.param]"
:size="item.size ? item.size : 'small'" clearable :disabled="item.disabled ? item.disabled : false"
:style="item.width ? 'width:' + item.width + 'px' : 'width:200px'"
:placeholder="item.placeholder ? item.placeholder : ''" />
<el-select v-if="item.type === 'select'" v-model="formInline[item.param]"
:size="item.size ? item.size : 'small'" :filterable="item.filterable ? item.filterable : false"
:multiple="item.multiple ? item.multiple : false" :clearable="item.clearable === false ? false : true"
:style="item.width ? 'width:' + item.width + 'px' : 'width:200px'" :placeholder="item.label" @change="
item.onchange
? $emit('select-changed', {
param: item.param,
value: formInline[item.param]
})
: null
">
<el-option v-for="(sub, i) in item.selectOptions" :key="i"
:label="item.labelField ? sub[item.labelField] : sub['name']"
:value="item.valueField ? sub[item.valueField] : sub['id']" />
</el-select>
<el-date-picker v-if="item.type === 'datePicker'" :key="item.param" :size="item.size ? item.size : 'small'"
v-model="formInline[item.param]" :type="item.dateType" :format="item.format ? item.format : 'yyyy-MM-dd'"
:value-format="item.valueFormat ? item.valueFormat : null" :default-time="item.defaultTime || null"
:range-separator="item.rangeSeparator || null" :start-placeholder="item.startPlaceholder || null"
:end-placeholder="item.endPlaceholder || null" :placeholder="item.placeholder"
:picker-options="item.pickerOptions ? item.pickerOptions : null"
:clearable="item.clearable === false ? false : true"
:style="item.width ? 'width:' + item.width + 'px' : (item.dateType === 'datetimerange' ? 'width:340px' : (item.dateType === 'daterange' ? 'width:220px' : 'width:140px'))" />
<el-autocomplete v-if="item.type === 'autocomplete'" v-model="formInline[item.param]"
:value-key="item.valueKey ? item.valueKey : 'value'" :size="item.size ? item.size : 'small'"
:fetch-suggestions="item.querySearch" :placeholder="item.placeholder"
:clearable="item.clearable === false ? false : true"
:style="item.width ? 'width:' + item.width + 'px' : 'width:200px'" filterable />
<el-cascader v-if="item.type === 'cascader'" v-model="formInline[item.param]" :options="item.selectOptions"
:props="item.cascaderProps" :size="item.size ? item.size : 'small'"
:clearable="item.clearable === false ? false : true"
:show-all-levels="item.showAllLevels === false ? false : true"
:collapse-tags="item.collapseTags === true ? true : false"
:style="item.width ? 'width:' + item.width + 'px' : 'width:200px'" @change="
item.onChange
? $emit('cascader-change', {
param: item.param,
value: formInline[item.param]
})
: null
"></el-cascader>
<el-button v-if="item.type === 'button'" :type="item.color" :size="item.size ? item.size : 'small'"
:plain="item.plain ? item.plain : false" :round="item.round ? item.round : false"
@click="headBtnClick(item.name)">{{ item.btnName }}</el-button>
<span v-if="item.type === 'separate'" class="separateStyle"></span>
<!-- 可用于显示其他按钮 -->
</el-form-item>
</template>
<el-form-item>
<slot></slot>
</el-form-item>
</el-form>
<span v-if="isFold" class="foldClass" @click='switchMode'>
{{ isExpand ? '收起' : '展开' }}
<i class="iconfont" :class="isExpand ? 'icon-upward' : 'icon-downward'"></i>
</span>
</div>
</template>
<script>
export default {
name: 'SearchBar',
props: {
formConfigs: {
type: Array,
default: () => {
return []
}
},
removeBlue: {
type: Boolean,
default: false
},
isFold: {// 多行模式(默认否)
type: Boolean,
default: false
}
},
data() {
const formInline = {}
const formConfig = this.formConfigs
let hasExtraOptions = false
for (const obj of formConfig) {
if (obj.type !== 'button') {
if (obj.defaultSelect === false || obj.defaultSelect === 0) {
formInline[obj.param] = obj.defaultSelect
} else {
formInline[obj.param] = obj.defaultSelect || '' // defaultSelect下拉框默认选中项
}
}
if (obj.extraOptions) {
hasExtraOptions = true
}
}
return {
formInline,
formConfig,
hasExtraOptions,
isExpand: false // 是否展开(默认否)
}
},
watch: {
formConfig: {
handler() {
for (const obj of this.formConfig) {
if (obj.defaultSelect) {
this.formInline[obj.param] = obj.defaultSelect
} else if (obj.defaultSelect === null) {
// 需要手动从外部清除选项缓存的情况确保在外部配置项中可直接设置null
this.formInline[obj.param] = ''
}
}
},
deep: true,
immediate: true
},
formInline: {
handler: function () {
this.$forceUpdate()
},
deep: true,
immediate: true
}
},
mounted() {
this.$nextTick(() => {
this.init()
})
},
methods: {
init() {
if (this.hasExtraOptions) {
// 如果有额外参数就处理,如果没有就算了
for (const obj of this.formConfig) {
if (obj.extraOptions) {
// 注: 对obj.extraOptions的选择是互斥的!
this.$watch(
`formInline.${obj.param}`,
function (newVal) {
let deleteCount = 0
if (obj.index + 1 < this.formConfig.length) {
// 如果obj不是最后一个配置
const nextConfig = this.formConfig[obj.index + 1]
if (nextConfig.parent && nextConfig.parent === obj.param)
deleteCount = 1
}
const currentConfig = Object.assign(
{},
obj.extraOptions[newVal]
)
this.formConfig.splice(
obj.index + 1,
deleteCount,
currentConfig
)
// 修改 formInline
this.$set(this.formInline, currentConfig.param, '')
},
{ immediate: true }
)
}
}
}
},
headBtnClick(btnName) {
this.formInline.btnName = btnName
this.$emit('headBtnClick', this.formInline)
},
resetForm() {
this.$refs.searchBarForm.resetFields()
const formInline = {}
const formConfig = this.formConfigs
for (const obj of formConfig) {
if (obj.type !== 'button') {
if (obj.defaultSelect === false || obj.defaultSelect === 0) {
formInline[obj.param] = obj.defaultSelect
} else {
formInline[obj.param] = obj.defaultSelect || '' // defaultSelect下拉框默认选中项
}
}
}
this.formInline = formInline
},
switchMode() {// 展开和收起切换
this.isExpand = !this.isExpand
const element = this.$refs.searchBarRef
if (this.isExpand) {
element.classList.remove('divHeight')
} else {
element.classList.add('divHeight')
}
}
}
}
</script>
<style>
.searchBarBox {
width: 100%;
position: relative;
margin-bottom: 8px;
}
.searchBarBox::after {
content: "";
display: block;
clear: both;
}
.divHeight {
height: 45px;
overflow: hidden;
}
.searchBar .blue-block {
display: inline-block;
float: left;
width: 4px;
height: 16px;
background-color: #0B58FF;
border-radius: 1px;
margin-right: 8px;
margin-top: 12px;
}
.searchBar .el-form-item {
margin-bottom: 4px;
}
.searchBar .el-date-editor .el-range__icon {
font-size: 16px;
color: #0B58FF;
}
.searchBar .el-input__prefix .el-icon-date {
font-size: 16px;
color: #0B58FF;
}
.searchBar .el-input__prefix .el-icon-time {
font-size: 16px;
color: #0B58FF;
}
.searchBar .separateStyle {
display: inline-block;
width: 1px;
height: 24px;
background: #E8E8E8;
vertical-align: middle;
}
.searchBarBox .foldClass {
position: absolute;
top: 14px;
right: 0;
cursor: pointer;
font-size: 12px;
color: #0B58FF;
}
.searchBarBox .foldClass .iconfont {
font-size: 14px;
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<div>
<div style="background: #f2f4f9; height: 40px; width: 100%">
<!-- <div style="background: #f2f4f9; height: 40px; width: 100%">
<ButtonNav :menus="['按日期', '按规格']" @change="currentMenu">
<template v-slot:tab1>
<div>按日期</div>
@@ -9,7 +9,7 @@
<div>按规格</div>
</template>
</ButtonNav>
</div>
</div> -->
<div class="app-container energyOverlimitLog">
<div v-show="activeName === 'his'">
<!-- 搜索工作栏 -->
@@ -54,7 +54,7 @@
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getDataList" />
@pagination="getNavDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@@ -86,32 +86,36 @@ import ButtonNav from '@/components/ButtonNav';
const tableProps = [
{
prop: 'recTime',
prop: 'time',
label: '日期',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
},
{
prop: 'originArea',
label: '原片下片面积',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'deepArea',
label: '深加工下片面积',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'originPrice',
label: '原片成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'deepPrice',
label: '深加工成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'price',
label: '总成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
];
const tableProps2 = [
@@ -244,19 +248,12 @@ export default {
},
methods: {
buttonClick(val) {
if (val.statisticType === 2) {
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年第{w}周');
}else{
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年{m}月{d}日');
}
this.formConfig2[0].startPlaceholder = '开始时间';
this.formConfig2[0].endPlaceholder = '结束时间';
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.bindObjectId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
@@ -274,7 +271,7 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.bindObjectId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
@@ -334,12 +331,19 @@ export default {
this.otherMethods(val);
}
},
getNavDataList(){
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
/** 导出按钮操作 */
handleExport() {
let exportURL, title;
if (this.activeName === 'his') {
exportURL = exportCostSumExcel;
title = '总成本统计-按日期';
title = '总成本统计';
} else {
exportURL = exportRawStatisticsRealtimeExcel;
title = '总成本统计-按规格';

View File

@@ -77,7 +77,7 @@ export default {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name||null;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
@@ -90,7 +90,7 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name;
this.listQuery.recTime = val.searchTime;
this.handleExport();

View File

@@ -54,7 +54,7 @@
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getDataList" />
@pagination="getNavDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@@ -86,24 +86,27 @@ import ButtonNav from '@/components/ButtonNav';
const tableProps = [
{
prop: 'recTime',
prop: 'time',
label: '日期',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'energyTypeName',
label: '能源类型',
},
{
prop: 'bindObjectName',
label: '监控对象',
filter: (val) => (val != null ? val : '--'),
},
{
prop: 'meterName',
label: '抄表名',
filter: (val) => (val != null ? val : '--'),
},
// {
// prop: 'bindObjectName',
// label: '监控对象',
// filter: (val) => (val != null ? val : '--'),
// },
// {
// prop: 'meterName',
// label: '抄表名',
// filter: (val) => (val != null ? val : '--'),
// },
{
prop: 'quantity',
label: '累计使用量',
@@ -115,20 +118,24 @@ const tableProps = [
},
];
const tableProps2 = [
{
prop: 'remark',
label: '备注',
},
{
prop: 'energyTypeName',
label: '能源类型',
},
{
prop: 'bindObjectName',
label: '监控对象',
filter: (val) => (val != null ? val : '--'),
},
{
prop: 'meter',
label: '抄表名',
filter: (val) => (val != null ? val : '--'),
},
// {
// prop: 'bindObjectName',
// label: '监控对象',
// filter: (val) => (val != null ? val : '--'),
// },
// {
// prop: 'meter',
// label: '抄表名',
// filter: (val) => (val != null ? val : '--'),
// },
{
prop: 'quantity',
label: '累计使用量',
@@ -207,13 +214,16 @@ export default {
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
defaultTime: ['08:30:00', '08:30:00'],
param: 'searchTime',
width: 350,
clearable: false,
},
{
type: 'button',
@@ -262,26 +272,18 @@ export default {
},
methods: {
buttonClick(val) {
if (val.statisticType === 2) {
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年第{w}周');
}else{
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年{m}月{d}日');
}
this.formConfig2[1].startPlaceholder = '开始时间';
this.formConfig2[1].endPlaceholder = '结束时间';
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.energyTypeId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.getDataList();
} else {
this.getDataList2();
@@ -292,13 +294,18 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.energyTypeId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
}
this.handleExport();
break;
default:
@@ -320,15 +327,26 @@ export default {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
this.$nextTick(() => {
this.$refs.searchBarForm2.formInline.searchTime = [
this.listQuery.startTime,
this.listQuery.endTime,
];
});
this.listQuery.name = null;
this.listQuery.pageNo = 1;
this.getDataList2();
}
},
getNavDataList(){
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
// 获取数据2列表
getDataList2() {
if (this.listQuery.startTime) {

View File

@@ -54,7 +54,7 @@
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getDataList" />
@pagination="getNavDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
const tableProps = [
{
prop: 'recTime',
prop: 'time',
label: '日期',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'otherCostName',
@@ -99,9 +102,14 @@ const tableProps = [
prop: 'price',
label: '总价(元)',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
];
const tableProps2 = [
// {
// prop: 'remark',
// label: '备注',
// },
{
prop: 'otherCostName',
label: '成本名称',
@@ -110,6 +118,7 @@ const tableProps2 = [
prop: 'price',
label: '总价(元)',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
];
export default {
@@ -182,13 +191,16 @@ export default {
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
defaultTime: ['08:30:00', '08:30:00'],
param: 'searchTime',
width: 350,
clearable: false,
},
{
type: 'button',
@@ -237,26 +249,20 @@ export default {
},
methods: {
buttonClick(val) {
if (val.statisticType === 2) {
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年第{w}周');
}else{
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年{m}月{d}日');
}
this.formConfig2[1].startPlaceholder = '开始时间';
this.formConfig2[1].endPlaceholder = '结束时间';
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.getDataList();
} else {
this.getDataList2();
@@ -267,13 +273,18 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
}
this.handleExport();
break;
default:
@@ -295,15 +306,26 @@ export default {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
this.$nextTick(() => {
this.$refs.searchBarForm2.formInline.searchTime = [
this.listQuery.startTime,
this.listQuery.endTime,
];
});
this.listQuery.name = null;
this.listQuery.pageNo = 1;
this.getDataList2();
}
},
getNavDataList(){
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
// 获取数据2列表
getDataList2() {
getRawOthercostSunPage(this.listQuery).then((response) => {

View File

@@ -65,6 +65,7 @@ const tableProps = [
prop: 'price',
label: '成本金额',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'remark',
@@ -161,7 +162,7 @@ export default {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name||null;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
@@ -174,7 +175,7 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name||null;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime

View File

@@ -10,9 +10,9 @@
<span>
{{
injectData.type == 1
? `每天等价,${injectData.price}`
? `每天等价,${Number(injectData.price)}`
: injectData.type == 2
? `总价${injectData.price}元,年折旧率${injectData.ratio}%,折旧年限${injectData.timeLimit}`
? `总价${Number(injectData.price)}元,年折旧率${injectData.ratio}%,折旧年限${injectData.timeLimit}`
: '-'
}}
</span>

View File

@@ -52,7 +52,7 @@
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getDataList" />
@pagination="getNavDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@@ -85,9 +85,12 @@ import ButtonNav from '@/components/ButtonNav';
const tableProps = [
{
prop: 'recTime',
prop: 'time',
label: '日期',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'productionLineName',
@@ -100,22 +103,27 @@ const tableProps = [
{
prop: 'innum',
label: '上片数量',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'outnum',
label: '下片数量',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'ratio',
label: '良品率',
filter: (val) => (val ? val * 100 + '%' : '-'),
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
},
];
const tableProps2 = [
{
prop: 'recTime',
prop: 'time',
label: '日期',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'productionLineName',
@@ -128,15 +136,17 @@ const tableProps2 = [
{
prop: 'innum',
label: '进片数量',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'outnum',
label: '出片数量',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'ratio',
label: '良品率',
filter: (val) => (val ? val * 100 + '%' : '-'),
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
},
];
export default {
@@ -170,13 +180,15 @@ export default {
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
defaultTime: ['08:30:00', '08:30:00'],
param: 'searchTime',
width: 350,
},
{
type: 'button',
@@ -225,22 +237,15 @@ export default {
},
methods: {
buttonClick(val) {
if (val.statisticType === 2) {
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年第{w}周');
}else{
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年{m}月{d}日');
}
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.productionLineId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.getDataList();
@@ -253,12 +258,12 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.productionLineId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
this.handleExport();
break;
@@ -309,10 +314,20 @@ export default {
this.otherMethods(val);
}
},
getNavDataList(){
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
successSubmit() {
this.handleCancel();
const val = this.activeName === 'his' ? '产线良品率' : 'now';
this.currentMenu(val);
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
/** 导出按钮操作 */
handleExport() {

View File

@@ -54,7 +54,7 @@
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getDataList" />
@pagination="getNavDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
const tableProps = [
{
prop: 'recTime',
prop: 'time',
label: '时间',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'bindObjectName',
@@ -102,33 +105,42 @@ const tableProps = [
{
prop: 'inCount',
label: '上片数量',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'outCount',
label: '下片数量',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'ratio',
label: '良品率',
filter: (val) => (val ? val * 100 + '%' : '-'),
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
},
{
prop: 'costSum',
label: '深加工成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'costPiece',
label: '单片成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'costArea',
label: '每平米成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
];
const tableProps2 = [
{
prop: 'remark',
label: '备注',
},
{
prop: 'bindObjectName',
label: '产线',
@@ -140,30 +152,35 @@ const tableProps2 = [
{
prop: 'inCount',
label: '上片数量',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'outCount',
label: '下片数量',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'ratio',
label: '良品率',
filter: (val) => (val ? val * 100 + '%' : '-'),
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
},
{
prop: 'costSum',
label: '深加工成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'costPiece',
label: '单片成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'costArea',
label: '每平米成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
];
export default {
@@ -225,13 +242,16 @@ export default {
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
defaultTime: ['08:30:00', '08:30:00'],
param: 'searchTime',
width: 350,
clearable: false,
},
{
type: 'select',
@@ -288,26 +308,20 @@ export default {
},
methods: {
buttonClick(val) {
if (val.statisticType === 2) {
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年第{w}周');
}else{
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年{m}月{d}日');
}
this.formConfig2[0].startPlaceholder = '开始时间';
this.formConfig2[0].endPlaceholder = '结束时间';
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.bindObjectId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.getDataList();
} else {
this.getDataList2();
@@ -318,13 +332,18 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.bindObjectId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
}
this.handleExport();
break;
default:
@@ -346,15 +365,26 @@ export default {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
this.formConfig2[0].startPlaceholder = parseTime(start).substr(0, 10);
this.formConfig2[0].endPlaceholder = parseTime(end).substr(0, 10);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
this.$nextTick(() => {
this.$refs.searchBarForm2.formInline.searchTime = [
this.listQuery.startTime,
this.listQuery.endTime,
];
});
this.listQuery.name = null;
this.listQuery.pageNo = 1;
this.getDataList2();
}
},
getNavDataList(){
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
// 获取数据2列表
getDataList2() {
if (this.listQuery.startTime) {

430
src/views/cost/index.vue Normal file
View File

@@ -0,0 +1,430 @@
<template>
<div class="app-container">
<!-- 顶部日期&筛选栏 -->
<el-row :gutter="20" class="top-bar">
<el-col :span="8">
<el-date-picker
v-model="dateRange"
type="daterange"
range-separator="~"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd" />
<el-button type="primary" style="margin-left: 10px">查询</el-button>
</el-col>
<el-col :span="16">
<el-tag type="info" @click="changeTime('yesterday')">昨日</el-tag>
<el-tag type="info" @click="changeTime('week')">本周</el-tag>
<el-tag type="info" @click="changeTime('month')">本月</el-tag>
<el-tag type="info" @click="changeTime('year')">本年</el-tag>
</el-col>
</el-row>
<!-- 成本概览卡片 -->
<el-row :gutter="20" class="card-row">
<el-col :span="8">
<el-card class="cost-card">
<div class="card-title">总制造成本/平米</div>
<div class="card-content">
<div>
目标
<span class="target-val">16</span>
</div>
<div>
实际
<span class="actual-val">12.8</span>
</div>
<el-progress :stroke-width="13" :percentage="80" color="#42b983" />
</div>
</el-card>
</el-col>
<el-col :span="8">
<el-card class="cost-card">
<div class="card-title">原片成本/平米</div>
<div class="card-content">
<div>
目标
<span class="target-val">16</span>
</div>
<div>
实际
<span class="actual-val">12.8</span>
</div>
<el-progress :stroke-width="13" :percentage="99" color="#42b983" />
</div>
</el-card>
</el-col>
<el-col :span="8">
<el-card class="cost-card">
<div class="card-title">加工成本/平米</div>
<div class="card-content">
<div>
目标
<span class="target-val">16</span>
</div>
<div>
实际
<span class="actual-val">12.8</span>
</div>
<el-progress :stroke-width="13" :percentage="99" color="#42b983" />
</div>
</el-card>
</el-col>
</el-row>
<!-- 成本构成区域 -->
<el-row :gutter="20" class="composition-row">
<!-- 饼图 -->
<el-col :span="6">
<el-card class="composition-card">
<div class="card-title">成本构成</div>
<div id="costPie" class="chart" style="height: 350px"></div>
</el-card>
</el-col>
<!-- 原片/加工成本子项 -->
<el-col :span="18">
<el-card class="composition-card">
<div class="card-title">成本构成</div>
<!-- 原片成本子项 -->
<div class="sub-cost-group">
<div class="sub-cost-title">原片成本</div>
<div class="sub-cost">
<div
v-for="(item, idx) in rawSubCosts"
:key="idx"
class="sub-cost-div">
<div class="sub-cost-name">
{{ item.name }}
<div class="sub-cost-val">{{ item.val }}</div>
</div>
<div style="text-align: center">
<el-progress
type="circle"
:percentage="89"
:width="60"
:stroke-width="10"
:show-text="false"
color="#e74c3c" />
</div>
<div class="sub-cost-name">
目标
<span class="red-text">{{ item.target }}</span>
</div>
<div class="sub-cost-name">
完成率
<span class="red-text">89%</span>
</div>
</div>
</div>
</div>
<el-divider></el-divider>
<!-- 加工成本子项 -->
<div class="sub-cost-group" style="margin-top: 20px">
<div class="sub-cost-title">加工成本</div>
<div class="sub-cost">
<div
v-for="(item, idx) in processSubCosts"
:key="idx"
class="sub-cost-div">
<div class="sub-cost-name">
{{ item.name }}
<div class="sub-cost-val">{{ item.val }}</div>
</div>
<div style="text-align: center">
<el-progress
type="circle"
:percentage="89"
:width="60"
:stroke-width="10"
:show-text="false"
color="#e74c3c" />
</div>
<div class="sub-cost-name">
目标
<span class="red-text">{{ item.target }}</span>
</div>
<div class="sub-cost-name">
完成率
<span class="red-text">89%</span>
</div>
</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
<!-- 趋势图区域 -->
<el-row :gutter="20" class="trend-row">
<!-- 总制造成本趋势 -->
<el-col :span="8">
<el-card class="trend-card">
<div class="card-title">总制造成本趋势</div>
<div id="totalTrend" class="chart" style="height: 300px"></div>
</el-card>
</el-col>
<!-- 原片/加工成本趋势 -->
<el-col :span="8">
<el-card class="trend-card">
<div class="card-title">原片/加工成本趋势</div>
<el-tabs v-model="costTab" type="card" style="margin-bottom: 10px">
<el-tab-pane label="原片成本" name="raw"></el-tab-pane>
<el-tab-pane label="加工成本" name="process"></el-tab-pane>
</el-tabs>
<div id="rawProcessTrend" class="chart" style="height: 300px"></div>
</el-card>
</el-col>
<!-- 单项成本趋势 -->
<el-col :span="8">
<el-card class="trend-card">
<div class="card-title">单项成本趋势</div>
<el-tabs v-model="itemTab" type="card" style="margin-bottom: 10px">
<el-tab-pane label="人工成本" name="labor"></el-tab-pane>
<el-tab-pane label="原料成本" name="material"></el-tab-pane>
<el-tab-pane label="制造费用" name="expense"></el-tab-pane>
<el-tab-pane label="玻璃热耗" name="heat"></el-tab-pane>
<el-tab-pane label="原片成品率" name="yield"></el-tab-pane>
</el-tabs>
<div id="itemTrend" class="chart" style="height: 300px"></div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'CostDashboard',
data() {
return {
dateRange: ['2023-05-06', '2023-05-06'],
costTab: 'raw',
itemTab: 'labor',
// 原片成本子项
rawSubCosts: [
{ name: '人工成本', val: 4.56, target: 4.32 },
{ name: '原料成本', val: 4.56, target: 4.32 },
{ name: '原片制造费用', val: 4.56, target: 4.32 },
{ name: '玻璃热耗', val: 4.56, target: 4.32 },
{ name: '原片成品率', val: 4.56, target: 4.32 },
],
// 加工成本子项
processSubCosts: [
{ name: '人工成本', val: 4.56, target: 4.32 },
{ name: '加工动力成本', val: 4.56, target: 4.32 },
{ name: '加工制造费用', val: 4.56, target: 4.32 },
{ name: '加工投入产出率', val: 4.56, target: 4.32 },
],
// 趋势图模拟数据
trendX: ['00:00', '01:00', '02:00'],
trendY: [20, 40, 50],
targetY: 12.54,
};
},
mounted() {
this.initCostPie();
this.initTotalTrend();
this.initRawProcessTrend();
this.initItemTrend();
},
methods: {
// 切换时间范围(示例)
changeTime(type) {
// 实际项目中需根据type请求对应数据
console.log('切换时间:', type);
},
// 初始化成本构成饼图
initCostPie() {
const pieChart = echarts.init(document.getElementById('costPie'));
pieChart.setOption({
tooltip: { trigger: 'item' },
legend: {
orient: 'horizontal', // 水平排列
bottom: 0, // 放在底部
icon: 'circle',
left: 'center',
formatter: function (name) {
return name;
},
},
series: [
{
type: 'pie',
data: [
{ name: '原料成本(4.2元)', value: 29.9 },
{ name: '动力成本(2.1元)', value: 24 },
{ name: '人工成本(1.5元)', value: 24 },
{ name: '辅料成本(0.5元)', value: 21.2 },
{ name: '制造费用(0.5元)', value: 21.2 },
],
label: { show: false },
labelLine: { show: false },
bottom: 10,
},
],
});
window.addEventListener('resize', () => pieChart.resize());
},
// 初始化总制造成本趋势图
initTotalTrend() {
const totalChart = echarts.init(document.getElementById('totalTrend'));
totalChart.setOption({
grid: { top: 20, bottom: 30, left: 30, right: 10 },
xAxis: { type: 'category', data: this.trendX },
yAxis: { type: 'value', min: -20, max: 60 },
series: [
{
name: '实际值',
type: 'line',
data: this.trendY,
lineStyle: { color: '#409eff' },
},
{
name: '目标值',
type: 'line',
data: [this.targetY, this.targetY, this.targetY],
lineStyle: { type: 'dashed', color: '#e6a23c' },
},
],
});
window.addEventListener('resize', () => totalChart.resize());
},
// 初始化原片/加工成本趋势图
initRawProcessTrend() {
const rpChart = echarts.init(document.getElementById('rawProcessTrend'));
rpChart.setOption({
grid: { top: 10, bottom: 20, left: 20, right: 10 },
xAxis: { type: 'category', data: this.trendX },
yAxis: { type: 'value', min: -20, max: 60 },
series: [
{
name: '实际值',
type: 'line',
data: this.trendY,
lineStyle: { color: '#409eff' },
},
{
name: '目标值',
type: 'line',
data: [this.targetY, this.targetY, this.targetY],
lineStyle: { type: 'dashed', color: '#e6a23c' },
},
],
});
window.addEventListener('resize', () => rpChart.resize());
},
// 初始化单项成本趋势图
initItemTrend() {
const itemChart = echarts.init(document.getElementById('itemTrend'));
itemChart.setOption({
grid: { top: 10, bottom: 20, left: 20, right: 10 },
xAxis: { type: 'category', data: this.trendX },
yAxis: { type: 'value', min: -20, max: 60 },
series: [
{
name: '实际值',
type: 'line',
data: this.trendY,
lineStyle: { color: '#409eff' },
},
{
name: '目标值',
type: 'line',
data: [this.targetY, this.targetY, this.targetY],
lineStyle: { type: 'dashed', color: '#e6a23c' },
},
],
});
window.addEventListener('resize', () => itemChart.resize());
},
},
};
</script>
<style scoped>
.top-bar {
margin-bottom: 20px;
}
.card-row,
.composition-row {
margin-bottom: 20px;
}
.cost-card .card-title {
font-size: 22px;
font-weight: bold;
margin-bottom: 15px;
}
.cost-card .card-content {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 10px;
align-items: center;
font-size: 18px;
}
.target-val {
color: #666;
margin-left: 5px;
font-size: 20px;
}
.actual-val {
color: #42b983;
margin-left: 5px;
font-size: 20px;
}
.composition-card {
height: 480px;
}
.composition-card .card-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 15px;
}
.sub-cost {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
gap: 10px;
align-items: center;
}
.sub-cost-group .sub-cost-title {
font-size: 16px;
font-weight: bold;
margin-bottom: 10px;
}
.sub-cost-group .sub-cost-div {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
align-items: center;
border: 1px solid rgb(220, 220, 220, 0.5);
padding: 10px;
}
.sub-cost-name {
text-align: center;
margin-top: 5px;
font-size: 14px;
}
.sub-cost-val {
font-size: 16px;
font-weight: bold;
}
.completion {
text-align: center;
font-size: 12px;
color: #666;
}
.red-text {
color: #e74c3c;
}
.trend-card {
height: 450px;
}
.trend-card .card-title {
font-size: 16px;
font-weight: bold;
margin-bottom: 10px;
}
</style>

View File

@@ -0,0 +1,199 @@
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
:table-props="tableProps1"
:page="1"
:limit="100"
:table-data="tableData1"></base-table>
<base-table
:table-props="tableProps2"
:page="1"
:limit="100"
:table-data="tableData2"></base-table>
</div>
</template>
<script>
import { getDetailData } from '@/api/cost/allCost';
import moment from 'moment';
const tableProps1 = [
{
prop: 'name',
label: '成本项目-原片',
},
{
prop: 'f1',
label: '本期领用',
children: [
{
prop: 'quantity',
label: '数量',
},
{
prop: 'price',
label: '单价',
},
{
prop: 'sumPrice',
label: '金额',
},
],
},
{
prop: 'sprice',
label: '单位成本',
},
];
const tableProps2 = [
{
prop: 'name',
label: '成本项目-加工',
},
{
prop: 'quantity',
label: '耗用数量',
},
{
prop: 'price',
label: '平均耗用单价',
},
{
prop: 'sumPrice',
label: '总成本',
},
{
prop: 'sprice',
label: '综合单位成本',
},
];
export default {
data() {
return {
tableProps1,
tableData1: [],
tableProps2,
tableData2: [],
listQuery: {
pageSize: 10,
pageNo: 1,
statisticType: 1,
},
activeName: '日',
startTime:
moment(new Date()).subtract(1, 'days').format('YYYY-MM-DD') +
' 00:00:00',
endTime:
moment(new Date()).subtract(-1, 'days').format('YYYY-MM-DD') +
' 00:00:00',
formConfig: [
{
type: 'select',
label: '维度',
selectOptions: [
{ id: 1, name: '日' },
{ id: 2, name: '周' },
{ id: 3, name: '月' },
{ id: 4, name: '年' },
],
param: 'statisticType',
defaultSelect: 1, // 默认值,
clearable: false,
},
{
// 日期选择
type: 'datePicker',
// label: '日期',
dateType: 'date',
placeholder: '选择日期',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
param: 'timeday',
clearable: false,
pickerOptions: {
disabledDate(time) {
return (time.getTime()+ 3600 * 1000 * 24) > Date.now();
},
shortcuts: [
{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date());
},
},
{
text: '昨天',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit('pick', date);
},
},
{
text: '一周前',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', date);
},
},
],
},
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
type: 'button',
btnName: '返回首页',
name: 'back',
color: 'warning',
},
],
};
},
created() {},
mounted() {
this.listQuery.startTime = this.startTime;
this.$refs.searchBarForm.formInline.timeday = this.startTime.substr(0, 10)
this.getDataList();
},
methods: {
// 获取数据列表
getDataList() {
getDetailData(this.listQuery).then((response) => {
this.tableData1 = response.data.odata;
this.tableData2 = response.data.ddata;
});
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
console.log(val.timeday)
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.timeday
? val.timeday + ' 00:00:00'
: null;
this.getDataList();
break;
case 'back':
this.$router.go(-1)
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@@ -77,7 +77,7 @@ export default {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name||null;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
@@ -90,7 +90,7 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name;
this.listQuery.recTime = val.searchTime;
this.handleExport();

View File

@@ -54,7 +54,7 @@
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getDataList" />
@pagination="getNavDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@@ -86,24 +86,27 @@ import ButtonNav from '@/components/ButtonNav';
const tableProps = [
{
prop: 'recTime',
prop: 'time',
label: '日期',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'energyTypeName',
label: '能源类型',
},
{
prop: 'bindObjectName',
label: '监控对象',
filter: (val) => (val != null ? val : '--'),
},
{
prop: 'meterName',
label: '抄表名',
filter: (val) => (val != null ? val : '--'),
},
// {
// prop: 'bindObjectName',
// label: '监控对象',
// filter: (val) => (val != null ? val : '--'),
// },
// {
// prop: 'meterName',
// label: '抄表名',
// filter: (val) => (val != null ? val : '--'),
// },
{
prop: 'quantity',
label: '累计使用量',
@@ -115,20 +118,24 @@ const tableProps = [
},
];
const tableProps2 = [
{
prop: 'remark',
label: '备注',
},
{
prop: 'energyTypeName',
label: '能源类型',
},
{
prop: 'bindObjectName',
label: '监控对象',
filter: (val) => (val != null ? val : '--'),
},
{
prop: 'meter',
label: '抄表名',
filter: (val) => (val != null ? val : '--'),
},
// {
// prop: 'bindObjectName',
// label: '监控对象',
// filter: (val) => (val != null ? val : '--'),
// },
// {
// prop: 'meter',
// label: '抄表名',
// filter: (val) => (val != null ? val : '--'),
// },
{
prop: 'quantity',
label: '累计使用量',
@@ -207,13 +214,16 @@ export default {
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
defaultTime: ['08:30:00', '08:30:00'],
param: 'searchTime',
width: 350,
clearable: false,
},
{
type: 'button',
@@ -237,10 +247,11 @@ export default {
activeName: 'his',
tableProps,
tableProps2,
tableBtn: [{
type: 'edit',
btnName: '编辑',
}
tableBtn: [
{
type: 'edit',
btnName: '编辑',
},
].filter((v) => v),
tableData: [],
tableData2: [],
@@ -262,26 +273,18 @@ export default {
},
methods: {
buttonClick(val) {
if (val.statisticType === 2) {
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年第{w}周');
}else{
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年{m}月{d}日');
}
this.formConfig2[1].startPlaceholder = '开始时间';
this.formConfig2[1].endPlaceholder = '结束时间';
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.energyTypeId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.getDataList();
} else {
this.getDataList2();
@@ -292,13 +295,16 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.energyTypeId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
}
this.handleExport();
break;
default:
@@ -320,15 +326,26 @@ export default {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
this.$nextTick(() => {
this.$refs.searchBarForm2.formInline.searchTime = [
this.listQuery.startTime,
this.listQuery.endTime,
];
});
this.listQuery.name = null;
this.listQuery.pageNo = 1;
this.getDataList2();
}
},
getNavDataList() {
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
// 获取数据2列表
getDataList2() {
if (this.listQuery.startTime) {

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2024-09-05 15:34:28
* @LastEditTime: 2024-12-27 09:18:43
* @Description:
-->
<template>
@@ -22,7 +22,7 @@
placeholder="请输入原料名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<!-- <el-col :span="12">
<el-form-item label="单价" prop="matPrice">
<el-input
v-model="dataForm.matPrice"
@@ -31,7 +31,7 @@
placeholder="请输入单价" />
(/)
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="12">
<el-form-item label="累计用量" prop="quantity">
<el-input-number

View File

@@ -54,7 +54,7 @@
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getDataList" />
@pagination="getNavDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
const tableProps = [
{
prop: 'recTime',
prop: 'time',
label: '日期',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'materialName',
@@ -97,13 +100,13 @@ const tableProps = [
},
{
prop: 'quantity',
label: '累计使用量()',
},
{
prop: 'matPrice',
label: '单价(元/吨)',
align: 'right',
label: '累计使用量(千克)',
},
// {
// prop: 'matPrice',
// label: '单价(元/千克)',
// align: 'right',
// },
{
prop: 'price',
label: '总价(元)',
@@ -111,6 +114,10 @@ const tableProps = [
},
];
const tableProps2 = [
// {
// prop: 'remark',
// label: '备注',
// },
{
prop: 'materialName',
label: '原料名称',
@@ -123,13 +130,13 @@ const tableProps2 = [
},
{
prop: 'quantity',
label: '累计使用量()',
},
{
prop: 'materialPrice',
label: '单价(元/吨)',
align: 'right',
label: '累计使用量(千克)',
},
// {
// prop: 'materialPrice',
// label: '单价(元/千克)',
// align: 'right',
// },
{
prop: 'price',
label: '总价(元)',
@@ -204,13 +211,16 @@ export default {
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
defaultTime: ['08:30:00', '08:30:00'],
param: 'searchTime',
width: 350,
clearable: false,
},
{
type: 'button',
@@ -234,10 +244,11 @@ export default {
activeName: 'his',
tableProps,
tableProps2,
tableBtn: [{
type: 'edit',
btnName: '编辑',
}
tableBtn: [
{
type: 'edit',
btnName: '编辑',
},
].filter((v) => v),
tableData: [],
tableData2: [],
@@ -259,26 +270,20 @@ export default {
},
methods: {
buttonClick(val) {
if (val.statisticType === 2) {
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年第{w}周');
}else{
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年{m}月{d}日');
}
this.formConfig2[1].startPlaceholder = '开始时间';
this.formConfig2[1].endPlaceholder = '结束时间';
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.materialId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.getDataList();
} else {
this.getDataList2();
@@ -289,13 +294,18 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.materialId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
}
this.handleExport();
break;
default:
@@ -317,15 +327,26 @@ export default {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
this.$nextTick(() => {
this.$refs.searchBarForm2.formInline.searchTime = [
this.listQuery.startTime,
this.listQuery.endTime,
];
});
this.listQuery.name = null;
this.listQuery.pageNo = 1;
this.getDataList2();
}
},
getNavDataList() {
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
// 获取数据2列表
getDataList2() {
if (this.listQuery.startTime) {

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2024-09-05 15:33:16
* @LastEditTime: 2025-06-13 10:59:54
* @Description:
-->
<template>
@@ -15,7 +15,9 @@
label-width="80px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产线" prop="bindObjectName">
<el-form-item
:label="activeName === 'his' ? '产线' : '工段'"
prop="bindObjectName">
<el-input
style="width: 100%"
v-model="dataForm.bindObjectName"
@@ -33,7 +35,7 @@
placeholder="选择所属日期"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12" v-if="activeName === 'his'">
<el-form-item label="厚度" prop="thick">
<el-input-number
:min="0"
@@ -43,7 +45,7 @@
placeholder="请输入厚度" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12" v-if="activeName === 'his'">
<el-form-item label="在线速度" prop="speed">
<el-input-number
:min="0"
@@ -53,7 +55,7 @@
placeholder="请输入在线速度" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12" v-if="activeName === 'his'">
<el-form-item label="掰边宽度" prop="width">
<el-input-number
:min="0"
@@ -64,25 +66,27 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="拉引量" prop="inArea">
<el-form-item
:label="activeName === 'his' ? '拉引量' : '进片数'"
prop="inArea">
<el-input-number
:min="0"
style="width: 85%"
v-model="dataForm.inArea"
clearable
placeholder="请输入拉引量" />
()
clearable />
{{ activeName === 'his' ? '(m²)' : '片' }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="下片面积" prop="outArea">
<el-form-item
:label="activeName === 'his' ? '下片面积' : '出片数'"
prop="outArea">
<el-input-number
:min="0"
style="width: 85%"
v-model="dataForm.outArea"
clearable
placeholder="请输入下片面积" />
()
clearable />
{{ activeName === 'his' ? '(m²)' : '片' }}
</el-form-item>
</el-col>
<el-col :span="12">
@@ -129,10 +133,12 @@ export default {
recTime: undefined,
},
dataRule: {},
activeName: 'his',
};
},
methods: {
init(val, statisticType) {
init(val, statisticType, activeName) {
this.activeName = activeName;
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
@@ -148,17 +154,22 @@ export default {
if (!valid) {
return false;
}
const udata = {
let udata = {
id: this.dataForm.id,
statisticType: this.dataForm.statisticType,
modifyThick: this.dataForm.thick,
modifySpeed: this.dataForm.speed,
modifyWidth: this.dataForm.width,
modifyInArea: this.dataForm.inArea,
modifyOutArea: this.dataForm.outArea,
modifyRatio:
this.dataForm.ratio >= 0 ? this.dataForm.ratio / 100 : '',
};
if (this.activeName === 'his') {
udata = {
...udata,
modifyThick: this.dataForm.thick,
modifySpeed: this.dataForm.speed,
modifyWidth: this.dataForm.width,
};
}
// 修改的提交
this.urlOptions.updateURL(udata).then((response) => {
this.$modal.msgSuccess('修改成功');

View File

@@ -1,42 +1,71 @@
<template>
<div class="app-container energyOverlimitLog">
<!-- 搜索工作栏 -->
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<!-- 列表 -->
<base-table
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="80"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="50%">
<add-or-update
ref="addOrUpdate"
:name-arr="formConfig[1].selectOptions"
@refreshDataList="successSubmit"></add-or-update>
</base-dialog>
<div>
<div style="background: #f2f4f9; height: 40px; width: 100%">
<ButtonNav :menus="['产线良品率', '工段良品率']" @change="currentMenu">
<template v-slot:tab1>
<div>产线良品率</div>
</template>
<template v-slot:tab2>
<div>工段良品率</div>
</template>
</ButtonNav>
</div>
<div class="app-container energyOverlimitLog">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<!-- 列表 -->
<div v-if="activeName === 'his'">
<base-table
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="80"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
</div>
<div v-if="activeName === 'now'">
<base-table
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-props="tableProps2"
:table-data="tableData2"
:max-height="tableH">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="80"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
</div>
<pagination
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getNavDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="50%">
<add-or-update
ref="addOrUpdate"
:name-arr="formConfig[1].selectOptions"
@refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</div>
</template>
@@ -44,16 +73,27 @@
import AddOrUpdate from './add-or-updata';
import basicPage from '@/mixins/basic-page';
import { getLinePage } from '@/api/base/productionLine';
import { getcostOriginRatioHisPage,exportcostOriginRatioHisExcel } from '@/api/cost/costOriginRatioHis';
import {
getcostOriginRatioHisPage,
getcostOriginWSRatioHisPage,
exportcostOriginWSRatioHisExcel,
exportcostOriginRatioHisExcel,
} from '@/api/cost/costOriginRatioHis';
import { parseTime } from '@/filter/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import ButtonNav from '@/components/ButtonNav';
const tableProps = [
{
prop: 'recTime',
prop: 'time',
label: '日期',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
width:130,
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'bindObjectName',
label: '产线',
@@ -62,27 +102,67 @@ const tableProps = [
{
prop: 'thick',
label: '厚度',
filter: (val) => (val != null ? Number(val).toFixed(1) : '-'),
},
{
prop: 'speed',
label: '在线速度',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'width',
label: '掰边宽度',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'inArea',
label: '拉引量/m²',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'outArea',
label: '下片面积/m²',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'ratio',
label: '良品率',
filter: (val) => (val ? val * 100 + '%' : '-'),
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
},
];
const tableProps2 = [
{
prop: 'time',
label: '日期',
width:130,
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'bindObjectName',
label: '工段',
width:145,
},
{
prop: 'spec',
label: '规格',
},
{
prop: 'inArea',
label: '进片数',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'outArea',
label: '出片数',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'ratio',
label: '良品率',
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
},
];
export default {
@@ -116,13 +196,15 @@ export default {
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
defaultTime: ['08:30:00', '08:30:00'],
param: 'searchTime',
width: 350,
},
{
type: 'button',
@@ -143,23 +225,27 @@ export default {
listQuery: {
statisticType: 1,
},
activeName: 'his',
tableProps,
tableProps2,
tableBtn: [{
type: 'edit',
btnName: '编辑',
}
].filter((v) => v),
tableData: [],
tableData2: [],
};
},
components: {
AddOrUpdate,
ButtonNav,
},
created() {
const params ={
pageNo: 1,
pageSize: 100,
pdType: 1
pdType: 0
}
getLinePage(params).then((response) => {
this.formConfig[1].selectOptions = response.data.list;
@@ -167,36 +253,33 @@ export default {
},
methods: {
buttonClick(val) {
if (val.statisticType === 2) {
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年第{w}周');
}else{
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年{m}月{d}日');
}
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.bindObjectId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
this.getDataList();
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
break;
case 'add':
this.addOrUpdateHandle();
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.bindObjectId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
this.handleExport();
break;
@@ -204,23 +287,74 @@ export default {
console.log(val);
}
},
currentMenu(val) {
this.activeName = val === '产线良品率' ? 'his' : 'now';
if (this.activeName === 'his') {
this.$refs.searchBarForm.resetForm();
this.listQuery.bindObjectId = null;
this.listQuery.startTime = null;
this.listQuery.endTime = null;
this.listQuery.statisticType = 1;
this.listQuery.pageNo = 1;
this.getDataList();
} else {
this.$refs.searchBarForm.resetForm();
this.listQuery.bindObjectId = null;
this.listQuery.startTime = null;
this.listQuery.endTime = null;
this.listQuery.statisticType = 1;
this.listQuery.pageNo = 1;
this.getDataList2();
}
},
// 获取数据2列表
getDataList2() {
getcostOriginWSRatioHisPage(this.listQuery).then((response) => {
this.tableData2 = response.data.list;
this.listQuery.total = response.data.total;
});
},
//tableBtn点击
handleClick(val) {
if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrEditTitle = '编辑';
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data, this.listQuery.statisticType);
this.$refs.addOrUpdate.init(
val.data,
this.listQuery.statisticType,
this.activeName
);
});
} else {
this.otherMethods(val);
}
},
getNavDataList(){
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
successSubmit() {
this.handleCancel();
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
/** 导出按钮操作 */
handleExport() {
let exportURL, title;
if (this.activeName === 'his') {
exportURL = exportcostOriginRatioHisExcel;
title = '原片成本-原片良品率';
title = '原片-产线良品率';
} else {
exportURL = exportcostOriginWSRatioHisExcel;
title = '原片-工段良品率';
}
// 处理查询参数
let params = { ...this.listQuery };
params.pageNo = undefined;

View File

@@ -54,7 +54,7 @@
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getDataList" />
@pagination="getNavDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
const tableProps = [
{
prop: 'recTime',
prop: 'time',
label: '日期',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'otherCostName',
@@ -102,6 +105,10 @@ const tableProps = [
},
];
const tableProps2 = [
// {
// prop: 'remark',
// label: '备注',
// },
{
prop: 'otherCostName',
label: '成本名称',
@@ -182,13 +189,16 @@ export default {
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
defaultTime: ['08:30:00', '08:30:00'],
param: 'searchTime',
width: 350,
clearable: false,
},
{
type: 'button',
@@ -237,24 +247,20 @@ export default {
},
methods: {
buttonClick(val) {
if (val.statisticType === 2) {
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年第{w}周');
}else{
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年{m}月{d}日');
}
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.getDataList();
} else {
this.getDataList2();
@@ -265,13 +271,18 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
}
this.handleExport();
break;
default:
@@ -297,6 +308,13 @@ export default {
this.getDataList2();
}
},
getNavDataList(){
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
// 获取数据2列表
getDataList2() {
getRawOthercostSunPage(this.listQuery).then((response) => {

View File

@@ -65,6 +65,7 @@ const tableProps = [
prop: 'price',
label: '成本金额',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'remark',
@@ -161,7 +162,7 @@ export default {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name||null;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
@@ -174,7 +175,7 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name||null;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-12-05 13:45:59
* @LastEditors: zwq
* @LastEditTime: 2024-04-15 17:12:03
* @LastEditTime: 2024-12-25 16:20:38
* @Description
-->
<template>
@@ -10,9 +10,9 @@
<span>
{{
injectData.type == 1
? `每天等价,${injectData.price}`
? `每天等价,${Number(injectData.price)}`
: injectData.type == 2
? `总价${injectData.price}元,年折旧率${injectData.ratio}%,折旧年限${injectData.timeLimit}`
? `总价${Number(injectData.price)}元,年折旧率${injectData.ratio}%,折旧年限${injectData.timeLimit}`
: '-'
}}
</span>

View File

@@ -54,7 +54,7 @@
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getDataList" />
@pagination="getNavDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
const tableProps = [
{
prop: 'recTime',
prop: 'time',
label: '时间',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'bindObjectName',
@@ -98,32 +101,41 @@ const tableProps = [
{
prop: 'thick',
label: '厚度',
filter: (val) => (val != null ? Number(val).toFixed(1) : '-'),
},
{
prop: 'inArea',
label: '拉引量/m²',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'outArea',
label: '下片面积/m²',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'ratio',
label: '良品率',
filter: (val) => (val ? val * 100 + '%' : '-'),
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
},
{
prop: 'costSum',
label: '原片成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'costArea',
label: '每平米成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
];
const tableProps2 = [
{
prop: 'remark',
label: '备注',
},
{
prop: 'bindObjectName',
label: '产线',
@@ -135,34 +147,40 @@ const tableProps2 = [
{
prop: 'inArea',
label: '拉引量/m²',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'outArea',
label: '下片面积/m²',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'outCount',
label: '下片数量',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'ratio',
label: '良品率',
filter: (val) => (val ? val * 100 + '%' : '-'),
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
},
{
prop: 'costSum',
label: '原片成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'costPiece',
label: '单片成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
{
prop: 'costArea',
label: '每平米成本/元',
align: 'right',
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
},
];
export default {
@@ -224,13 +242,16 @@ export default {
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
defaultTime: ['08:30:00', '08:30:00'],
param: 'searchTime',
width: 350,
clearable: false,
},
{
type: 'select',
@@ -287,26 +308,20 @@ export default {
},
methods: {
buttonClick(val) {
if (val.statisticType === 2) {
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年第{w}周');
}else{
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年{m}月{d}日');
}
this.formConfig2[0].startPlaceholder = '开始时间';
this.formConfig2[0].endPlaceholder = '结束时间';
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.bindObjectId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.getDataList();
} else {
this.getDataList2();
@@ -317,13 +332,18 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.bindObjectId = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
}
this.handleExport();
break;
default:
@@ -345,15 +365,26 @@ export default {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
this.formConfig2[0].startPlaceholder = parseTime(start).substr(0, 10);
this.formConfig2[0].endPlaceholder = parseTime(end).substr(0, 10);
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
this.$nextTick(() => {
this.$refs.searchBarForm2.formInline.searchTime = [
this.listQuery.startTime,
this.listQuery.endTime,
];
});
this.listQuery.name = null;
this.listQuery.pageNo = 1;
this.getDataList2();
}
},
getNavDataList(){
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
// 获取数据2列表
getDataList2() {
if (this.listQuery.startTime) {

View File

@@ -0,0 +1,65 @@
<!--
* @Author: zwq
* @Date: 2023-08-01 15:27:31
* @LastEditors: zwq
* @LastEditTime: 2023-08-01 16:25:54
* @Description:
-->
<template>
<div :class="[className, { 'p-0': noPadding }]">
<slot />
</div>
</template>
<script>
export default {
props: {
size: {
// 取值范围: xl lg md sm
type: String,
default: 'de',
validator: function (val) {
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
},
},
noPadding: {
type: Boolean,
default: false,
},
},
computed: {
className: function () {
return `${this.size}-title`;
},
},
};
</script>
<style lang="scss" scoped>
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
$mgr: 8px;
@each $size, $height in $pxls {
.#{$size}-title {
font-size: 18px;
line-height: $height;
color: #000;
font-weight: 500;
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
&::before {
content: '';
display: inline-block;
vertical-align: top;
width: 4px;
height: $height + 2px;
border-radius: 1px;
margin-right: $mgr;
background-color: #0b58ff;
}
}
}
.p-0 {
padding: 0;
}
</style>

View File

@@ -0,0 +1,134 @@
<template>
<el-dialog :visible.sync="visible" width="40%">
<small-title slot="title" :no-padding="true">
{{ this.dataForm.lineId + '·' + this.dataForm.equipmentName }}
</small-title>
<div class="content">
<div class="visual-part">
<base-table :table-props="tableProps"
:page="listQuery.pageNo" :limit="listQuery.pageSize" :table-data="tableData">
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> -->
</base-table>
</div>
</div>
<!-- <div slot="footer" class="dialog-footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">
确定
</el-button>
</div> -->
</el-dialog>
</template>
<script>
const tableProps = [
{
prop: 'paramName',
label: '参数名称'
},
{
prop: 'paramValue',
label: '当前值',
// filter: parseTime,
// width: 160
},
];
import { getParamMonitor } from '@/api/base/equipment';
// import { parseTime } from '../../mixins/code-filter';
import SmallTitle from './SmallTitle';
export default {
components: { SmallTitle },
data() {
return {
visible: false,
tableProps,
tableData:[],
listQuery: {
pageNo: 1,
pageSize:100,
},
addOrUpdateVisible: false,
dataForm: {
equipmentId:undefined,
equipmentName: undefined,
lineId: undefined,
},
};
},
methods: {
init(data) {
console.log(data.paramMonitors,'data');
this.dataForm.equipmentId = data.equipmentId || '';
this.dataForm.equipmentName = data.equipmentName || '';
this.dataForm.lineId = data.lineId || '';
this.visible = true;
this.$nextTick(() => {
// this.$refs['dataForm'].resetFields();
// getParamMonitor({
// equipmentId:this.dataForm.equipmentId
// }).then((res) => {
this.tableData = data.paramMonitors
// })
});
}
},
};
</script>
<style scoped>
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
display: flex;
flex-direction: column;
}
.drawer >>> .el-form-item__label {
padding: 0;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
}
.drawer >>> .el-drawer__body {
flex: 1;
height: 1px;
display: flex;
flex-direction: column;
}
.drawer >>> .content {
padding: 30px 24px;
flex: 1;
display: flex;
flex-direction: column;
/* height: 100%; */
}
.drawer >>> .visual-part {
flex: 1 auto;
max-height: 76vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px; /* 调整滚动条样式 */
}
.drawer >>> .el-form,
.drawer >>> .attr-list {
padding: 0 16px;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
}
</style>

View File

@@ -0,0 +1,561 @@
<template>
<el-dialog :visible.sync="visible" width="80%" @close="handleClose" title-class="dialog-title">
<small-title slot="title" :no-padding="true">
{{ dataForm.lineId + '·' + dataForm.equipmentName }}
</small-title>
<search-bar removeBlue :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<el-tabs class="custom-tabs" v-model="activeLabel" :stretch="true" @tab-click="handleTabClick">
<el-tab-pane :label="'\u3000报警时长\u3000'" name="duration"></el-tab-pane>
<el-tab-pane :label="'\u3000报警次数\u3000'" name="times"></el-tab-pane>
</el-tabs>
<div class="content">
<div class="visual-part">
<div v-if="hasData" style="display: flex; justify-content: space-around; gap: 20px; padding: 10px 0;">
<!-- 移除 v-if始终渲染两个图表容器 -->
<div id="barChart" style="width: 48%; height: 400px;"></div>
<div id="pieChart" style="width: 48%; height: 400px;"></div>
</div>
<div v-if="!hasData" class="no-data">
<el-empty description="暂无相关报警数据"></el-empty>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import { getAlarmDet } from '@/api/base/equipment';
import * as echarts from 'echarts';
import SmallTitle from './SmallTitle';
const CHART_CONFIG = {
barColor: '#288AFF',
pieColors: [
'#288AFF', '#4096FF', '#69B1FF', '#91CFFF', '#B8E0FF',
'#E0F2FF', '#1890FF', '#096DD9', '#0050B3', '#003A8C'
],
fontColor: '#333',
lightFontColor: '#666',
borderRadius: 4
};
export default {
components: { SmallTitle },
data() {
return {
visible: false,
hasData: false,
listQuery: {
pageNo: 1,
pageSize: 100,
equipmentId: undefined,
startTime: undefined,
endTime: undefined
},
formConfig: [
{
type: 'datePicker',
label: '时间段',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'timestamp',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
defaultTime: ['00:00:00', '23:59:59'],
defaultSelect: []
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary'
}
],
activeLabel: 'duration', // 默认选中「报警时长」
dataForm: {
equipmentId: undefined,
equipmentName: undefined,
lineId: undefined
},
chartInstances: {
bar: null,
pie: null
},
isDomReady: false,
originData: null // 存储原始数据
};
},
mounted() {
this.$nextTick(() => {
this.isDomReady = true;
if (this.listQuery.equipmentId) {
this.getDataList();
}
});
},
watch: {
// Tab 切换时自动刷新图表(无需额外操作,依赖 handleTabClick 触发查询)
activeLabel() {
if (this.isDomReady && this.originData) {
this.$nextTick(() => {
this.renderBothCharts(); // 切换 Tab 后重新渲染两个图表
});
}
}
},
methods: {
initDefaultDate() {
const today = new Date();
const start = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 0, 0, 0, 0).getTime();
const end = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 23, 59, 59, 0).getTime();
this.formConfig[0].defaultSelect = [start, end];
this.listQuery.startTime = start;
this.listQuery.endTime = end;
if (this.$refs.searchBarForm) {
this.$refs.searchBarForm.form.timeVal = [start, end];
}
},
handleTabClick() {
// 切换 Tab 时重新查询数据(或直接复用已有数据渲染)
this.getDataList();
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.startTime = val.timeVal?.[0];
this.listQuery.endTime = val.timeVal?.[1];
this.getDataList();
break;
default:
}
},
async getDataList() {
try {
if (!this.listQuery.equipmentId) {
console.warn('设备ID不能为空');
this.hasData = false;
return;
}
const queryParams = {
equipmentId: this.listQuery.equipmentId,
startTime: this.listQuery.startTime,
endTime: this.listQuery.endTime,
};
const res = await getAlarmDet(queryParams);
const originData = res.data || [];
this.originData = originData;
this.hasData = originData.length > 0;
if (this.hasData && this.isDomReady) {
this.$nextTick(() => {
this.renderBothCharts(); // 数据查询成功后,同时渲染两个图表
});
} else {
this.destroyAllCharts();
}
} catch (error) {
console.error('获取报警数据失败:', error);
this.hasData = false;
this.destroyAllCharts();
}
},
// 核心方法:同时渲染柱状图和饼图(根据当前 Tab 类型)
renderBothCharts() {
if (this.activeLabel === 'duration') {
// 报警时长:柱状图(时长排序)+ 饼图(时长占比)
this.renderBarChart('duration');
this.renderPieChart('duration');
} else {
// 报警次数:柱状图(次数排序)+ 饼图(次数占比)
this.renderBarChart('times');
this.renderPieChart('times');
}
},
// 渲染柱状图(支持两种数据类型)
renderBarChart(type) {
this.destroyChart('bar');
const chartDom = document.getElementById('barChart');
if (!chartDom || !this.originData.length) return;
// 根据类型排序和提取数据
let sortedData, xData, seriesData, yAxisName;
if (type === 'duration') {
// 报警时长:按时长降序
sortedData = [...this.originData].sort((a, b) => b.alarmDuration - a.alarmDuration);
seriesData = sortedData.map(item => item.alarmDuration);
yAxisName = '报警时长';
} else {
// 报警次数:按次数降序
sortedData = [...this.originData].sort((a, b) => b.alarmCount - a.alarmCount);
seriesData = sortedData.map(item => item.alarmCount);
yAxisName = '报警次数';
}
xData = sortedData.map(item => this.truncateText(item.alarmContent, 8));
try {
this.chartInstances.bar = echarts.init(chartDom);
const option = {
title: {
text: `${yAxisName}统计(柱状图)`,
left: 'center',
textStyle: { fontSize: 14, color: CHART_CONFIG.fontColor }
},
tooltip: {
trigger: 'axis',
axisPointer: { type: 'shadow' },
padding: 10,
textStyle: { fontSize: 11 },
formatter: (params) => {
const index = params[0].dataIndex;
const item = sortedData[index];
return `
<div style="text-align: left;">
<div>${item.alarmContent}</div>
<div>${yAxisName}${type === 'duration' ? item.alarmDuration : item.alarmCount}</div>
<div>占比:${type === 'duration' ? item.alarmDurationRatio.toFixed(2) : item.alarmCountRatio.toFixed(2)}%</div>
</div>
`;
}
},
grid: {
left: '5%',
right: '5%',
bottom: '18%',
top: '15%',
containLabel: true
},
xAxis: [
{
type: 'category',
data: xData,
axisTick: { alignWithLabel: true },
axisLabel: {
interval: 0,
fontSize: 12,
color: CHART_CONFIG.lightFontColor
},
axisLine: { lineStyle: { color: '#e8e8e8' } }
}
],
yAxis: [
{
type: 'value',
name: yAxisName,
nameTextStyle: { fontSize: 11, color: CHART_CONFIG.lightFontColor },
axisLabel: {
fontSize: 11,
color: CHART_CONFIG.lightFontColor,
},
axisLine: { lineStyle: { color: '#e8e8e8' } },
splitLine: { lineStyle: { color: '#f5f5f5' } },
max: (value) => value.max * 1.2
}
],
series: [
{
name: yAxisName,
type: 'bar',
itemStyle: {
color: CHART_CONFIG.barColor,
borderRadius: [CHART_CONFIG.borderRadius, CHART_CONFIG.borderRadius, 0, 0],
shadowBlur: 3,
shadowColor: 'rgba(40, 138, 255, 0.2)',
shadowOffsetY: 2
},
barWidth: '16',
data: seriesData,
label: {
show: true,
position: 'top',
distance: 6,
fontSize: 11,
color: CHART_CONFIG.fontColor,
formatter: (params) => `${params.value}`
}
}
]
};
this.chartInstances.bar.setOption(option);
this.addResizeListener('bar');
} catch (error) {
console.error(`${yAxisName}柱状图初始化失败:`, error);
setTimeout(() => this.renderBarChart(type), 200);
}
},
// 渲染饼图(支持两种数据类型)
renderPieChart(type) {
this.destroyChart('pie');
const chartDom = document.getElementById('pieChart');
if (!chartDom || !this.originData.length) return;
// 根据类型处理饼图数据
let pieData, seriesName;
if (type === 'duration') {
// 报警时长:按时长占比处理
seriesName = '报警时长';
pieData = this.handlePieData(this.originData, 'alarmDuration', 'alarmDurationRatio');
} else {
// 报警次数:按次数占比处理
seriesName = '报警次数';
pieData = this.handlePieData(this.originData, 'alarmCount', 'alarmCountRatio');
}
try {
this.chartInstances.pie = echarts.init(chartDom);
const option = {
title: {
text: `${seriesName}统计(饼图)`,
left: 'center',
textStyle: { fontSize: 14, color: CHART_CONFIG.fontColor }
},
tooltip: {
trigger: 'item',
padding: 10,
textStyle: { fontSize: 11 },
formatter: (params) => {
return `
<div style="text-align: left;">
<div>${params.name}</div>
<div>${seriesName}${params.value}${type === 'duration' ? '' : '次'}</div>
<div>占比:${params.percent.toFixed(2)}%</div>
</div>
`;
}
},
series: [
{
name: seriesName,
type: 'pie',
radius: ['50%', '70%'],
center: ['50%', '55%'],
color: CHART_CONFIG.pieColors,
label: {
show: true,
position: 'outside',
distance: 15,
fontSize: 11,
color: CHART_CONFIG.lightFontColor,
formatter: (params) => {
const truncatedName = this.truncateText(params.name, 8);
return `${truncatedName}(${params.value}${type === 'duration' ? '' : '次'}, ${params.percent.toFixed(1)}%)`;
},
align: 'center',
baseline: 'middle'
},
labelLine: {
show: true,
length: 15,
length2: 20,
lineStyle: {
color: '#ccc',
width: 1,
type: 'solid'
},
smooth: 0.2
},
data: pieData,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowColor: 'rgba(0, 0, 0, 0.1)'
},
label: {
color: CHART_CONFIG.fontColor,
fontSize: 12,
fontWeight: 500
},
labelLine: {
lineStyle: {
color: CHART_CONFIG.barColor,
width: 1.5
}
}
}
}
]
};
this.chartInstances.pie.setOption(option);
this.addResizeListener('pie');
} catch (error) {
console.error(`${seriesName}饼图初始化失败:`, error);
setTimeout(() => this.renderPieChart(type), 200);
}
},
// 通用饼图数据处理(支持动态字段)
handlePieData(data, valueKey, ratioKey) {
const threshold = 5; // 占比低于5%合并为「其他」
let otherCount = 0;
const mainData = data.filter(item => {
if (item[ratioKey] >= threshold) {
return true;
} else {
otherCount += item[valueKey];
return false;
}
}).map(item => ({
name: item.alarmContent,
value: item[valueKey],
ratio: item[ratioKey]
}));
if (otherCount > 0) {
mainData.push({
name: '其他',
value: otherCount,
ratio: 100 - mainData.reduce((sum, item) => sum + item.ratio, 0)
});
}
return mainData;
},
truncateText(text, maxLength) {
if (!text) return '';
return text.length > maxLength ? text.slice(0, maxLength) + '...' : text;
},
addResizeListener(type) {
const chart = this.chartInstances[type];
if (chart) {
const resizeHandler = () => chart.resize();
window.addEventListener('resize', resizeHandler);
chart.resizeHandler = resizeHandler;
}
},
destroyChart(type) {
const chart = this.chartInstances[type];
if (chart) {
window.removeEventListener('resize', chart.resizeHandler);
chart.dispose();
this.chartInstances[type] = null;
}
},
destroyAllCharts() {
Object.keys(this.chartInstances).forEach(type => {
this.destroyChart(type);
});
},
handleClose() {
this.destroyAllCharts();
this.formConfig[0].defaultSelect = [];
this.listQuery.startTime = undefined;
this.listQuery.endTime = undefined;
this.originData = null;
this.hasData = true;
if (this.$refs.searchBarForm) {
// this.$refs.searchBarForm.form.timeVal = [];
}
},
init(data) {
this.dataForm = {
equipmentId: data.equipmentId || '',
equipmentName: data.equipmentName || '',
lineId: data.lineId || ''
};
this.activeLabel = 'duration'
this.listQuery.equipmentId = data.equipmentId || undefined;
this.visible = true;
this.originData = null;
this.hasData = false;
this.initDefaultDate();
this.$nextTick(() => {
this.$nextTick(() => {
this.isDomReady = true;
this.getDataList();
});
});
}
},
beforeDestroy() {
this.destroyAllCharts();
}
};
</script>
<style scoped>
/* 保持原有样式,优化图表容器布局 */
.drawer>>>.el-drawer {
border-radius: 8px 0 0 8px;
display: flex;
flex-direction: column;
}
.drawer>>>.el-form-item__label {
padding: 0;
}
.drawer>>>.el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
}
.drawer>>>.el-drawer__body {
flex: 1;
height: 1px;
display: flex;
flex-direction: column;
}
.drawer>>>.content {
padding: 30px 24px;
flex: 1;
display: flex;
flex-direction: column;
}
.drawer>>>.visual-part {
flex: 1 auto;
max-height: 76vh;
overflow: hidden;
padding: 10px 0;
}
/* 优化图表容器响应式布局 */
@media (max-width: 1200px) {
.visual-part>div {
flex-direction: column;
}
#barChart,
#pieChart {
width: 100% !important;
height: 350px !important;
margin-bottom: 20px;
}
}
.drawer>>>.el-form,
.drawer>>>.attr-list {
padding: 0 16px;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,96 @@
<!--
* @Author: zwq
* @Date: 2025-10-23 13:43:55
* @LastEditors: zwq
* @LastEditTime: 2025-11-14 21:13:10
* @Description:
-->
<template>
<div class="app-container" style="padding-top: 0">
<div v-for="item in groupClassArr" :key="item.planId">
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
{{ item.deptName + ' - ' + item.planName }}
</small-title>
<base-table
:table-props="tableProps"
:table-data="
tableData.filter((titem) => titem.schedulingPlanId == item.planId)
"></base-table>
</div>
</div>
</template>
<script>
import SmallTitle from '../Schedule/SmallTitle';
const tableProps = [
{
prop: 'classesName',
label: '班次名称',
},
{
prop: 'workTime',
label: '班次时间',
},
{
prop: 'teamName',
label: '班组名称',
},
{
prop: 'teamLeader',
label: '组长',
},
{
prop: 'teamLeaderPhone',
label: '组长电话',
},
];
export default {
components: {
SmallTitle,
},
data() {
return {
tableProps,
tableData: [],
groupClassArr: [],
};
},
created() {},
methods: {
init(det, detSort) {
this.tableData = det;
//返回计划名和id
const arr = det.map((item) => {
const obj = {
planName: item.schedulingPlanName,
planId: item.schedulingPlanId,
deptName: item.belongDeptName,
};
return obj;
});
//去重
const map = new Map();
arr.forEach((item) => {
if (!map.has(item.planId)) {
map.set(item.planId, item);
}
});
const newArr = Array.from(map.values());
// 创建B数组中id的顺序映射
const orderMap = new Map();
detSort.forEach((item, index) => {
orderMap.set(item, index);
});
// 根据B的顺序对A进行排序
this.groupClassArr = [...newArr].sort((a, b) => {
const orderA = orderMap.get(a.planId);
const orderB = orderMap.get(b.planId);
return orderA - orderB;
});
},
},
};
</script>

View File

@@ -0,0 +1,612 @@
<!--
* @Author: zwq
* @Date: 2025-10-23 13:43:55
* @LastEditors: zwq
* @LastEditTime: 2025-11-25 09:39:43
* @Description:
-->
<template>
<div
class="app-container"
style="
background-color: #f2f4f9;
padding: 0;
display: grid;
grid-template-columns: 1fr 5fr;
gap: 10px;
">
<div class="head-container">
<el-tabs v-model="activeName" stretch @tab-click="tabsClick">
<el-tab-pane label="部门" name="first"></el-tab-pane>
<el-tab-pane label="班组" name="second"></el-tab-pane>
</el-tabs>
<div v-if="activeName == 'first'">
<el-input
v-model="deptName"
placeholder="请输入部门名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px" />
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick" />
</div>
<div v-else>
<el-input
v-model="groupName"
placeholder="请输入班组名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px" />
<el-tree
:data="groupOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree1"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick1" />
</div>
</div>
<div class="groupTeamScheduling">
<div class="operationArea">
<el-form :inline="true" class="demo-form-inline">
<span class="blue-block"></span>
<el-form-item label="月份选择">
<el-date-picker
v-model="startDay"
type="month"
placeholder="选择月"
size="small"
@change="selectMonth"
:clearable="false"
style="width: 120px"></el-date-picker>
<span
style="color: #909399; font-size: 12px"
v-if="activeName == 'first'">
提示排班日历仅展示当前选中部门的节假日设置若休假日中仍有排班则表示下级组织已通过自定义假期进行排班
</span>
<span v-else style="margin-left: 10px">
组长:
<span style="font-weight: 600; margin: 0 10px">
{{ showTeamName?.leaderName || '-' }}
</span>
组长电话:
<span style="font-weight: 600; margin: 0 10px">
{{ showTeamName?.leaderPhone || '-' }}
</span>
</span>
</el-form-item>
<el-form-item style="float: right">
<el-button
size="small"
type="primary"
@click="(startDay = new Date()), getHolidayPage()">
跳转到今天
</el-button>
</el-form-item>
</el-form>
</div>
<!-- 日历区域 -->
<div class="calenderArea">
<el-calendar v-model="startDay">
<template slot="dateCell" slot-scope="{ data }">
<div v-if="data.type === 'current-month'">
<!-- 日期 -->
<div class="dateStyle">
<el-row :gutter="20">
<!-- 公历和农历 -->
<el-col :span="18">
{{ Number(data.day.split('-')[2]) }}
<div class="lunar-date">{{ getLunarDate(data.day) }}</div>
</el-col>
<!-- 显示假或班 -->
<el-col :span="6">
<div
class="work-tip"
:style="{
backgroundColor: HolidayList[
Number(data.day.split('-')[2]) - 1
]?.isHoliday
? '#67C23A'
: '#409EFF',
}">
{{
HolidayList[Number(data.day.split('-')[2]) - 1]
?.isHoliday
? '假'
: '班'
}}
<!-- //变更节假日未更新排班计划的角标 -->
<div
class="subIcon"
v-if="
HolidayList[Number(data.day.split('-')[2]) - 1]
?.isUpdate
">
<el-tooltip
effect="dark"
content="本日节假日变更已影响当前排班计划,但尚未同步,请及时处理。"
placement="top">
<i class="el-icon-warning" style="color: #f56c6c"></i>
</el-tooltip>
</div>
</div>
</el-col>
<!-- 显示排班 -->
<div
v-if="
HolidayList[Number(data.day.split('-')[2]) - 1]?.det
.length > 0
">
<el-col
:span="24"
v-for="(item, index) in HolidayList[
Number(data.day.split('-')[2]) - 1
]?.det.filter(
(item) =>
item.schedulingPlanId ==
HolidayList[Number(data.day.split('-')[2]) - 1]
?.schedulingPlanId
)"
:key="index">
<el-tooltip
effect="dark"
content="点击展示全部排班计划"
placement="top-start">
<div
class="holiday-div"
:style="{
backgroundColor: holidayDivColor[item?.classesCode],
}"
@click="
holidayLog(
HolidayList[Number(data.day.split('-')[2]) - 1]
?.det,
HolidayList[Number(data.day.split('-')[2]) - 1]
?.date,
HolidayList[Number(data.day.split('-')[2]) - 1]
?.detSort
)
"
:title="
item.classesName +
' | ' +
item.teamName +
' | ' +
item.workTime
">
{{
item.classesName +
' | ' +
item.teamName +
' | ' +
item.workTime
}}
</div>
</el-tooltip>
</el-col>
</div>
</el-row>
</div>
</div>
<div
v-else
style="font-size: 20px; font-weight: 500; text-align: left">
<el-row :gutter="20">
<el-col :span="24">
{{ Number(data.day.split('-')[2]) }}
<span style="font-size: 12px">
{{ getLunarDate(data.day) }}
</span>
</el-col>
</el-row>
</div>
</template>
</el-calendar>
</div>
</div>
<base-dialog
:dialogTitle="dialogTitle"
:dialogVisible="logVisible"
@cancel="cancelLog"
:before-close="cancelLog"
:destroy-on-close="true"
width="70%">
<holiday-log ref="holidayLogRef"></holiday-log>
<template #footer>
<slot name="footer">
<el-row slot="footer" type="flex" justify="end">
<el-col :span="24">
<el-button size="small" class="btnTextStyle" @click="cancelLog">
取消
</el-button>
</el-col>
</el-row>
</slot>
</template>
</base-dialog>
</div>
</template>
<script>
import moment from 'moment';
import { solarToLunar } from 'chinese-lunar';
import { getUserProfile } from '@/api/system/user';
import { listByDeptId } from '@/api/group/Schedule';
import { getEnableData } from '@/api/group/holidaySetting';
import {
getDeptSchedulingList,
getClassSchedulingList,
} from '@/api/group/calendar';
import holidayLog from './holidayLog';
export default {
name: '',
components: {
holidayLog,
},
data() {
return {
activeName: 'first',
startDay: '', // 查询参数
HolidayList: [],
// 选择的部门名称
showDeptName: undefined,
showTeamName: {},
// 部门树选项
deptOptions: undefined,
groupOptions: undefined,
// 查询的部门名称
deptName: undefined,
groupName: undefined,
topDept: {}, // 保存当前用户的部门id为最高级部门id
deptId: undefined,
teamId: undefined,
defaultProps: {
children: 'children',
label: 'name',
},
logVisible: false,
dialogTitle: '',
holidayDivColor: ['#67c23a', '#69d983', '#f5c931', '#4fa6f0'],
};
},
watch: {
// 根据名称筛选部门树
deptName(val) {
this.$refs.tree.filter(val);
},
groupName(val) {
this.$refs.tree1.filter(val);
},
},
created() {
this.startDay = new Date();
// 查询用户个人信息
getUserProfile().then((response) => {
this.showDeptName = response.data.dept.name || '';
this.topDept = {
name: response.data.dept.name || '',
id: response.data.dept.id || '',
}; // 保存当前用户的部门为最高级部门id
this.deptId = response.data.dept.id || '';
this.getHolidayPage();
this.getTreeselect();
});
},
methods: {
getHolidayPage() {
const now = new Date(this.startDay);
const year = now.getFullYear();
const month = now.getMonth();
const startTime = `${year}-${String(month + 1).padStart(2, '0')}-01`;
const lastDate = new Date(year, month + 1, 0).getDate();
const endTime = `${year}-${String(month + 1).padStart(2, '0')}-${String(
lastDate
).padStart(2, '0')}`;
this.HolidayList = [];
if (this.activeName == 'first') {
getDeptSchedulingList({
deptId: this.deptId,
startTime: Date.parse(startTime),
endTime: Date.parse(endTime),
}).then((res) => {
this.HolidayList = res.data;
});
} else {
getClassSchedulingList({
teamId: this.teamId,
startTime: Date.parse(startTime),
endTime: Date.parse(endTime),
}).then((res) => {
this.HolidayList = res.data;
});
}
},
// 切换月份
selectMonth() {
this.getHolidayPage();
},
/** 查询部门下拉树结构 */
getTreeselect() {
getEnableData().then((response) => {
// 处理 deptOptions 参数
this.deptOptions = [];
this.deptOptions.push(...this.handleTree1(response.data, 'id'));
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.deptId);
});
});
listByDeptId(this.topDept.id).then((response) => {
this.groupOptions = [];
this.groupOptions.push(...response.data);
});
},
//大整数精度丢失
handleTree1(data, fid) {
const id = fid || 'id';
const parentId = 'parentId';
const children = 'children';
const rootId =
data
.map((item) => item[parentId].toString())
.reduce((min, current) => {
if (current.length < min.length) return current;
if (current.length > min.length) return min;
return current < min ? current : min;
}) || 0;
//对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data));
//循环所有项
const treeData = cloneData.filter((father) => {
let branchArr = cloneData.filter((child) => {
//返回每一项的子级数组
return father[id] == child[parentId];
});
branchArr.length > 0 ? (father.children = branchArr) : '';
//返回第一层
return father[parentId] == rootId;
});
return treeData !== '' ? treeData : data;
},
// 筛选节点
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
tabsClick() {
if (this.activeName == 'second' && this.groupOptions.length > 0) {
this.teamId = this.groupOptions[0].id;
this.showTeamName = {
leaderName: this.groupOptions[0].leaderName || '-',
leaderPhone: this.groupOptions[0].leaderPhone || '-',
};
this.$nextTick(() => {
this.$refs.tree1.setCurrentKey(this.teamId);
});
} else if (this.activeName == 'first') {
this.deptId = this.topDept.id;
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.deptId);
});
}
this.getHolidayPage();
},
// 节点单击事件
handleNodeClick(data) {
this.deptId = data.id;
this.showDeptName = data.name;
this.getHolidayPage();
},
handleNodeClick1(data) {
this.teamId = data.id;
this.showTeamName = {
leaderName: data.leaderName || '-',
leaderPhone: data.leaderPhone || '-',
};
this.getHolidayPage();
},
//获取农历
getLunarDate(solarDate) {
try {
const [year, month, day] = solarDate.split('-').map(Number);
const date = new Date(year, month - 1, day);
const lunar = solarToLunar(date);
// 将数字月份和日期转换为中文
const monthMap = {
1: '正',
2: '二',
3: '三',
4: '四',
5: '五',
6: '六',
7: '七',
8: '八',
9: '九',
10: '十',
11: '冬',
12: '腊',
};
const dayMap = {
1: '初一',
2: '初二',
3: '初三',
4: '初四',
5: '初五',
6: '初六',
7: '初七',
8: '初八',
9: '初九',
10: '初十',
11: '十一',
12: '十二',
13: '十三',
14: '十四',
15: '十五',
16: '十六',
17: '十七',
18: '十八',
19: '十九',
20: '二十',
21: '廿一',
22: '廿二',
23: '廿三',
24: '廿四',
25: '廿五',
26: '廿六',
27: '廿七',
28: '廿八',
29: '廿九',
30: '三十',
};
// 返回 "三月初四" 格式
return `${monthMap[lunar.month]}月${dayMap[lunar.day]}`;
} catch (error) {
console.log(error);
return '';
}
},
holidayLog(det, date, detSort) {
this.dialogTitle = this.showDeptName + '-' + date + '-排班详情';
this.logVisible = true;
this.$nextTick(() => {
this.$refs.holidayLogRef.init(det, detSort);
});
},
cancelLog() {
this.dialogTitle = '';
this.logVisible = false;
},
},
};
</script>
<style lang="scss">
.head-container {
padding: 20px 10px 0;
background-color: #fff;
border-radius: 8px;
height: 100%;
}
.groupTeamScheduling {
.operationArea {
padding: 14px 10px 0 16px;
margin-bottom: 8px;
background-color: #fff;
border-radius: 8px;
.blue-block {
display: inline-block;
width: 4px;
height: 16px;
background-color: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 10px;
}
.el-form-item {
margin-bottom: 10px;
}
}
// 日历
.calenderArea {
padding: 14px 10px 0 20px;
background-color: #fff;
border-radius: 8px;
min-height: calc(100vh - 120px - 8px - 168px);
.el-calendar__body {
padding: 10px 16px 16px 0;
}
.el-calendar__header {
display: none;
}
.el-calendar-table > thead {
height: 48px;
font-size: 20px;
font-weight: 500;
color: #000000;
background-color: rgba(242, 244, 249, 1);
}
.el-calendar-table__row {
height: 133px;
.prev,
.next {
pointer-events: none;
}
.is-selected,
.is-today {
background-color: #e4f0fd;
}
.el-calendar-day {
padding: 0;
height: 100%;
:hover {
background-color: #e4f0fd;
}
.dateStyle {
font-size: 20px;
font-weight: 500;
color: #000000;
text-align: left;
height: 133px;
line-height: 28px;
padding: 10px;
overflow: hidden;
.lunar-date {
display: inline-block;
font-size: 12px;
color: #909399;
}
.work-tip {
background: #87c1ff;
color: white;
font-size: 18px;
width: 30px;
text-align: center;
float: right;
position: relative;
.subIcon {
position: absolute;
top: -18px;
right: -10px;
font-size: 10px;
}
}
.holiday-div {
background-color: #67c23a;
border-radius: 3px;
height: 25px;
text-align: center;
font-size: 12px;
line-height: 24px;
color: #fff;
margin-bottom: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
}
}
</style>

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2025-10-11 14:27:37
* @LastEditors: zwq
* @LastEditTime: 2025-10-15 16:47:28
* @LastEditTime: 2025-11-14 22:00:10
* @Description:
-->
<template>
@@ -12,6 +12,9 @@
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
ref="groupTableRef"
:id="'groupTableSelectRef'"
row-key="id"
:selectWidth="55"
@selection-change="selectChange"
:table-props="tableProps"
@@ -22,7 +25,7 @@
</template>
<script>
import { listByDeptId } from '@/api/group/Schedule';
import { getGroupPage } from '@/api/group/groupSetting';
const tableProps = [
{
@@ -36,7 +39,7 @@ const tableProps = [
width: 100,
},
{
prop: 'deptId',
prop: 'deptName',
label: '所属部门',
},
{
@@ -46,6 +49,7 @@ const tableProps = [
{
prop: 'remark',
label: '备注',
showOverflowtooltip: true,
},
];
@@ -53,7 +57,7 @@ export default {
data() {
return {
urlOptions: {
getDataListURL: listByDeptId,
getDataListURL: getGroupPage,
},
tableProps,
tableData: [],
@@ -82,24 +86,55 @@ export default {
pageSize: 100,
code: '',
name: '',
deptId: undefined,
},
selectedList: [],
deptId: undefined
selectedArr: [], //已选的班组,从父组件传过来的
};
},
created() {},
methods: {
init(id){
this.deptId = id
this.getDataList()
},
init(id, tableData) {
this.formInline.deptId = id;
this.selectedArr = tableData || [];
this.$nextTick(() => {
this.getDataList();
});
},
// 获取数据列表
getDataList() {
this.urlOptions
.getDataListURL(this.deptId)
.then((response) => {
this.tableData = response.data;
this.urlOptions.getDataListURL(this.formInline).then((response) => {
this.tableData = response.data.list.filter(item=>item.enabled===1);
this.tableData.forEach(item=>item.teamId= item.id)
this.$nextTick(() => {
if (this.selectedArr.length > 0) {
this.setSelectedRows();
}
});
});
},
setSelectedRows() {
const table = this.$refs.groupTableRef.$children[0];
// 先清空选择
table.clearSelection();
this.selectedArr.forEach((item) => {
const rowInTable = this.tableData.find((i) => i.teamId === item.teamId);
if (rowInTable) {
//这里一定要用table.tableData这样才是指向同一个数组
this.$set(table.store.states, 'selection', [
...table.store.states.selection,
table.tableData.find((i) => i.teamId === item.teamId),
]);
}
});
// 强制更新视图
this.$nextTick(() => {
table.$forceUpdate();
this.$forceUpdate();
});
},
buttonClick(val) {
switch (val.btnName) {
@@ -115,9 +150,22 @@ export default {
selectChange(val) {
this.selectedList = val;
},
// 判断两个数组是否有重复的 id,去重
hasDuplicateIds(arr1, arr2) {
return arr2.filter(
(item2) => !arr1.some((item1) => item1.teamId === item2.teamId)
);
},
dataFormSubmit() {
if (this.selectedList && this.selectedList.length > 0) {
this.selectedList = this.hasDuplicateIds(
this.selectedArr,
this.selectedList
);
this.$emit('refreshTableData', this.selectedList);
} else if (this.selectedArr.length > 0) {
this.$message('请不要重复添加数组');
}
},
},

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2025-10-16 16:37:40
* @LastEditTime: 2025-11-25 15:49:17
* @Description:
-->
<template>
@@ -13,10 +13,14 @@
:to_data="toData"
@add-btn="add"
@remove-btn="remove"
pid="pid"
:defaultProps="{ label: 'name' }"
pid="fid"
:node_key="'uniqueId'"
:defaultProps="{
label: 'name',
children: 'children',
}"
height="450px"
style="padding-bottom:20px"
style="padding-bottom: 20px"
:mode="mode"
filter
openAll></tree-transfer>
@@ -31,7 +35,6 @@ export default {
components: { treeTransfer },
data() {
return {
groupId: undefined,
title: ['待选', '已选'],
mode: 'transfer',
fromData: [], //左边内容
@@ -39,30 +42,68 @@ export default {
};
},
methods: {
init(id) {
init(val) {
this._pageIndex = val._pageIndex - 1;
this.fromData = [];
this.toData = [];
this.groupId = id;
getGroupPlanTree().then((res) => {
this.fromData = res.data;
this.fromData.forEach((item) => {
res.data.forEach((item) => {
item.productionLineId = 0;
});
this.fromData = this.generateUniqueData(res.data);
this.$nextTick(() => {
this.toData = val.bindLineTree || [];
this.getFilterLeftData(this.fromData, this.toData); //编辑时组件有bug左边相同数据不消失
});
});
},
generateUniqueData(data) {
return data.map((node) => this.processNode(node));
},
processNode(node) {
// 创建唯一ID类型-原始ID
const uniqueId = node.type+'L'+node.id;
if (node.type > 0) {
node.fid = (node.type - 1)+'L'+node.pid;
}
return {
...node,
uniqueId,
children: node.children
? node.children.map((child) => this.processNode(child))
: [],
};
},
// 监听穿梭框组件添加
add(fromData, toData, obj) {
console.log('fromData:', fromData);
console.log('toData:', toData,obj);
console.log('toData:', toData, obj);
},
// 监听穿梭框组件移除
remove(fromData, toData, obj) {
console.log('fromData:', fromData);
console.log('toData:', toData);
},
/** 消除组件左边与右边选中数据相同项 */
// 处理过滤数据
getFilterLeftData(data, selData) {
for (let i = data.length - 1; i >= 0; i--) {
for (let j = selData.length - 1; j >= 0; j--) {
if (data[i] && data[i].id === selData[j].id) {
// 当id相等可以删除的情况 即:没有子级可以删除;
if (!data[i].children || data[i].children.length == 0) {
data.splice(i, 1);
} else {
this.getFilterLeftData(data[i].children, selData[j].children);
}
}
}
}
},
// 表单提交
dataFormSubmit() {
this.$emit('refreshTableData',this.toData);
this.$emit('refreshTableData', this._pageIndex, this.toData);
},
},
};

View File

@@ -0,0 +1,206 @@
<!--
* @Author: zwq
* @Date: 2025-10-21 14:27:23
* @LastEditors: zwq
* @LastEditTime: 2025-11-25 15:14:53
* @Description:
-->
<template>
<div>
<div class="info-div">
<div>
<span class="title">计划编号:</span>
{{ infoData.code }}
</div>
<div>
<span class="title">计划状态:</span>
{{ ['', '草稿', '已确认', '已作废'][infoData.status] }}
</div>
<div>
<span class="title">计划名称:</span>
{{ infoData.name }}
</div>
<div>
<span class="title">部门:</span>
{{ infoData.deptName }}
</div>
<div>
<span class="title">开始时间:</span>
{{ parseTime(infoData.startDay) }}
</div>
<div>
<span class="title">结束时间:</span>
{{ parseTime(infoData.endDay) }}
</div>
<div>
<span class="title">周末休假方式:</span>
{{ ['', '双休', '周六休', '周日休', '不休'][infoData.weekType] }}
</div>
<div>
<span class="title">倒班方式:</span>
{{ ['', '长白班', '两班倒', '三班倒'][infoData.shiftType] }}
</div>
<div>
<span class="title">同班次连排:</span>
{{ infoData.shiftSustainedNum }}
</div>
<div>
<span class="title">创建人:</span>
{{ infoData.creatorName }}
</div>
<div>
<span class="title">创建时间:</span>
{{ parseTime(infoData.createTime) }}
</div>
<div v-if="infoData.status == 3">
<span class="title">作废时间:</span>
{{ parseTime(infoData.disableTime) }}
</div>
<div>
<span class="title">备注:</span>
{{ infoData.remark }}
</div>
</div>
<div>
<el-tabs v-model="activeName" stretch>
<el-tab-pane label="班次" name="first"></el-tab-pane>
<el-tab-pane label="班组" name="second"></el-tab-pane>
</el-tabs>
<base-table
v-if="activeName == 'first'"
:table-props="tableProps1"
:page="1"
:limit="10"
:table-data="tableData1"></base-table>
<base-table
v-else
:table-props="tableProps2"
:page="1"
:limit="10"
:table-data="tableData2"></base-table>
</div>
</div>
</template>
<script>
import { parseTime } from '@/filter/code-filter';
import { getPlan } from '@/api/group/Schedule';
const tableProps1 = [
{
prop: 'name',
label: '班次名称',
},
{
prop: 'startTime',
label: '开始时间',
filter: (val) => {
return val ? val.slice(0, -3) : '-';
},
},
{
prop: 'endTime',
label: '结束时间',
filter: (val) => {
return val ? val.slice(0, -3) : '-';
},
},
{
prop: 'remark',
label: '备注',
},
];
const tableProps2 = [
{
prop: 'code',
label: '班组编号',
width: 140,
},
{
prop: 'name',
label: '班组名称',
},
{
prop: 'isProduction',
label: '是否生产班组',
filter: (val) => {
return val ? '是' : '否';
},
width: 110,
},
{
prop: 'lineName',
label: '产线及工段',
},
];
export default {
data() {
return {
infoData: {},
activeName: 'first',
tableProps1,
tableData1: [],
tableProps2,
tableData2: [],
};
},
methods: {
init(id) {
this.infoData = {};
getPlan(id).then((res) => {
this.infoData = res.data || {};
this.tableData1 = res.data?.groupPlanClassesBaseVOList.sort(
(a, b) => a.sort - b.sort
);
this.tableData2 = res.data?.groupPlanTeamBaseVOList;
this.tableData2.forEach((item, index) => {
let lineName = '';
if (item.isProduction) {
lineName = this.setLineName(item.bindLineTree);
}
this.$set(this.tableData2[index], 'lineName', lineName);
});
});
},
//提取绑定的产线工段名展示出来
setLineName(val) {
if (!val || val.length === 0) return '';
const currentLevelNames = val.map((item) => item.name);
// 处理当前层级显示
let currentDisplay = '';
if (currentLevelNames.length > 1) {
currentDisplay = `(${currentLevelNames.join(' 、 ')})`;
} else {
currentDisplay = currentLevelNames[0];
}
// 查找所有子节点(取第一个有子节点的元素)
const childNode = val.find(
(item) => item.children && item.children.length > 0
);
if (childNode) {
const childPath = this.setLineName(childNode.children);
if (childPath) {
return `${currentDisplay} / ${childPath}`;
}
}
return currentDisplay;
},
},
};
</script>
<style scoped>
.info-div {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 10px;
}
.title {
font-weight: bold;
}
</style>

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2025-10-15 16:31:11
* @LastEditTime: 2025-11-04 14:08:47
* @Description:
-->
<template>
@@ -15,9 +15,10 @@
label-width="80px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="序" prop="index">
<el-form-item label="序" prop="sort">
<el-input-number
v-model="dataForm.index"
style="width: 100%"
v-model="dataForm.sort"
:step="1"
:min="1"
step-strictly />
@@ -32,23 +33,36 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="startDay">
<el-form-item label="开始时间" prop="startTime">
<el-time-picker
style="width: 100%"
format="H:mm"
value-format="H:mm"
v-model="dataForm.startDay"
placeholder="选择日期时间"></el-time-picker>
value-format="HH:mm:ss"
v-model="dataForm.startTime"
@change="timeFun('start')"
placeholder="选择时间"></el-time-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="endDay">
<el-form-item label="结束时间" prop="endTime">
<el-time-picker
style="width: 100%"
format="H:mm"
value-format="H:mm"
v-model="dataForm.endDay"
placeholder="选择日期时间"></el-time-picker>
value-format="HH:mm:ss"
v-model="dataForm.endTime"
@change="timeFun('end')"
placeholder="选择时间"></el-time-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否跨天" prop="daySpan">
<el-switch
v-model="dataForm.daySpan"
disabled
:active-value="1"
:inactive-value="0"
active-text="隔天"
inactive-text="当天"></el-switch>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -70,22 +84,24 @@ export default {
return {
dataForm: {
id: undefined,
index: undefined,
sort: undefined,
name: undefined,
startDay: undefined,
endDay: undefined,
startTime: undefined,
endTime: undefined,
daySpan: 0,
code: 1,
remark: undefined,
},
_pageIndex: 1,
dataRule: {
index: [{ required: true, message: '序不能为空', trigger: 'blur' }],
sort: [{ required: true, message: '序不能为空', trigger: 'blur' }],
name: [
{ required: true, message: '班次名称不能为空', trigger: 'blur' },
],
startDay: [
startTime: [
{ required: true, message: '开始时间不能为空', trigger: 'change' },
],
endDay: [
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'change' },
],
},
@@ -93,13 +109,31 @@ export default {
},
methods: {
init(val) {
this._pageIndex = val._pageIndex-1;
this.dataForm.index = val._pageIndex || 1;
this._pageIndex = val._pageIndex - 1;
this.dataForm.sort = val._pageIndex || 1;
this.dataForm.name = val.name || undefined;
this.dataForm.startDay = val.startDay || undefined;
this.dataForm.endDay = val.endDay || undefined;
this.dataForm.startTime = val.startTime || undefined;
this.dataForm.endTime = val.endTime || undefined;
this.dataForm.remark = val.remark || undefined;
this.dataForm.daySpan = val.daySpan || 0;
this.dataForm.code = val.code || 1;
},
timeFun(val) {
if (this.dataForm.startTime && this.dataForm.endTime) {
if (this.dataForm.startTime > this.dataForm.endTime) {
this.dataForm.daySpan = 1
} else if (this.dataForm.startTime < this.dataForm.endTime) {
this.dataForm.daySpan = 0
} else {
if (val === 'start') {
this.dataForm.startTime = ''
} else {
this.dataForm.endTime = ''
}
this.$modal.msgWarning('班次开始时间和结束时间不能相同')
}
}
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {

View File

@@ -1,8 +1,8 @@
<!--
* @Author: zwq
* @Date: 2025-10-11 14:27:37
* @Date: 2025-10-13 15:07:24
* @LastEditors: zwq
* @LastEditTime: 2025-10-15 16:42:28
* @LastEditTime: 2025-11-28 09:56:09
* @Description:
-->
<template>
@@ -31,13 +31,17 @@
<el-form-item label="开始时间" prop="startDay">
<el-date-picker
v-model="formInline.startDay"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"></el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="endDay">
<el-date-picker
v-model="formInline.endDay"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"></el-date-picker>
</el-form-item>
<el-form-item label="部门" prop="deptId">
@@ -46,8 +50,12 @@
ref="deptSelect"
@DeptId="setDeptId"></dept-select>
</el-form-item>
<el-form-item label="状态" prop="leaderName">
<el-select v-model="formInline.status" placeholder="请选择状态">
<el-form-item label="状态" prop="status">
<el-select
v-model="formInline.status"
size="small"
clearable
placeholder="请选择状态">
<el-option
v-for="item in options"
:key="item.value"
@@ -59,12 +67,15 @@
<el-button
type="primary"
size="small"
v-hasPermi="['base:group-scheduling-plan:query']"
@click="buttonClick({ btnName: 'search' })">
查询
</el-button>
</el-form-item>
<el-form-item>
<span class="separateStyle"></span>
<span
class="separateStyle"
v-hasPermi="['base:group-scheduling-plan:query']"></span>
</el-form-item>
<el-form-item>
<el-button size="small" @click="buttonClick({ btnName: 'reset' })">
@@ -72,17 +83,31 @@
</el-button>
</el-form-item>
<el-form-item>
<span class="separateStyle"></span>
<span
class="separateStyle"
v-hasPermi="['base:group-scheduling-plan:create']"></span>
</el-form-item>
<el-form-item>
<el-button
type="success"
size="small"
:plain="true"
v-hasPermi="['base:group-scheduling-plan:create']"
@click="buttonClick({ btnName: 'add' })">
新增
</el-button>
</el-form-item>
<el-form-item>
<el-button
type="warning"
plain
size="small"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['base:group-scheduling-plan:export']">
导出
</el-button>
</el-form-item>
</el-form>
</div>
<base-table
@@ -95,7 +120,7 @@
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="80"
:width="270"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
@@ -112,7 +137,7 @@
@confirm="handleConfirm"
:before-close="handleCancel"
:destroy-on-close="true"
append-to-body
append-to-body
width="60%">
<add-or-update
ref="addOrUpdate"
@@ -141,7 +166,7 @@
class="btnTextStyle"
size="small"
plain
@click="handleConfirm">
@click="successSubmit">
保存草稿
</el-button>
<el-button
@@ -156,6 +181,30 @@
</slot>
</template>
</base-dialog>
<base-dialog
:dialogTitle="'排班计划详情'"
:dialogVisible="detailVisible"
@cancel="detailCancel"
:before-close="detailCancel"
:destroy-on-close="true"
append-to-body
width="50%">
<detail ref="detailRef"></detail>
<template #footer>
<slot name="footer">
<el-row slot="footer" type="flex" justify="end">
<el-col :span="24">
<el-button
size="small"
class="btnTextStyle"
@click="detailCancel">
取消
</el-button>
</el-col>
</el-row>
</slot>
</template>
</base-dialog>
</div>
</template>
@@ -165,8 +214,16 @@ import deptSelect from './../deptSelect.vue';
import basicPage from '@/mixins/basic-page';
import subSpan from './subSpan.vue';
import subStatus from './subStatus.vue';
import detail from './detail.vue';
import { parseTime } from '@/filter/code-filter';
import { getGroupPlanPage, deleteGroupPlan } from '@/api/group/Schedule';
import {
getGroupPlanPage,
deleteGroupPlan,
copyPlan,
disablePlan,
updateScheduleLater,
exportExcel,
} from '@/api/group/Schedule';
const tableProps = [
{
@@ -206,7 +263,7 @@ const tableProps = [
subcomponent: subSpan,
},
{
prop: 'deptId',
prop: 'deptName',
label: '部门',
},
{
@@ -233,85 +290,97 @@ export default {
},
tableProps,
tableBtn: [
{
type: 'edit',
btnName: '编辑',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 1,
this.$auth.hasPermi('base:group-scheduling-plan:update')
? {
type: 'edit',
btnName: '编辑',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 1,
},
],
},
],
},
},
{
type: 'delete',
btnName: '删除',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 1,
}
: undefined,
this.$auth.hasPermi('base:group-scheduling-plan:delete')
? {
type: 'delete',
btnName: '删除',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 1,
},
],
},
],
},
},
{
type: 'detail',
btnName: '查看',
showParam: {
type: '&',
data: [
{
type: 'unequal',
name: 'status',
value: 1,
}
: undefined,
this.$auth.hasPermi('base:group-scheduling-plan:query')
? {
type: 'detail',
btnName: '查看',
showParam: {
type: '&',
data: [
{
type: 'unequal',
name: 'status',
value: 1,
},
],
},
],
},
},
{
type: 'cancel',
btnName: '作废',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 2,
}
: undefined,
this.$auth.hasPermi('base:group-scheduling-plan:delete')
? {
type: 'cancel',
btnName: '作废',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 2,
},
],
},
],
},
},
{
type: 'sync',
btnName: '同步节假日',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 2,
}
: undefined,
this.$auth.hasPermi('base:group-holiday:update')
? {
type: 'sync',
btnName: '同步节假日',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 2,
},
{
type: 'equal',
name: 'updateFlag',
value: true,
},
],
},
{
type: 'updateFlag',
name: 'status',
value: true,
},
],
},
},
{
type: 'copy',
btnName: '复制',
},
}
: undefined,
this.$auth.hasPermi('base:group-scheduling-plan:create')
? {
type: 'copy',
btnName: '复制',
}
: undefined,
].filter((v) => v),
tableData: [],
options: [
@@ -329,48 +398,52 @@ export default {
},
],
formInline: {
code: '',
name: '',
startDay: '',
endDay: '',
deptId: '',
status: '',
code: null,
name: null,
startDay: null,
endDay: null,
deptId: null,
status: null,
},
stepNum: 1, // 新增编辑时当前第几步
detailVisible: false,
// 导出遮罩层
exportLoading: false,
};
},
components: {
AddOrUpdate,
deptSelect,
detail,
},
created() {},
methods: {
buttonClick(val) {
switch (val.btnName) {
case 'search':
const date1 = new Date(this.formInline.startDay).getTime();
const date2 = new Date(this.formInline.endDay).getTime();
if (date1 > date2) {
if (this.formInline.startDay > this.formInline.endDay) {
this.$message('开始时间不得晚于结束时间');
return;
}
this.listQuery = {
pageNo: 1,
pageSize: 10,
pageSize: 20,
total: 1,
...this.formInline,
};
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetFields();
this.formInline.name = null;
this.formInline.code = null;
this.formInline.deptId = null;
this.$refs.deptSelect.clear();
this.formInline.leaderName = null;
this.formInline.status = null;
this.formInline.startDay = null;
this.formInline.endDay = null;
this.listQuery = {
pageSize: 10,
pageSize: 20,
pageNo: 1,
total: 1,
};
@@ -396,10 +469,15 @@ export default {
setStepNum(val) {
this.stepNum = val;
},
// dialog取消
handleCancel() {
successSubmit() {
this.addOrUpdateVisible = false;
this.addOrEditTitle = '';
this.stepNum = 1;
this.getDataList();
},
// dialog取消
handleCancel() {
this.$refs.addOrUpdate.cancelStep();
},
handleConfirm(val) {
if (val == 'up') {
@@ -408,6 +486,81 @@ export default {
this.$refs.addOrUpdate.nextSubmit();
}
},
//tableBtn点击
handleClick(val) {
if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrEditTitle = '编辑';
this.$nextTick(() => {
this.stepNum = 3;
this.$refs.addOrUpdate.init(val.data.id, true);
});
} else if (val.type === 'delete') {
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex);
} else if (val.type === 'detail') {
this.detailVisible = true;
this.$nextTick(() => {
this.$refs.detailRef.init(val.data.id);
});
} else if (val.type === 'cancel') {
disablePlan(val.data.id).then((res) => {
this.$modal.msgSuccess('作废成功');
this.getDataList();
});
} else if (val.type === 'sync') {
this.$confirm(
'当前节假日包含尚未同步的节假日变更,是否立即将上述节假日同步更新到排班计划?',
'同步节假日',
{
confirmButtonText: '确认同步',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
updateScheduleLater({
planId: val.data.id,
logId: val.data.updateLogId,
}).then((res) => {
this.$modal.msgSuccess('同步节假日成功');
this.getDataList();
});
})
.catch((res) => {
this.getDataList();
this.$message({
type: 'info',
message: '已取消',
});
});
} else if (val.type === 'copy') {
copyPlan(val.data.id).then((res) => {
this.$modal.msgSuccess('复制成功');
this.getDataList();
});
}
},
detailCancel() {
this.detailVisible = false;
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = { ...this.formInline };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal
.confirm('是否确认导出所有数据项?')
.then(() => {
this.exportLoading = true;
return exportExcel(params);
})
.then((response) => {
this.$download.excel(response, '排班计划.xls');
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>
@@ -449,21 +602,21 @@ export default {
margin: 4px 0;
}
body .el-dialog__header {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
padding: 13px 24px;
border-bottom: 1px solid #e9e9e9;
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
padding: 13px 24px;
border-bottom: 1px solid #e9e9e9;
}
body .el-dialog__header .titleStyle::before{
content: '';
display: inline-block;
width: 4px;
height: 16px;
background-color: #0B58FF;
border-radius: 1px;
margin-right: 8px;
position: relative;
top: 2px;
body .el-dialog__header .titleStyle::before {
content: '';
display: inline-block;
width: 4px;
height: 16px;
background-color: #0b58ff;
border-radius: 1px;
margin-right: 8px;
position: relative;
top: 2px;
}
</style>

View File

@@ -0,0 +1,36 @@
<!--
* @Author: zwq
* @Date: 2025-10-13 16:18:41
* @LastEditors: zwq
* @LastEditTime: 2025-10-21 13:54:52
* @Description:
-->
<template>
<span>
<el-tag
v-if="injectData.work"
size="small"
:type="['', 'success', 'warning'][injectData.sort]">
{{ injectData[injectData.prop] }}
</el-tag>
<el-tag v-else effect="dark" size="small" type="info">
{{ injectData[injectData.prop] }}
</el-tag>
</span>
</template>
<script>
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {};
},
created() {},
methods: {},
};
</script>

View File

@@ -0,0 +1,33 @@
<!--
* @Author: zwq
* @Date: 2025-10-13 16:18:41
* @LastEditors: zwq
* @LastEditTime: 2025-10-20 10:13:26
* @Description:
-->
<template>
<div>
<div>
{{ injectData.name.split('/')[0] }}
</div>
<div>
{{ injectData.name.split('/')[1] }}
</div>
</div>
</template>
<script>
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {};
},
created() {},
methods: {},
};
</script>

View File

@@ -0,0 +1,44 @@
<!--
* @Author: zwq
* @Date: 2025-10-13 16:40:08
* @LastEditors: zwq
* @LastEditTime: 2025-11-04 16:08:57
* @Description:
-->
<template>
<div>
<el-button type="text" size="mini" @click="moveUp()" style="display:inline-block"></el-button>
<el-button type="text" size="mini" @click="moveDown()" style="display:inline-block;float:right"></el-button>
</div>
</template>
<script>
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {};
},
created() {},
methods: {
moveUp() {
const val = {
type: 'up',
index: this.injectData._pageIndex - 1,
};
this.$emit('emitData', val);
},
moveDown() {
const val = {
type: 'down',
index: this.injectData._pageIndex - 1,
};
this.$emit('emitData', val);
},
},
};
</script>

View File

@@ -1,9 +1,16 @@
<!--
* @Author: zwq
* @Date: 2025-10-13 16:18:41
* @LastEditors: zwq
* @LastEditTime: 2025-11-04 10:54:19
* @Description:
-->
<template>
<span>
{{
injectData.shiftSustainedNum +
(injectDatashiftSustainedType
? ['', '日', '周', '月', '季'][injectDatashiftSustainedType]
(injectData.shiftSustainedNum?injectData.shiftSustainedNum:'') +
(injectData.shiftSustainedType
? ['', '日', '周', '月', '季'][injectData.shiftSustainedType]
: '')
}}
</span>

View File

@@ -48,7 +48,6 @@ export default {
this.deptId = id;
},
clear() {
console.log(this.$refs.treeselect);
this.$refs.treeselect.clear();
},
// 格式化部门的下拉框

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2025-10-13 15:44:18
* @LastEditTime: 2025-11-27 14:49:34
* @Description:
-->
<template>
@@ -25,24 +25,28 @@
<el-col :span="8">
<el-form-item label="班组名称" prop="name">
<el-input
:disabled="nameDisable"
v-model="dataForm.name"
clearable
placeholder="请输入班组名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门">
<el-form-item label="部门" prop="deptId">
<dept-select
style="width: 200px"
style="width: 100%"
ref="deptSelect"
v-model="dataForm.deptId"
@DeptId="setDeptId"></dept-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="组长" prop="leaderId">
<el-select
style="width: 100%"
v-model="dataForm.leaderId"
@change="setLeaderName"
filterable
placeholder="请选择组长">
<el-option
v-for="item in leaderArr"
@@ -57,12 +61,14 @@
<el-input
v-model="dataForm.leaderPhone"
clearable
maxlength="11"
placeholder="请输入组长电话" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="班组人数" prop="num">
<el-input-number
style="width: 100%"
v-model="dataForm.num"
:step="1"
:min="0"
@@ -72,6 +78,8 @@
<el-col :span="8">
<el-form-item label="生产班组" prop="isProduction">
<el-select
style="width: 100%"
@change="setIsProduction"
v-model="dataForm.isProduction"
placeholder="请选择是否为生产班组">
<el-option
@@ -103,6 +111,7 @@ import {
updateGroup,
getGroup,
getCode,
updateIsProduction,
} from '@/api/group/groupSetting';
export default {
@@ -132,7 +141,8 @@ export default {
num: undefined,
remark: undefined,
},
setData: true,
setData: true,
nameDisable: false, //班组被使用时,班组名称不能修改
leaderArr: [],
options: [
{
@@ -151,12 +161,21 @@ export default {
name: [
{ required: true, message: '班组名称不能为空', trigger: 'blur' },
],
deptId: [{ required: true, message: '部门不能为空', trigger: 'blur' }],
leaderId: [
{ required: true, message: '组长不能为空', trigger: 'change' },
],
isProduction: [
{ required: true, message: '生产班组不能为空', trigger: 'change' },
],
leaderPhone: [
{
pattern:
/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/,
message: '请输入正确的手机号码',
trigger: 'blur',
},
],
},
};
},
@@ -172,9 +191,43 @@ export default {
})
.catch(() => {});
},
setDataForm(){
this.$refs.deptSelect.setID(this.dataForm.deptId)
},
setDataForm() {
this.$refs.deptSelect.setID(this.dataForm.deptId);
this.nameDisable = false;
updateIsProduction(this.dataForm.id).then(({ data }) => {
if (data) {
this.$notify({
title: '警告',
message: '当前班组仍参与排班计划或正在执行工单。班组名称不能修改',
type: 'warning',
});
this.nameDisable = true;
}
});
},
setIsProduction() {
// 修改的提交
if (this.dataForm.id && this.nameDisable) {
this.$confirm(
'当前班组仍参与排班计划或正在执行工单。<br/>修改<strong> 是否是生产班组 </strong>不会自动更新排班内容,可能导致排班信息与班组属性不一致,请注意核查!<br/>是否确认修改是否是生产班组?',
'修改是否是生产班组',
{
dangerouslyUseHTMLString: true,
confirmButtonText: '确认修改',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {})
.catch((res) => {
this.$message({
type: 'info',
message: '已取消',
});
this.dataForm.isProduction = !this.dataForm.isProduction;
});
}
},
setLeaderName(val) {
this.leaderArr.map((item) => {
if (val === item.id) {
@@ -182,33 +235,33 @@ export default {
}
});
},
// 表单提交
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
if(!this.dataForm.deptId){
this.$message('部门不能为空');
return
}
// 修改的提交
if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
// 添加的提交
this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false;
}
if (!this.dataForm.deptId) {
this.$message('部门不能为空');
return;
}
// 修改的提交
if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList');
});
return;
}
// 添加的提交
this.urlOptions.createURL(this.dataForm).then((response) => {
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList');
});
});
},
},
};
</script>

View File

@@ -1,14 +1,21 @@
<!--
* @Author: zwq
* @Date: 2025-10-11 14:41:12
* @LastEditors: zwq
* @LastEditTime: 2025-11-27 14:19:39
* @Description:
-->
<template>
<el-switch
@change="changeStatus"
size="small"
v-model="list.enabled"
v-model="injectData.enabled"
:active-value="1"
:inactive-value="0"></el-switch>
</template>
<script>
import { updateGroup } from '@/api/group/groupSetting';
import { updateGroup, updateIsProduction } from '@/api/group/groupSetting';
export default {
props: {
injectData: {
@@ -17,17 +24,51 @@ export default {
},
},
data() {
return {
list: this.injectData,
};
return {};
},
created() {},
methods: {
changeStatus(val) {
const data = { ...this.injectData, enabled: val };
updateGroup(data).then((res) => {
this.$modal.msgSuccess('修改成功');
this.$emit('emitData');
const pdata = { ...this.injectData, enabled: val };
updateIsProduction(this.injectData.id).then(({ data }) => {
if (data) {
this.$confirm(
'当前班组仍参与排班计划或正在执行工单。<br/>修改<strong> 班组状态 </strong>不会自动更新排班内容,可能导致排班信息与班组属性不一致,请注意核查!<br/>是否确认修改班组状态?',
'更新班组状态',
{
dangerouslyUseHTMLString: true,
confirmButtonText: '确认修改',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
updateGroup(pdata).then((res) => {
if (res.code === 0 || res.code === 200) {
this.$modal.msgSuccess('修改成功');
this.$emit('emitData');
} else {
this.$modal.msg(res.msg);
}
});
})
.catch((res) => {
this.$emit('emitData');
this.$message({
type: 'info',
message: '已取消',
});
});
} else {
updateGroup(pdata).then((res) => {
if (res.code === 0 || res.code === 200) {
this.$modal.msgSuccess('修改成功');
this.$emit('emitData');
} else {
this.$modal.msg(res.msg);
}
});
}
});
},
},

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2025-10-11 14:27:37
* @LastEditors: zwq
* @LastEditTime: 2025-10-13 14:44:29
* @LastEditTime: 2025-11-14 21:50:40
* @Description:
-->
<template>
@@ -25,7 +25,7 @@
<dept-select
style="width: 200px"
ref="deptSelect"
@DeptId="setDeptId"></dept-select>
@DeptId="setDeptId"></dept-select>
</el-form-item>
<el-form-item label="班组名称" prop="name">
<el-input
@@ -45,12 +45,15 @@
<el-button
type="primary"
size="small"
v-hasPermi="['base:group-team:query']"
@click="buttonClick({ btnName: 'search' })">
查询
</el-button>
</el-form-item>
<el-form-item>
<span class="separateStyle"></span>
<span
class="separateStyle"
v-hasPermi="['base:group-team:query']"></span>
</el-form-item>
<el-form-item>
<el-button size="small" @click="buttonClick({ btnName: 'reset' })">
@@ -58,13 +61,16 @@
</el-button>
</el-form-item>
<el-form-item>
<span class="separateStyle"></span>
<span
class="separateStyle"
v-hasPermi="['base:group-team:create']"></span>
</el-form-item>
<el-form-item>
<el-button
type="success"
size="small"
:plain="true"
v-hasPermi="['base:group-team:create']"
@click="buttonClick({ btnName: 'add' })">
新增
</el-button>
@@ -97,7 +103,7 @@
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
:destroy-on-close="true"
:destroy-on-close="true"
width="50%">
<add-or-update
ref="addOrUpdate"
@@ -118,16 +124,16 @@ const tableProps = [
{
prop: 'code',
label: '班组编号',
width: 140,
width: 210,
},
{
prop: 'name',
label: '班组名称',
width: 100,
},
{
prop: 'deptId',
prop: 'deptName',
label: '所属部门',
width: 110,
},
{
prop: 'leaderName',
@@ -136,6 +142,7 @@ const tableProps = [
{
prop: 'leaderPhone',
label: '组长电话',
width: 110,
},
{
prop: 'num',
@@ -145,12 +152,15 @@ const tableProps = [
{
prop: 'isProduction',
label: '是否生产班组',
filter: val=>{return val?'是':'否'},
filter: (val) => {
return val ? '是' : '否';
},
width: 110,
},
{
prop: 'remark',
label: '备注',
showOverflowtooltip: true,
},
{
prop: 'createTime',
@@ -175,10 +185,12 @@ export default {
},
tableProps,
tableBtn: [
{
type: 'edit',
btnName: '编辑',
},
this.$auth.hasPermi('base:group-team:update')
? {
type: 'edit',
btnName: '编辑',
}
: undefined,
].filter((v) => v),
tableData: [],
formInline: {
@@ -200,7 +212,7 @@ export default {
case 'search':
this.listQuery = {
pageNo: 1,
pageSize: 10,
pageSize: 20,
total: 1,
...this.formInline,
};
@@ -213,7 +225,7 @@ export default {
this.$refs.deptSelect.clear();
this.formInline.leaderName = null;
this.listQuery = {
pageSize: 10,
pageSize: 20,
pageNo: 1,
total: 1,
};
@@ -231,9 +243,9 @@ export default {
console.log(val);
}
},
setDeptId(val){
this.formInline.deptId = val
}
setDeptId(val) {
this.formInline.deptId = val;
},
},
};
</script>

View File

@@ -2,104 +2,199 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2025-10-19 00:09:11
* @LastEditTime: 2025-12-11 10:47:50
* @Description:
-->
<template>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-position="top"
label-width="80px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="节假日名称" prop="name">
<el-input
v-model="dataForm.name"
clearable
:disabled="detail"
placeholder="请输入节假日名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="日历类型" prop="calendarType">
<el-select
v-model="dataForm.calendarType"
:disabled="detail"
style="width: 100%">
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="日期类型" prop="dateType">
<el-select
style="width: 100%"
:disabled="detail"
v-model="dataForm.dateType">
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="日期" prop="dateTime">
<el-date-picker
:disabled="detail"
style="width: 100%"
v-if="dataForm.dateType == 1"
key="date"
v-model="dataForm.dateDay"
type="date"
placeholder="选择日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker
:disabled="detail"
style="width: 100%"
v-else
key="daterange"
v-model="dataForm.dateDayArr"
type="daterange"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否每年重复" prop="repeat">
<el-select
v-model="dataForm.repeat"
:disabled="detail"
style="width: 100%">
<el-option
v-for="item in options3"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-position="top"
label-width="80px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="节假日名称" prop="name">
<el-input
ref="inputWidth"
v-model="dataForm.name"
clearable
:disabled="detail"
placeholder="请输入节假日名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="日历类型" prop="calendarType">
<el-select
v-model="dataForm.calendarType"
:disabled="detail"
style="width: 100%">
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="日期类型" prop="dateType">
<el-select
style="width: 100%"
:disabled="detail"
v-model="dataForm.dateType">
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
v-if="dataForm.dateType == 1 && dataForm.calendarType == 1"
label="日期"
prop="dateDay">
<el-date-picker
:disabled="detail"
style="width: 100%"
key="date"
v-model="dataForm.dateDay"
type="date"
placeholder="选择日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
@blur="$forceUpdate()"
:picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item
v-else-if="dataForm.dateType == 2 && dataForm.calendarType == 1"
label="日期"
prop="dateDayArr">
<el-date-picker
:disabled="detail"
style="width: 100%"
key="daterange"
v-model="dataForm.dateDayArr"
type="daterange"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
@blur="$forceUpdate()"
:picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item
v-else-if="dataForm.dateType == 1 && dataForm.calendarType == 2"
label="日期"
prop="dateDayChinese">
<j-date-picker
ref="JDatePicker1"
style="line-height: 18px"
v-model="dataForm.dateDayChinese"
id="value1"
:width="width1"
:placeholder="placeholder"
:picker-options="pickerOptions"
:rangeSeparator="rangeSeparator"
@change="onDateChange"
:disabled="detail"
:showLunarClass="showLunarClass"
:showLunarControl="showLunarControl"
type="DATE"
:showBackYears="showBackYears"
:showLunarIcon="showLunarIcon"
:format="format"></j-date-picker>
</el-form-item>
<el-form-item
v-else-if="dataForm.dateType == 2 && dataForm.calendarType == 2"
label="日期"
prop="dateDayArrChinese">
<j-date-picker
style="line-height: 18px"
ref="JDatePicker2"
v-model="dataForm.dateDayArrChinese"
id="value2"
:width="width1"
:placeholder="placeholder"
:picker-options="pickerOptions"
:rangeSeparator="rangeSeparator"
@change="onDateChange"
:disabled="detail"
:showLunarClass="showLunarClass"
:showLunarControl="showLunarControl"
type="DATERANGE"
:showBackYears="showBackYears"
:showLunarIcon="showLunarIcon"
:format="format"></j-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否每年重复" prop="repeat">
<el-select
v-model="dataForm.repeat"
:disabled="detail"
style="width: 100%">
<el-option
v-for="item in options3"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="detail">
<el-form-item label="来源" prop="inherited">
<el-radio-group disabled v-model="dataForm.inherited">
<el-radio :label="true">继承</el-radio>
<el-radio :label="false">自定义</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-dialog
title="删除确认"
:visible.sync="dialogVisible"
width="30%"
append-to-body>
<span>
确认删除该节假日吗
<br />
该节假日已被排班计划使用建议确认是否同步更新排班计划
<br />
此操作不可恢复请确认是否继续
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button @click="onlyDelete">仅删除</el-button>
<el-button type="primary" @click="deleteAndUpdate">
删除并更新
</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { createHoliday, updateHoliday,deleteHolidayn } from '@/api/group/holidaySetting';
import JDatePicker from './components/JDatePicker.vue';
import {
createHoliday,
updateHoliday,
checkDeleteHoliday,
deleteHoliday,
updateSchedule,
getHoliday,
} from '@/api/group/holidaySetting';
export default {
components: {},
components: {
JDatePicker,
},
data() {
return {
dataForm: {
@@ -109,9 +204,16 @@ export default {
dateType: 1,
dateDay: undefined,
dateDayArr: [],
dateDayChinese: undefined,
dateDayArrChinese: [],
noRepeatYear: undefined,
noRepeatYearChinese: undefined,
repeat: true,
inherited: true, // 是否为继承
deptId: undefined,
},
detail: false,
inherited: true,
options1: [
{
value: 1,
@@ -158,6 +260,12 @@ export default {
dateDayArr: [
{ required: true, message: '日期不能为空', trigger: 'change' },
],
dateDayChinese: [
{ required: true, message: '日期不能为空', trigger: 'change' },
],
dateDayArrChinese: [
{ required: true, message: '日期不能为空', trigger: 'change' },
],
repeat: [
{
required: true,
@@ -166,41 +274,327 @@ export default {
},
],
},
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now();
},
},
dialogVisible: false,
//农历组件数据
showLunarClass: 'LUNAR', //农历日期的展示类型 MIX(混合)FULLLUNAR(全农历)LUNAR(农历)NUMBER(数字)
showBackYears: 2, //向后展示年数;见于年份列表;
showLunarIcon: true, //是否显示农历控制组件
showLunarControl: false, //是否显示农历控制组件
width1: '300', //这个设置成100%原组件写死了px需要修改
format: 'yyyy-MM-dd',
placeholder: '',
rangeSeparator: '-',
editable: true,
clearable: true,
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
},
},
};
},
methods: {
init(id, detail) {
this.dataForm.id = id || undefined;
this.detail = detail || false;
watch: {
'dataForm.calendarType': function (newValue, oldValue) {
this.$nextTick(() => {
if (this.$refs.JDatePicker1) {
this.$refs.JDatePicker1.isLunar = true; //默认转为农历
this.$refs.JDatePicker1.onLunarChange();
}
if (this.$refs.JDatePicker2) {
this.$refs.JDatePicker2.isLunar = true;
this.$refs.JDatePicker2.onLunarChange();
}
});
},
'dataForm.dateType': function (newValue, oldValue) {
this.$nextTick(() => {
if (this.$refs.JDatePicker1) {
this.$refs.JDatePicker1.isLunar = true; //默认转为农历
this.$refs.JDatePicker1.onLunarChange();
}
if (this.$refs.JDatePicker2) {
this.$refs.JDatePicker2.isLunar = true;
this.$refs.JDatePicker2.onLunarChange();
}
});
},
},
mounted() {
this.$nextTick(() => {
this.width1 = this.$refs.inputWidth.$el.offsetWidth + '';
});
},
methods: {
init(deptId, val, detail, inherited) {
this.dataForm.deptId = deptId || undefined;
this.dataForm.id = val.holidayId || undefined;
this.dataForm.inherited = val.isInherit || false;
this.detail = detail || false;
this.inherited = inherited; //编辑的时候该部门如果是自定义的但这个val数据是继承的修改之后则变成自定义的inherited
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
getHoliday(this.dataForm.id).then((res) => {
//设置年份,不重复的直接用返回的年份,重复的直接用当年年份
let year = new Date().getFullYear();
if (res.data.calendarType == 1 && !res.data.repeat) {
year = res.data.noRepeatYear;
} else if (res.data.calendarType == 2 && !res.data.repeat) {
year = res.data.noRepeatYearChinese;
}
this.dataForm = res.data;
if (
this.dataForm.dateType == 1 &&
this.dataForm.calendarType == 1
) {
this.dataForm.dateDay =
year + '-' + this.dataForm.oneDay.slice(-5);
} else if (
this.dataForm.dateType == 2 &&
this.dataForm.calendarType == 1
) {
let num = this.compareMonthDay(
this.dataForm.startDay.slice(-5),
this.dataForm.endDay.slice(-5)
);
this.dataForm.dateDayArr = [
year + '-' + this.dataForm.startDay.slice(-5),
(num > 0 ? year : year + 1) +
'-' +
this.dataForm.endDay.slice(-5),
];
} else if (
this.dataForm.dateType == 1 &&
this.dataForm.calendarType == 2
) {
this.dataForm.dateDayChinese =
'L' + year + this.dataForm.oneDayChinese.slice(-6);
} else if (
this.dataForm.dateType == 2 &&
this.dataForm.calendarType == 2
) {
let num = this.compareMonthDay(
this.dataForm.startDayChinese.slice(-6),
this.dataForm.endDayChinese.slice(-6)
);
this.dataForm.dateDayArrChinese = [
'L' + year + this.dataForm.startDayChinese.slice(-6),
'L' +
(num > 0 ? year : year + 1) +
+this.dataForm.endDayChinese.slice(-6),
];
}
});
}
});
},
//用于比较日期大小判断年份是否要加1
compareMonthDay(dateStr1, dateStr2) {
const [month1, day1] = dateStr1.split('-').map(Number);
const [month2, day2] = dateStr2.split('-').map(Number);
if (month1 !== month2) {
return month2 - month1;
}
return day2 - day1;
},
editHoliday() {
this.detail = false;
},
deleteHoliday() {
//删除节假日基础信息前校验是否影响排班
checkDeleteHoliday(this.dataForm.id).then((res) => {
if (res.data) {
this.dialogVisible = true;
} else {
this.$confirm(
'确认删除该节假日吗?<br/>此操作不可恢复,请确认是否继续',
'删除确认',
{
dangerouslyUseHTMLString: true,
confirmButtonText: '确认删除',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
deleteHoliday(this.dataForm.id).then((res) => {
console.log(res);
this.$modal.msgSuccess('删除成功');
this.$emit('refreshPage');
});
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
});
});
}
});
},
onlyDelete() {
deleteHoliday(this.dataForm.id).then((res) => {
this.dialogVisible = false;
this.$modal.msgSuccess('删除成功');
this.$emit('refreshPage');
});
},
deleteAndUpdate() {
deleteHoliday(this.dataForm.id).then((res) => {
this.dialogVisible = false;
this.$modal.msgSuccess('删除成功');
updateSchedule({ logId: res.data.logId }).then((res1) => {
this.$modal.msgSuccess('更新成功');
});
this.$emit('refreshPage');
});
},
onDateChange(val) {
console.log(val);
},
editHoliday(){
this.detail = false
},
deleteHoliday(){
deleteHolidayn(this.dataForm.id).then(res=>{
console.log(res)
})
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false;
}
if (this.dataForm.dateType == 1 && this.dataForm.calendarType == 1) {
const [year, month, day] = this.dataForm.dateDay.split('-');
this.dataForm.oneDay = `--${month}-${day}`;
} else if (
this.dataForm.dateType == 2 &&
this.dataForm.calendarType == 1
) {
const [year, month, day] = this.dataForm.dateDayArr[0].split('-');
this.dataForm.startDay = `--${month}-${day}`;
const [year1, month1, day1] = this.dataForm.dateDayArr[1].split('-');
this.dataForm.endDay = `--${month1}-${day1}`;
} else if (
this.dataForm.dateType == 1 &&
this.dataForm.calendarType == 2
) {
this.dataForm.oneDayChinese =
'--' + this.dataForm.dateDayChinese.slice(-5);
} else if (
this.dataForm.dateType == 2 &&
this.dataForm.calendarType == 2
) {
this.dataForm.startDayChinese =
'--' + this.dataForm.dateDayArrChinese[0].slice(-5);
this.dataForm.endDayChinese =
'--' + this.dataForm.dateDayArrChinese[1].slice(-5);
}
//是否每年重复,不重复的话需要传 年份
if (
this.dataForm.dateType == 1 &&
this.dataForm.calendarType == 1 &&
!this.dataForm.repeat
) {
const [year, month, day] = this.dataForm.dateDay.split('-');
this.dataForm.noRepeatYear = year;
} else if (
this.dataForm.dateType == 2 &&
this.dataForm.calendarType == 1 &&
!this.dataForm.repeat
) {
const [year, month, day] = this.dataForm.dateDayArr[0].split('-');
this.dataForm.noRepeatYear = year;
} else if (
this.dataForm.dateType == 1 &&
this.dataForm.calendarType == 2 &&
!this.dataForm.repeat
) {
this.dataForm.noRepeatYearChinese =
this.dataForm.dateDayChinese.slice(1, 5);
} else if (
this.dataForm.dateType == 2 &&
this.dataForm.calendarType == 2 &&
!this.dataForm.repeat
) {
this.dataForm.noRepeatYearChinese =
this.dataForm.dateDayArrChinese[0].slice(1, 5);
}
// 修改的提交
if (this.dataForm.id) {
updateHoliday(this.dataForm).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshPage');
if (!this.inherited) {
this.dataForm.inherited = false;
}
updateHoliday(this.dataForm).then((res) => {
if (res.code === 0 || res.code === 200) {
if (!res.data.updateFlag) {
this.$modal.msgSuccess('修改成功');
this.$emit('refreshPage');
} else {
this.$confirm(
'新增节假日影响已有排班计划,是否立即更新?',
'更新排班',
{
confirmButtonText: '立即更新',
cancelButtonText: '暂不更新',
type: 'warning',
}
)
.then(() => {
updateSchedule({ logId: res.data.logId }).then((res1) => {
this.$modal.msgSuccess('更新成功');
});
this.$emit('refreshPage');
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
});
this.$emit('refreshPage');
});
}
} else {
this.$modal.msg(res.msg);
}
});
return;
}
// 添加的提交
createHoliday(this.dataForm).then((response) => {
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshPage');
createHoliday(this.dataForm).then((res) => {
if (res.code === 0 || res.code === 200) {
if (!res.data.updateFlag) {
this.$modal.msgSuccess('新增成功');
this.$emit('refreshPage');
} else {
this.$confirm(
'新增节假日影响已有排班计划,是否立即更新?',
'更新排班',
{
confirmButtonText: '立即更新',
cancelButtonText: '暂不更新',
type: 'warning',
}
)
.then(() => {
updateSchedule({ logId: res.data.logId }).then((res1) => {
this.$modal.msgSuccess('更新成功');
});
this.$emit('refreshPage');
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
});
this.$emit('refreshPage');
});
}
} else {
this.$modal.msg(res.msg);
}
});
});
},

View File

@@ -0,0 +1,735 @@
<template>
<div class="full-jcalendar" :style="{width:handleWidth+'px'}">
<p class="input-icon__tip" v-show="isLunar && showLunarIcon">
<i v-if="isLeap"></i>
<i v-else></i>
</p>
<p class="input-icon" @mouseover="onInputOver" @mouseout="onInputOut">
<i class="iconfont el-icon-date" ></i>
<i class="iconfont icon-richeng" v-show="!clearVisible"></i>
<i class="iconfont icon-guanbi is-clear" v-show="clearable && clearVisible" @click="onClearInput"></i>
</p>
<input type="text" :value="inputText" :class="['input__inner',{'is-disabled':disabled}]" :placeholder="placeholder" @click="onInputFocus" :readonly="!editable || type.toUpperCase() ==='DATERANGE' || (isLunar && showLunarClass.toUpperCase()!='NUMBER')" :disabled="disabled" @input="inputText = $event.target.value" @change="handleInputChange" />
<!--日期控件弹窗主体-->
<div class="full-jcalendar__main" :class="{'is-daterange':type.toUpperCase() === 'DATERANGE'}" v-show="calendarVisible">
<!--单日期模式-->
<div v-show="type.toUpperCase() === 'DATE'">
<div class="full-jcalendar-header">
<span class="title-year" @click="showYearList">{{year}}</span>
<span style="width:10px;"></span>
<span class="title-month" @click="monthVisible = true">{{month}}</span>
<span style="width:10px;" v-if="showLunarControl"></span>
<label v-if="showLunarControl"><input type="checkbox" v-model="isLunar" @change="onLunarChange" />农历</label>
<!-- header 切换月份 -->
<p class="prev-month" @click.stop="goPrev"><i class="icon iconfont el-icon-arrow-left"></i></p>
<p class="next-month" @click.stop="goNext"><i class="icon iconfont el-icon-arrow-right"></i></p>
</div>
<!-- body 日期和事件 -->
<div class="full-jcalendar__body">
<div class="weeks">
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
</div>
<!--日期 -->
<div class="week-row" v-for="(week,index) in calendarDatas" :key="index">
<!--日期 单元格-->
<div class="day-cell" v-for="(day,index) in week" :key="index"
:class="[{'today': day.isToday,'not-optional':isNotOptional(day),'select':day.isSelect,'not-cur-month': !day.isCurMonth }]"
@click="onDateSelect(day)">
<!-- 日期 节气 农历 -->
<div class="day-number">
<p class="solar">
<!--<span class="is-leap" v-if="day.lDate.isLeap && day.lDate.lMonth>10 &&day.lDate.IDayCn==='初一'"></span>-->
<span class="is-leap" v-if="day.lDate.isLeap && day.lDate.IDayCn==='初一'"></span>
<span :class="['number',{'is-today':day.isToday,'is-empty':day.isToday && !day.lDate.isFestival && !day.lDate.isTerm}]">{{day.isToday?'今天':day.day}}</span>
</p>
<p class="lunar" v-show="!day.isToday || day.lDate.isFestival || day.lDate.isTerm">
<span class="festival" v-if="day.lDate.isFestival">{{day.lDate.festival[0]}}</span>
<span class="term" v-else-if="day.lDate.isTerm">{{day.lDate.Term}}</span>
<!--<span v-else-if="day.lDate.IDayCn==='初一'">{{day.lDate.isLeap && day.lDate.lMonth>10?day.lDate.IMonthCn.replace('闰',''):day.lDate.IMonthCn}}</span>-->
<span v-else-if="day.lDate.IDayCn==='初一'">{{day.lDate.IMonthCn.replace('','')}}</span>
<span v-else>{{day.lDate.IDayCn}}</span>
</p>
</div>
</div>
</div>
</div>
<!-- 月份切换 -->
<div class="full-jcalendar__month" v-show="monthVisible">
<div class="full-jcalendar-header">
<span>{{month}}</span>
</div>
<div class="full-jcalendar__body">
<ul class="data-list">
<li @click="onMonthSelect(m-1)" v-for="m in 12" :key="m">{{m}}</li>
</ul>
<p class="clearfix"></p>
<p class="close" @click="monthVisible=false"> </p>
</div>
</div>
<!-- 年份切换 -->
<div class="full-jcalendar__year" v-show="yearVisible">
<div class="full-jcalendar-header">
<span>{{year}}</span>
<!-- header 年份翻页 -->
<p class="prev-month" @click.stop="goYearPrevList"><i class="icon iconfont el-icon-arrow-left"></i></p>
<p class="next-month" @click.stop="goYearNextList"><i class="icon iconfont el-icon-arrow-right"></i></p>
</div>
<div class="full-jcalendar__body">
<ul class="data-list">
<li :class="{'select-year':(m + startYear -1)==year,'curr-year':(m + startYear -1)==todayYear}" @click="onYearSelect(m + startYear -1)" v-for="m in 12" :key="m">{{m + startYear -1}}</li>
</ul>
<p class="clearfix"></p>
<p class="close" @click="yearVisible=false"> </p>
</div>
</div>
</div>
<!--日期段模式-->
<div class="date-range__month leftMonth" v-if="type.toUpperCase() === 'DATERANGE'">
<div class="full-jcalendar-header">
<span class="title-year">{{year}}</span>
<span style="width:10px;"></span>
<span class="title-month">{{month}}</span>
<span style="width:10px;" v-if="showLunarControl"></span>
<label v-if="showLunarControl"><input type="checkbox" v-model="isLunar" @change="onLunarChange" />农历</label>
<!-- header 切换月份 -->
<p class="prev-year" @click.stop="goYearPrev"><i class="icon iconfont el-icon-d-arrow-left"></i></p>
<p class="prev-month" @click.stop="goPrev"><i class="icon iconfont el-icon-arrow-left"></i></p>
</div>
<!-- body 日期和事件 -->
<div class="full-jcalendar__body">
<div class="weeks">
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
</div>
<!--日期 -->
<div class="week-row" v-for="(week,index) in calendarDatas" :key="index" @mouseout="onMouseOut">
<!--日期 单元格-->
<div class="day-cell" v-for="(day,index) in week" :key="index"
:class="[{'today': day.isToday,'not-optional':isNotOptional(day),'choose':isChoose(day),'select':isSelect(day),'not-cur-month': !day.isCurMonth }]"
@click="onDateSelect(day)" @mouseover="onMouseOver(day)">
<!-- 日期 节气 农历 -->
<div class="day-number">
<p class="solar">
<!--<span class="is-leap" v-if="day.lDate.isLeap && day.lDate.lMonth>10 &&day.lDate.IDayCn==='初一'"></span>-->
<span class="is-leap" v-if="day.lDate.isLeap && day.lDate.IDayCn==='初一'"></span>
<span :class="['number',{'is-today':day.isToday,'is-empty':day.isToday && !day.lDate.isFestival && !day.lDate.isTerm}]">{{day.isToday?'今天':day.day}}</span>
</p>
<p class="lunar" v-show="!day.isToday || day.lDate.isFestival || day.lDate.isTerm">
<span class="festival" v-if="day.lDate.isFestival">{{day.lDate.festival[0]}}</span>
<span class="term" v-else-if="day.lDate.isTerm">{{day.lDate.Term}}</span>
<!--<span v-else-if="day.lDate.IDayCn==='初一'">{{day.lDate.isLeap && day.lDate.lMonth>10?day.lDate.IMonthCn.replace('闰',''):day.lDate.IMonthCn}}</span>-->
<span v-else-if="day.lDate.IDayCn==='初一'">{{day.lDate.IMonthCn.replace('','')}}</span>
<span v-else>{{day.lDate.IDayCn}}</span>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="date-range__month" v-if="type.toUpperCase() === 'DATERANGE'">
<div class="full-jcalendar-header">
<span class="title-year">{{year2}}</span>
<span style="width:10px;"></span>
<span class="title-month">{{month2}}</span>
<!-- header 切换月份 -->
<p class="next-year" @click.stop="goYearNext"><i class="icon iconfont el-icon-d-arrow-right"></i></p>
<p class="next-month" @click.stop="goNext"><i class="icon iconfont el-icon-arrow-right"></i></p>
</div>
<!-- body 日期和事件 -->
<div class="full-jcalendar__body">
<div class="weeks">
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
<strong class="week"></strong>
</div>
<!--日期 -->
<div class="week-row" v-for="(week,index) in calendarDatas2" :key="index" @mouseout="onMouseOut">
<!--日期 单元格-->
<div class="day-cell" v-for="(day,index) in week" :key="index"
:class="[{'today': day.isToday,'not-optional':isNotOptional(day),'choose':isChoose(day),'select':isSelect(day),'not-cur-month': !day.isCurMonth }]"
@click="onDateSelect(day)" @mouseover="onMouseOver(day);">
<!-- 日期 节气 农历 -->
<div class="day-number">
<p class="solar">
<!--<span class="is-leap" v-if="day.lDate.isLeap && day.lDate.lMonth>10 &&day.lDate.IDayCn==='初一'"></span>-->
<span class="is-leap" v-if="day.lDate.isLeap && day.lDate.IDayCn==='初一'"></span>
<span :class="['number',{'is-today':day.isToday,'is-empty':day.isToday && !day.lDate.isFestival && !day.lDate.isTerm}]">{{day.isToday?'今天':day.day}}</span>
</p>
<p class="lunar" v-show="!day.isToday || day.lDate.isFestival || day.lDate.isTerm">
<span class="festival" v-if="day.lDate.isFestival">{{day.lDate.festival[0]}}</span>
<span class="term" v-else-if="day.lDate.isTerm">{{day.lDate.Term}}</span>
<!--<span v-else-if="day.lDate.IDayCn==='初一'">{{day.lDate.isLeap && day.lDate.lMonth>10?day.lDate.IMonthCn.replace('闰',''):day.lDate.IMonthCn}}</span>-->
<span v-else-if="day.lDate.IDayCn==='初一'">{{day.lDate.IMonthCn.replace('','')}}</span>
<span v-else>{{day.lDate.IDayCn}}</span>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</template>
<script>
import moment from 'moment';
// import JDatePickerScript from './JDatePicker.js'
export default {
props: {
width: {
type: String,
default: '200',
},
value: {
type:[String,Date,Array],
default: ''
},
placeholder:{
type: String,
default: ''
},
format: {
type: String,
default: 'YYYY-MM-DD'
},
showLunarClass: {
type: String,
default: 'NUMBER',//共四种FULLLUNAR全农历格式丁酉[鸡]年己酉月乙巳日LUNAR中文格式丁酉[鸡]年七月廿三NUMBER数字格式2017-09-13MIX格式丁酉(2017)[鸡]年七月廿三;
},
showLunarIcon:{
type: Boolean,
default: false,
},
showBackYears:{
type: Number,
default: 2,
},
showLunarControl:{
type: Boolean,
default: true,
},
disabled:{
type: Boolean,
default: false,
},
editable:{
type: Boolean,
default: true,
},
clearable:{
type: Boolean,
default: true,
},
type:{
type: String,
default: "DATE",//DATE - 日期类型DATERANGE 时间段;
},
rangeSeparator:{
type: String,
default: "-",//时间段分隔符
},
pickerOptions:{
type:Object,
default:null
},
},
computed: {
handleWidth: function () {
let w = this.width.toString();
if (w == null || w == '') {
return 200;
}
if (w.indexOf('px') > -1) w = w.replace(/px/, '');
let w0 = parseInt(w) || 0;
if (w0 == 0) {
return 200;
}
return w0;
},
},
watch: {
'value': function (newValue, oldValue) {
this.inputText = '';
this.isLeap = false;
this.isLunar = false;
this.handleInputText(newValue);
},
'showLunarIcon': function (newValue, oldValue) {
},
},
data () {
return {
inputText:'',
startYear:0,//年份列表的起始年份
monthDay: '',//月份日期类型,用来比较日期
selectDay:[],//type=daterange,存放点击选中的时间值;
chooseDay:[],//type=daterange,存放鼠标移动所选时间段;
year: 0,
month: 0,
year2: 0,
month2: 0,
isCurrMonth: true,
calendarDatas: [],
calendarDatas2: [],
calendarVisible: false,//日历显示开关
yearVisible: false,//年份选择开关
monthVisible: false,//月份选择开关
clearVisible:false,//清除按钮开关
isLunar: false,//是否启用农历
isLeap: false,//是否闰月
}
},
created () {
let month = moment()
this.monthDay = month.toISOString();
this.todayYear = month.year();
this.loadCalendar();
document.addEventListener('click', (e) => {
let icon = this.$el.querySelector('.input-icon');
let input = this.$el.querySelector('.input__inner');
let main = this.$el.querySelector('.full-jcalendar__main');
if (!icon.contains(e.target) && !input.contains(e.target) && !main.contains(e.target)) {
this.calendarVisible = false;
if (this.selectDay.length > 0) {
this.monthDay = this.selectDay[0];
}
}
});
this.handleInputText(this.value,true);
},
methods: {
handleInputText(newValue,isNeedEmit){
if (newValue == undefined || newValue == null || !newValue.toString().length) return;
let valueDay = '', valueDay2 = '', result = '';
if (this.type.toUpperCase() == 'DATE') {
//单日期模式
newValue = newValue.toString();
let isLunar = newValue.indexOf('L') > -1;
this.isLunar = isLunar;
if (isLunar) {
//农历模式
let showLunarClass = this.showLunarClass.toUpperCase();
let lunarDate = JDatePickerScript.calendar.getSolar(newValue);
valueDay = new Date(lunarDate.cYear + '-' + lunarDate.cMonth + '-' + lunarDate.cDay).toISOString();
if (showLunarClass == 'NUMBER') {
result = moment(new Date(lunarDate.lYear + '-' + lunarDate.lMonth + '-' + lunarDate.lDay)).format(this.format.toUpperCase());
}
else if (showLunarClass == 'MIX') {
result = lunarDate.gzYear + '(' + lunarDate.lYear + ')[' + lunarDate.Animal + ']年 ' + lunarDate.IMonthCn + lunarDate.IDayCn;
}
else if (showLunarClass == 'FULLLUNAR') {
result = lunarDate.gzYear + '[' + lunarDate.Animal + ']年 ' + lunarDate.gzMonth + '月 ' + lunarDate.gzDay + '日';
}
else if (showLunarClass == 'LUNAR') {
result = lunarDate.gzYear + '[' + lunarDate.Animal + ']年 ' + lunarDate.IMonthCn + lunarDate.IDayCn;
}
} else {
//公历模式
let date = new Date(newValue);
valueDay = date.toISOString();
result = moment(date).format(this.format.toUpperCase());
this.$emit('input',moment(date).format('YYYY-MM-DD'))
}
this.monthDay = valueDay;
this.selectDay = [valueDay];
this.inputText = result;
this.loadCalendar();
return;
}
if (this.type.toUpperCase() == 'DATERANGE') {
//时间段模式
//判断newValue是否为数组ES2005以上支持isArray
if (Array.isArray(newValue) && newValue.length == 2) {
let beginDt = newValue[0];
let endDt = newValue[1];
//判断value是否为日期类型
if(beginDt == undefined || beginDt == null || !beginDt.toString().length) return;
if(endDt == undefined || endDt == null || !endDt.toString().length) return;
beginDt = beginDt.toString();
endDt = endDt.toString();
let isLunar = beginDt.indexOf('L') > -1;
this.isLunar = isLunar;
if (isLunar) {
//农历模式
let beginDateResult = '', endDateResult = '';
let showLunarClass = this.showLunarClass.toUpperCase();
let beginLunarDate = JDatePickerScript.calendar.getSolar(beginDt);
let endLunarDate = JDatePickerScript.calendar.getSolar(endDt);
valueDay = new Date(beginLunarDate.cYear + '-' + beginLunarDate.cMonth + '-' + beginLunarDate.cDay).toISOString();
valueDay2 = new Date(endLunarDate.cYear + '-' + endLunarDate.cMonth + '-' + endLunarDate.cDay).toISOString();
if (showLunarClass == 'NUMBER') {
beginDateResult = moment(new Date(beginLunarDate.lYear + '-' + beginLunarDate.lMonth + '-' + beginLunarDate.lDay)).format(this.format.toUpperCase());
endDateResult = moment(new Date(endLunarDate.lYear + '-' + endLunarDate.lMonth + '-' + endLunarDate.lDay)).format(this.format.toUpperCase());
}
else if (showLunarClass == 'MIX') {
beginDateResult = beginLunarDate.gzYear + '(' + beginLunarDate.lYear + ')[' + beginLunarDate.Animal + ']年 ' + beginLunarDate.IMonthCn + beginLunarDate.IDayCn;
endDateResult = endLunarDate.gzYear + '(' + endLunarDate.lYear + ')[' + endLunarDate.Animal + ']年 ' + endLunarDate.IMonthCn + endLunarDate.IDayCn;
}
else if (showLunarClass == 'FULLLUNAR') {
beginDateResult = beginLunarDate.gzYear + '[' + beginLunarDate.Animal + ']年 ' + beginLunarDate.gzMonth + '月 ' + beginLunarDate.gzDay + '日';
endDateResult = endLunarDate.gzYear + '[' + endLunarDate.Animal + ']年 ' + endLunarDate.gzMonth + '月 ' + endLunarDate.gzDay + '日';
}
else if (showLunarClass == 'LUNAR') {
beginDateResult = beginLunarDate.gzYear + '[' + beginLunarDate.Animal + ']年 ' + beginLunarDate.IMonthCn + beginLunarDate.IDayCn;
endDateResult = endLunarDate.gzYear + '[' + endLunarDate.Animal + ']年 ' + endLunarDate.IMonthCn + endLunarDate.IDayCn;
}
result = beginDateResult + ' ' + this.rangeSeparator + ' ' + endDateResult;
} else {
//公历模式
if(isNeedEmit){
this.$emit('input',[moment(new Date(beginDt)).format('YYYY-MM-DD'),moment(new Date(endDt)).format('YYYY-MM-DD')]);
return;
}
let beginDate = new Date(beginDt);
let endDate = new Date(endDt);
valueDay = beginDate.toISOString();
valueDay2 = endDate.toISOString();
result = moment(beginDate).format(this.format.toUpperCase()) + ' ' + this.rangeSeparator + ' ' + moment(endDate).format(this.format.toUpperCase());
}
this.monthDay = valueDay;
this.selectDay = [valueDay, valueDay2];
this.chooseDay = [valueDay, valueDay2];
this.inputText = result;
this.loadCalendar();
}
}
},
handleInputChange(e){
let result = e.target.value;
if(this.type.toUpperCase() == 'DATE'){
//单日期
if(this.isLunar){
//农历 NUMBER 模式
if(this.showLunarClass.toUpperCase() == 'NUMBER') {
let regex = /\d{4}[-\.\/]\d{1,2}[-\.\/]\d{1,2}/;
if (!regex.test(result)) return;
result = result.replace(/\./g, '-').replace(/\//g, '-');
result = 'L' + moment(new Date(result)).format('YYYY-MM-DD');
}
}else{
let regex = /\d{4}[-\.\/]\d{1,2}[-\.\/]\d{1,2}/;
if (!regex.test(result)) return;
result = result.replace(/\./g, '-').replace(/\//g, '-');
result = moment(new Date(result)).format('YYYY-MM-DD');
}
}
this.$emit('change',result);
this.$emit('input',result);
},
onClearInput(){
if(this.type.toUpperCase() == 'DATERANGE'){
this.$emit('change',[]);
this.$emit('input', []);
}else {
this.$emit('change', '');
this.$emit('input', '');
}
this.selectDay = [];
this.chooseDay = [];
this.monthDay = moment().toISOString();
this.clearVisible = false;
},
onInputOver(){
if(this.disabled) return;
if(this.value ==null || this.value == '')return;
this.clearVisible = true;
},
onInputOut(){
this.clearVisible = false;
},
isNotOptional(day){
if (this.pickerOptions != null && this.pickerOptions != undefined && 'disabledDate' in this.pickerOptions) {
return this.pickerOptions.disabledDate(new Date(day.date));
}
return false;
},
isChoose(day){
//是否在选中时间段区域内
if(this.type.toUpperCase() == 'DATERANGE') {
if(this.chooseDay.length == 2){
let currDay = moment(day.date);
return currDay.isSameOrAfter(this.chooseDay[0]) & currDay.isSameOrBefore(this.chooseDay[1]) & day.isCurMonth;
}
}
return false;
},
isSelect(day){
return this.chooseDay.length>0 & moment(day.date).isSame(new Date(this.chooseDay[0]),'day') & day.isCurMonth;
},
onInputFocus(){
if(this.disabled) return;
this.loadCalendar();
this.calendarVisible = true;
},
onLunarChange(){
if (this.value != null && this.value != '' && this.value.length > 0) {
if (this.type.toUpperCase() == 'DATERANGE') {
//时间段模式
if (this.isLunar) {
//由公历到农历
//判断日期结果集中日期格式是否为农历,若是不作处理直接返回。
if(this.value[0].indexOf('L')>-1) return;
let beginDay = JDatePickerScript.calendar.getLunar(this.value[0].replace(/L/,'').replace(/R/,''));
let endDay = JDatePickerScript.calendar.getLunar(this.value[1].replace(/L/,'').replace(/R/,''));
let beginDayResult = 'L' + (beginDay.isLeap ? 'R' : '') + moment(new Date(beginDay.lYear + '-' + beginDay.lMonth + '-' + beginDay.lDay)).format('YYYY-MM-DD');
let endDayResult = 'L' + (endDay.isLeap ? 'R' : '') + moment(new Date(endDay.lYear + '-' + endDay.lMonth + '-' + endDay.lDay)).format('YYYY-MM-DD');
this.$emit('change',[beginDayResult,endDayResult]);
this.$emit('input' ,[beginDayResult,endDayResult]);
} else {
//由农历到公历
//判断日期结果集中日期格式是否为农历,若不是不作处理直接返回。
if(this.value[0].indexOf('L') == -1) return;
let beginDay = JDatePickerScript.calendar.getSolar(this.value[0]);
let endDay = JDatePickerScript.calendar.getSolar(this.value[1]);
let beginDayResult = moment(new Date(beginDay.cYear + '-' + beginDay.cMonth + '-' + beginDay.cDay)).format('YYYY-MM-DD');
let endDayResult = moment(new Date(endDay.cYear + '-' + endDay.cMonth + '-' + endDay.cDay)).format('YYYY-MM-DD');
this.$emit('change',[beginDayResult,endDayResult]);
this.$emit('input' ,[beginDayResult,endDayResult]);
}
} else {
//单日期模式
let day,result = '';
if (this.isLunar) {
//由公历到农历
//判断日期结果中日期格式是否为农历,若是不作处理直接返回。
if(this.value.indexOf('L')>-1) return;
day = JDatePickerScript.calendar.getLunar(this.value.replace(/L/,'').replace(/R/,''));
result = 'L' + (day.isLeap ? 'R' : '') + moment(new Date(day.lYear + '-' + day.lMonth + '-' + day.lDay)).format('YYYY-MM-DD');
this.$emit('change', result);
this.$emit('input' , result);
} else {
//由农历到公历
//判断日期结果中日期格式是否为农历,若不是不作处理直接返回。
if(this.value.indexOf('L') == -1) return;
day = JDatePickerScript.calendar.getSolar(this.value);
result = moment(new Date(day.cYear + '-' + day.cMonth + '-' + day.cDay)).format('YYYY-MM-DD');
this.$emit('change', new Date(result));
this.$emit('input' , new Date(result));
}
}
}
},
showYearList(){
//公式A 默认当前年所在页面的起始年S 选择日期所在年份Z(pagesize) = 12; Math.ceil : 向上入有小数就向上1
// result = A - Math.ceil( (A-S) / Z ) * Z;
let A = this.todayYear + parseInt(this.showBackYears) - 11;
this.startYear = A - Math.ceil((A - this.year )/12) * 12;
this.yearVisible = true;
},
goYearPrevList(){
if(this.startYear<1912) return;
this.startYear -= 12;
},
goYearNextList(){
if(this.startYear>=this.todayYear + parseInt(this.showBackYears) - 11) return;
this.startYear += 12;
},
goYearPrev(){
this.monthDay = moment(this.monthDay).subtract(1,'years').toISOString();
this.loadCalendar();
},
goYearNext(){
this.monthDay = moment(this.monthDay).add(1,'years').toISOString();
this.loadCalendar();
},
goPrev () {
let newMonth = moment(this.monthDay).subtract(1, 'months');
this.monthDay = newMonth.toISOString();
this.loadCalendar()
},
goNext () {
let newMonth = moment(this.monthDay).add(1, 'months');
this.monthDay = newMonth.toISOString();
this.loadCalendar()
},
onMouseOver(day){
if (this.selectDay.length == 1) {
let currDay = moment(day.date);
let beginDt = this.selectDay[0];
if (currDay.isAfter(beginDt)) {
this.chooseDay = [beginDt, currDay.toISOString()];
}
}
},
onMouseOut(){
if (this.selectDay.length < 2) {
this.chooseDay = [];
}
},
onDateSelect(day){
if(this.isNotOptional(day)) return;
let dayDate = new Date(day.date).toISOString();
if(this.type.toUpperCase() == 'DATERANGE') {
if (this.selectDay.length >= 2) {
this.selectDay = [];
this.chooseDay = [];
}
//判断日期1、第一次选中直接加入结果集为时间段起始日期
// 2、小于起始日期则重置结果集所选日期为结果集起始日期
// 3、大于等于起始日期加入结果集为时间段结束日期可返回结果。
if (this.selectDay.length > 0) {
if (moment(dayDate).isSameOrAfter(this.selectDay[0])) {
this.selectDay.push(dayDate);
}else{
this.selectDay = [dayDate];
}
}else {
this.selectDay.push(dayDate);
}
//校正日历控件展示月份到起始月份或当前月份
//this.monthDay = new Date(this.selectDay[0]).toISOString();
//判断结果集是否符合条件数组selectDay.length2返回结果隐藏控件
if (this.selectDay.length == 2) {
if(this.isLunar) {
let beginLunarDateResult = '', endLunarDateResult = '';
let beginLunar = JDatePickerScript.calendar.getLunar(this.selectDay[0]);
beginLunarDateResult = 'L' + (beginLunar.isLeap ? 'R' : '') + moment(new Date(beginLunar.lYear + '-' + beginLunar.lMonth + '-' + beginLunar.lDay)).format("YYYY-MM-DD");
endLunarDateResult = 'L' + (day.lDate.isLeap ? 'R' : '') + moment(new Date(day.lDate.lYear + '-' + day.lDate.lMonth + '-' + day.lDate.lDay)).format("YYYY-MM-DD");
this.$emit('change', [beginLunarDateResult, endLunarDateResult])
this.$emit('input' , [beginLunarDateResult, endLunarDateResult])
}else{
this.$emit('change', [moment(this.selectDay[0]).format('YYYY-MM-DD'), moment(this.selectDay[1]).format('YYYY-MM-DD')])
this.$emit('input' , [moment(this.selectDay[0]).format('YYYY-MM-DD'), moment(this.selectDay[1]).format('YYYY-MM-DD')])
}
this.calendarVisible = false;
}
}else {
let result = day.date;
if (this.isLunar) {
let tip = 'L' + (day.lDate.isLeap ? 'R' : '');
let date = new Date(day.lDate.lYear + '-' + day.lDate.lMonth + '-' + day.lDate.lDay).toISOString();
result = tip + moment(date).format("YYYY-MM-DD")
}
this.monthDay = dayDate;
this.calendarVisible = false;
this.$emit('change', result);
this.$emit('input' , result);
}
},
onMonthSelect(command){
let newMonth = moment(this.monthDay).month(command)
this.monthDay = newMonth.toISOString();
this.loadCalendar();
this.monthVisible = false;
},
onYearSelect(command){
let newMonth = moment(this.monthDay).year(command)
this.monthDay = newMonth.toISOString();
this.yearVisible = false;
this.monthVisible = true;
},
loadCalendar () {
if(this.monthDay==null || this.monthDay == ''){
this.monthDay = moment().toISOString();
}
let startDate = moment(this.monthDay).startOf('month').format('YYYY-MM-DD');
let currentMonth = moment(startDate);
this.year = currentMonth.year();
this.month = currentMonth.month() + 1;
this.calendarDatas = this.handleCalendar(currentMonth);
if(this.type.toUpperCase() == 'DATERANGE'){
//时间段模式
let currentMonth2 = currentMonth.clone().add(1,'months');
this.year2 = currentMonth2.year();
this.month2 = currentMonth2.month() + 1;
this.calendarDatas2 = this.handleCalendar(currentMonth2);
}
},
handleCalendar(currentMonth){
let start = currentMonth.clone()
start.subtract(start.day(), 'd')
let calendars = [];
for (let iWeek = 0; iWeek < 6; iWeek++) {
let week = []
if (iWeek > 0 && !start.isSame(currentMonth, 'month')) {
break;
}
for (let iDay = 0; iDay < 7; iDay++) {
week.push({
day: start.date(),
isToday: start.isSame(new Date(), 'day'),
isSelect: this.selectDay.length>0 && start.isSame(new Date(this.selectDay[0]),'day'),
isCurMonth: start.isSame(currentMonth, 'month'),
weekIndex:iWeek,
week: iDay,
date: start.clone().format('YYYY-MM-DD'),
lDate: JDatePickerScript.calendar.getLunar(start.clone().format('YYYY-MM-DD')),
});
start.add(1, 'd')
}
calendars.push(week)
}
return calendars;
}
},
}
</script>
<style src="../theme/public.css" scoped>
</style>

View File

@@ -0,0 +1,13 @@
import jDatePicker from './JDatePicker.vue' // 导入组件
const jLunarDatePicker = {
install(Vue, options) {
Vue.component(jDatePicker.name, jDatePicker) // vuePayKeyboard.name 组件的name属性
// 类似通过 this.$xxx 方式调用插件的 其实只是挂载到原型上而已
// Vue.prototype.$xxx // 最终可以在任何地方通过 this.$xxx 调用
// 虽然没有明确规定用$开头 但是大家都默认遵守这个规定
}
}
if (typeof window !== 'undefined' && window.Vue) {
window.Vue.use(jLunarDatePicker);
}
export default jLunarDatePicker // 导出..

View File

@@ -0,0 +1,626 @@
/**
* @1900-2100区间内的公历、农历互转
* @charset UTF-8
* @公历转农历calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
*/
const calendar = {
/**
* 农历1900-2100的润大小信息表
* @Array Of Property
* @return Hex
*/
lunarInfo:[0x04bd8,0x04ae0,0x0a570,0x054d5,0x0d260,0x0d950,0x16554,0x056a0,0x09ad0,0x055d2,//1900-1909
0x04ae0,0x0a5b6,0x0a4d0,0x0d250,0x1d255,0x0b540,0x0d6a0,0x0ada2,0x095b0,0x14977,//1910-1919
0x04970,0x0a4b0,0x0b4b5,0x06a50,0x06d40,0x1ab54,0x02b60,0x09570,0x052f2,0x04970,//1920-1929
0x06566,0x0d4a0,0x0ea50,0x06e95,0x05ad0,0x02b60,0x186e3,0x092e0,0x1c8d7,0x0c950,//1930-1939
0x0d4a0,0x1d8a6,0x0b550,0x056a0,0x1a5b4,0x025d0,0x092d0,0x0d2b2,0x0a950,0x0b557,//1940-1949
0x06ca0,0x0b550,0x15355,0x04da0,0x0a5b0,0x14573,0x052b0,0x0a9a8,0x0e950,0x06aa0,//1950-1959
0x0aea6,0x0ab50,0x04b60,0x0aae4,0x0a570,0x05260,0x0f263,0x0d950,0x05b57,0x056a0,//1960-1969
0x096d0,0x04dd5,0x04ad0,0x0a4d0,0x0d4d4,0x0d250,0x0d558,0x0b540,0x0b6a0,0x195a6,//1970-1979
0x095b0,0x049b0,0x0a974,0x0a4b0,0x0b27a,0x06a50,0x06d40,0x0af46,0x0ab60,0x09570,//1980-1989
0x04af5,0x04970,0x064b0,0x074a3,0x0ea50,0x06b58,0x055c0,0x0ab60,0x096d5,0x092e0,//1990-1999
0x0c960,0x0d954,0x0d4a0,0x0da50,0x07552,0x056a0,0x0abb7,0x025d0,0x092d0,0x0cab5,//2000-2009
0x0a950,0x0b4a0,0x0baa4,0x0ad50,0x055d9,0x04ba0,0x0a5b0,0x15176,0x052b0,0x0a930,//2010-2019
0x07954,0x06aa0,0x0ad50,0x05b52,0x04b60,0x0a6e6,0x0a4e0,0x0d260,0x0ea65,0x0d530,//2020-2029
0x05aa0,0x076a3,0x096d0,0x04afb,0x04ad0,0x0a4d0,0x1d0b6,0x0d250,0x0d520,0x0dd45,//2030-2039
0x0b5a0,0x056d0,0x055b2,0x049b0,0x0a577,0x0a4b0,0x0aa50,0x1b255,0x06d20,0x0ada0,//2040-2049
/**Add By JJonline@JJonline.Cn**/
0x14b63,0x09370,0x049f8,0x04970,0x064b0,0x168a6,0x0ea50, 0x06b20,0x1a6c4,0x0aae0,//2050-2059
0x0a2e0,0x0d2e3,0x0c960,0x0d557,0x0d4a0,0x0da50,0x05d55,0x056a0,0x0a6d0,0x055d4,//2060-2069
0x052d0,0x0a9b8,0x0a950,0x0b4a0,0x0b6a6,0x0ad50,0x055a0,0x0aba4,0x0a5b0,0x052b0,//2070-2079
0x0b273,0x06930,0x07337,0x06aa0,0x0ad50,0x14b55,0x04b60,0x0a570,0x054e4,0x0d160,//2080-2089
0x0e968,0x0d520,0x0daa0,0x16aa6,0x056d0,0x04ae0,0x0a9d4,0x0a2d0,0x0d150,0x0f252,//2090-2099
0x0d520],//2100
/**
* 公历每个月份的天数普通表
* @Array Of Property
* @return Number
*/
solarMonth:[31,28,31,30,31,30,31,31,30,31,30,31],
/**
* 天干地支之天干速查表
* @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
* @return Cn string
*/
Gan:["\u7532","\u4e59","\u4e19","\u4e01","\u620a","\u5df1","\u5e9a","\u8f9b","\u58ec","\u7678"],
/**
* 天干地支之地支速查表
* @Array Of Property
* @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
* @return Cn string
*/
Zhi:["\u5b50","\u4e11","\u5bc5","\u536f","\u8fb0","\u5df3","\u5348","\u672a","\u7533","\u9149","\u620c","\u4ea5"],
/**
* 天干地支之地支速查表<=>生肖
* @Array Of Property
* @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
* @return Cn string
*/
Animals:["\u9f20","\u725b","\u864e","\u5154","\u9f99","\u86c7","\u9a6c","\u7f8a","\u7334","\u9e21","\u72d7","\u732a"],
/**
* 24节气速查表
* @Array Of Property
* @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
* @return Cn string
*/
solarTerm:["\u5c0f\u5bd2","\u5927\u5bd2","\u7acb\u6625","\u96e8\u6c34","\u60ca\u86f0","\u6625\u5206","\u6e05\u660e","\u8c37\u96e8","\u7acb\u590f","\u5c0f\u6ee1","\u8292\u79cd","\u590f\u81f3","\u5c0f\u6691","\u5927\u6691","\u7acb\u79cb","\u5904\u6691","\u767d\u9732","\u79cb\u5206","\u5bd2\u9732","\u971c\u964d","\u7acb\u51ac","\u5c0f\u96ea","\u5927\u96ea","\u51ac\u81f3"],
/**
* 1900-2100各年的24节气日期速查表
* @Array Of Property
* @return 0x string For splice
*/
sTermInfo:['9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf97c3598082c95f8c965cc920f',
'97bd0b06bdb0722c965ce1cfcc920f','b027097bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
'97bcf97c359801ec95f8c965cc920f','97bd0b06bdb0722c965ce1cfcc920f','b027097bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f','97bd0b06bdb0722c965ce1cfcc920f',
'b027097bd097c36b0b6fc9274c91aa','9778397bd19801ec9210c965cc920e','97b6b97bd19801ec95f8c965cc920f',
'97bd09801d98082c95f8e1cfcc920f','97bd097bd097c36b0b6fc9210c8dc2','9778397bd197c36c9210c9274c91aa',
'97b6b97bd19801ec95f8c965cc920e','97bd09801d98082c95f8e1cfcc920f','97bd097bd097c36b0b6fc9210c8dc2',
'9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec95f8c965cc920e','97bcf97c3598082c95f8e1cfcc920f',
'97bd097bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec9210c965cc920e',
'97bcf97c3598082c95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e','97bcf97c3598082c95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f',
'97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
'97bcf97c359801ec95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f','97bd097bd07f595b0b6fc920fb0722',
'9778397bd097c36b0b6fc9210c8dc2','9778397bd19801ec9210c9274c920e','97b6b97bd19801ec95f8c965cc920f',
'97bd07f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c920e',
'97b6b97bd19801ec95f8c965cc920f','97bd07f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2',
'9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec9210c965cc920e','97bd07f1487f595b0b0bc920fb0722',
'7f0e397bd097c36b0b6fc9210c8dc2','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
'97bcf7f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e','97bcf7f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf7f1487f531b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
'97bcf7f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c9274c920e','97bcf7f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
'9778397bd097c36b0b6fc9210c91aa','97b6b97bd197c36c9210c9274c920e','97bcf7f0e47f531b0b0bb0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c920e',
'97b6b7f0e47f531b0723b0b6fb0722','7f0e37f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2',
'9778397bd097c36b0b70c9274c91aa','97b6b7f0e47f531b0723b0b6fb0721','7f0e37f1487f595b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc9210c8dc2','9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b7f0e47f531b0723b0787b0721','7f0e27f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
'9778397bd097c36b0b6fc9210c91aa','97b6b7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9210c8dc2','977837f0e37f149b0723b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722','7f0e37f5307f595b0b0bc920fb0722','7f0e397bd097c35b0b6fc9210c8dc2',
'977837f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0721','7f0e37f1487f595b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc9210c8dc2','977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','977837f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
'977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14998082b0787b06bd',
'7f07e7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
'977837f0e37f14998082b0723b06bd','7f07e7f0e37f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722','7f0e37f1487f595b0b0bb0b6fb0722','7f0e37f0e37f14898082b0723b02d5',
'7ec967f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0722','7f0e37f1487f531b0b0bb0b6fb0722',
'7f0e37f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
'7f0e37f1487f531b0b0bb0b6fb0722','7f0e37f0e37f14898082b072297c35','7ec967f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e37f0e37f14898082b072297c35',
'7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f149b0723b0787b0721',
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14998082b0723b06bd',
'7f07e7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722','7f0e37f0e366aa89801eb072297c35',
'7ec967f0e37f14998082b0723b06bd','7f07e7f0e37f14998083b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
'7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14898082b0723b02d5','7f07e7f0e37f14998082b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722','7f0e36665b66aa89801e9808297c35','665f67f0e37f14898082b0723b02d5',
'7ec967f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0722','7f0e36665b66a449801e9808297c35',
'665f67f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
'7f0e36665b66a449801e9808297c35','665f67f0e37f14898082b072297c35','7ec967f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721','7f0e26665b66a449801e9808297c35','665f67f0e37f1489801eb072297c35',
'7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722'],
/**
* 数字转中文速查表
* @Array Of Property
* @trans ['日','一','二','三','四','五','六','七','八','九','十']
* @return Cn string
*/
nStr1:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341"],
/**
* 日期转农历称呼速查表
* @Array Of Property
* @trans ['初','十','廿','卅']
* @return Cn string
*/
nStr2:["\u521d","\u5341","\u5eff","\u5345"],
/**
* 月份转农历称呼速查表
* @Array Of Property
* @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
* @return Cn string
*/
nStr3:["\u6b63","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u51ac","\u814a"],
/**
* 农历节日
*/
lunarFestival:{"1-1":"春节","1-15":"上元节","2-2":"龙抬头","5-5":"端午","7-7":"七夕","7-15":"中元节","8-15":"中秋","9-9":"重阳","10-15":"下元节","12-8":"腊八","12-23":"小年"},
/**
* 公历节日
*/
solarFestival:{"1-1":"元旦","2-14":"情人节","3-8":"妇女节","3-12":"植树节","4-1":"愚人节","5-1":"劳动节","5-4":"青年节","6-1":"儿童节","7-1":"建党节","8-1":"建军节","9-10":"教师节","10-1":"国庆节","11-1":"万圣节","12-24":"平安夜","12-25":"圣诞节"},
/**
* 返回农历y年一整年的总天数
* @param lunar Year
* @return Number
* @eg:var count = calendar.lYearDays(1987) ;//count=387
*/
lYearDays:function(y) {
var i, sum = 348;
for(i=0x8000; i>0x8; i>>=1) { sum += (calendar.lunarInfo[y-1900] & i)? 1: 0; }
return(sum+calendar.leapDays(y));
},
/**
* 返回农历y年闰月是哪个月若y年没有闰月 则返回0
* @param lunar Year
* @return Number (0-12)
* @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
*/
leapMonth:function(y) { //闰字编码 \u95f0
return(calendar.lunarInfo[y-1900] & 0xf);
},
/**
* 返回农历y年闰月的天数 若该年没有闰月则返回0
* @param lunar Year
* @return Number (0、29、30)
* @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
*/
leapDays:function(y) {
if(calendar.leapMonth(y)) {
return((calendar.lunarInfo[y-1900] & 0x10000)? 30: 29);
}
return(0);
},
/**
* 返回农历y年m月非闰月的总天数计算m为闰月时的天数请使用leapDays方法
* @param lunar Year
* @return Number (-1、29、30)
* @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
*/
monthDays:function(y,m) {
if(m>12 || m<1) {return -1}//月份参数从1至12参数错误返回-1
return( (calendar.lunarInfo[y-1900] & (0x10000>>m))? 30: 29 );
},
/**
* 返回公历(!)y年m月的天数
* @param solar Year
* @return Number (-1、28、29、30、31)
* @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
*/
solarDays:function(y,m) {
if(m>12 || m<1) {return -1} //若参数错误 返回-1
var ms = m-1;
if(ms==1) { //2月份的闰平规律测算后确认返回28或29
return(((y%4 == 0) && (y%100 != 0) || (y%400 == 0))? 29: 28);
}else {
return(calendar.solarMonth[ms]);
}
},
/**
* 农历年份转换为干支纪年
* @param lYear 农历年的年份数
* @return Cn string
*/
toGanZhiYear:function(lYear) {
var ganKey = (lYear - 3) % 10;
var zhiKey = (lYear - 3) % 12;
if(ganKey == 0) ganKey = 10;//如果余数为0则为最后一个天干
if(zhiKey == 0) zhiKey = 12;//如果余数为0则为最后一个地支
return calendar.Gan[ganKey-1] + calendar.Zhi[zhiKey-1];
},
/**
* 公历月、日判断所属星座
* @param cMonth [description]
* @param cDay [description]
* @return Cn string
*/
toAstro:function(cMonth,cDay) {
var s = "\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf";
var arr = [20,19,21,21,21,22,23,23,23,23,22,22];
return s.substr(cMonth*2 - (cDay < arr[cMonth-1] ? 2 : 0),2) + "\u5ea7";//座
},
/**
* 传入offset偏移量返回干支
* @param offset 相对甲子的偏移量
* @return Cn string
*/
toGanZhi:function(offset) {
return calendar.Gan[offset%10] + calendar.Zhi[offset%12];
},
/**
* 传入公历(!)y年获得该年第n个节气的公历日期
* @param y公历年(1900-2100)n二十四节气中的第几个节气(1~24)从n=1(小寒)算起
* @return day Number
* @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
*/
getTerm:function(y,n) {
if(y<1900 || y>2100) {return -1;}
if(n<1 || n>24) {return -1;}
var _table = calendar.sTermInfo[y-1900];
var _info = [
parseInt('0x'+_table.substr(0,5)).toString() ,
parseInt('0x'+_table.substr(5,5)).toString(),
parseInt('0x'+_table.substr(10,5)).toString(),
parseInt('0x'+_table.substr(15,5)).toString(),
parseInt('0x'+_table.substr(20,5)).toString(),
parseInt('0x'+_table.substr(25,5)).toString()
];
var _calday = [
_info[0].substr(0,1),
_info[0].substr(1,2),
_info[0].substr(3,1),
_info[0].substr(4,2),
_info[1].substr(0,1),
_info[1].substr(1,2),
_info[1].substr(3,1),
_info[1].substr(4,2),
_info[2].substr(0,1),
_info[2].substr(1,2),
_info[2].substr(3,1),
_info[2].substr(4,2),
_info[3].substr(0,1),
_info[3].substr(1,2),
_info[3].substr(3,1),
_info[3].substr(4,2),
_info[4].substr(0,1),
_info[4].substr(1,2),
_info[4].substr(3,1),
_info[4].substr(4,2),
_info[5].substr(0,1),
_info[5].substr(1,2),
_info[5].substr(3,1),
_info[5].substr(4,2),
];
return parseInt(_calday[n-1]);
},
/**
* 传入农历数字月份返回汉语通俗表示法
* @param lunar month
* @return Cn string
* @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
*/
toChinaMonth:function(m) { // 月 => \u6708
if(m>12 || m<1) {return -1} //若参数错误 返回-1
var s = calendar.nStr3[m-1];
s+= "\u6708";//加上月字
return s;
},
/**
* 传入年份月份返回第n个星期日的日期数字
* @param y 年份
* @param m 月份
* @param n 第几个星期日 ( 5>n>0的数字 一个月一般就4个星期日最多5个)
* @return 日期数字3 getSunday(2017,9,1); 九月的第一个星期日是3号超出返回-1
*/
getSunday(y,m,n){
var d = new Date(y+'-' + m + '-1');
var d2= new Date(y+'-'+(m+1)+'-1');
d2.setDate(0);
var maxDay = d2.getDate();//传入月份的最后一天
var week = d.getDay();
var first = 1;
if(week>0) first = d.getDate() + (7 - week);
var result = (n-1)*7 + first;
if(result>maxDay) return -1;
return result;
},
/**
* 传入农历日期数字返回汉字表示法
* @param lunar day
* @return Cn string
* @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
*/
toChinaDay:function(d){ //日 => \u65e5
var s;
switch (d) {
case 10:
s = '\u521d\u5341'; break;
case 20:
s = '\u4e8c\u5341'; break;
break;
case 30:
s = '\u4e09\u5341'; break;
break;
default :
s = calendar.nStr2[Math.floor(d/10)];
s += calendar.nStr1[d%10];
}
return(s);
},
/**
* 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
* @param y year
* @return Cn string
* @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
*/
getAnimal: function(y) {
return calendar.Animals[(y - 4) % 12]
},
/**
* 判断 当天为 此年的第几天
* @param date
* @returns {number}
*/
getCyclical:function(date){
var nowDate = new Date(date);
var initTime = new Date(date);
initTime.setMonth(0); // 本年初始月份
initTime.setDate(1); // 本年初始时间
var differenceVal = nowDate - initTime ; // 今天的时间减去本年开始时间,获得相差的时间
return Math.ceil(differenceVal/(24*60*60*1000));
},
/**
* 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
* @param y solar year
* @param m solar month
* @param d solar day
* @return JSON object
* @eg:console.log(calendar.solar2lunar(1987,11,01));
*/
solar2lunar:function (y,m,d) { //参数区间1900.1.31~2100.12.31
//年份限定、上限
if(y<1900 || y>2100) {
return -1;// undefined转换为数字变为NaN
}
//公历传参最下限
if(y==1900&&m==1&&d<31) {
return -1;
}
//未传参 获得当天
if(!y) {
var objDate = new Date();
}else {
var objDate = new Date(y,parseInt(m)-1,d)
}
var i, leap=0, temp=0;
//修正ymd参数
var y = objDate.getFullYear(),
m = objDate.getMonth()+1,
d = objDate.getDate();
var offset = (Date.UTC(objDate.getFullYear(),objDate.getMonth(),objDate.getDate()) - Date.UTC(1900,0,31))/86400000;
for(i=1900; i<2101 && offset>0; i++) {
temp = calendar.lYearDays(i);
offset -= temp;
}
if(offset<0) {
offset+=temp; i--;
}
//是否今天
var isTodayObj = new Date(),
isToday = false;
if(isTodayObj.getFullYear()==y && isTodayObj.getMonth()+1==m && isTodayObj.getDate()==d) {
isToday = true;
}
//星期几
var nWeek = objDate.getDay(),
cWeek = calendar.nStr1[nWeek];
//数字表示周几顺应天朝周一开始的惯例
if(nWeek==0) {
nWeek = 7;
}
//农历年
var year = i;
var leap = calendar.leapMonth(i); //闰哪个月
var isLeap = false;
//效验闰月
for(i=1; i<13 && offset>0; i++) {
//闰月
if(leap>0 && i==(leap+1) && isLeap==false){
--i;
isLeap = true; temp = calendar.leapDays(year); //计算农历闰月天数
}
else{
temp = calendar.monthDays(year, i);//计算农历普通月天数
}
//解除闰月
if(isLeap==true && i==(leap+1)) { isLeap = false; }
offset -= temp;
}
// 闰月导致数组下标重叠取反
if(offset==0 && leap>0 && i==leap+1)
{
if(isLeap){
isLeap = false;
}else{
isLeap = true; --i;
}
}
if(offset<0)
{
offset += temp;
--i;
}
//农历月
var month = i;
//农历日
var day = offset +1;
//天干地支处理
var sm = m-1;
var gzY = calendar.toGanZhiYear(year);
// 当月的两个节气
// bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
var firstNode = calendar.getTerm(y,(m*2-1));//返回当月「节」为几日开始
var secondNode = calendar.getTerm(y,(m*2));//返回当月「节」为几日开始
// 依据12节气修正干支月
var gzM = calendar.toGanZhi((y-1900)*12+m+11);
if(d>=firstNode) {
gzM = calendar.toGanZhi((y-1900)*12+m+12);
}
//传入的日期的节气与否
var isTerm = false;
var Term = null;
if(firstNode==d) {
isTerm = true;
Term = calendar.solarTerm[m*2-2];
}
if(secondNode==d) {
isTerm = true;
Term = calendar.solarTerm[m*2-1];
}
//日柱 当月一日与 1900/1/1 相差天数
var dayCyclical = Date.UTC(y,sm,1,0,0,0,0)/86400000+25567+10;
var gzD = calendar.toGanZhi(dayCyclical+d-1);
//(年-1900) * 5 + (年-1900+3) / 4 + 9 + 当年年初起累积日数
// var dayCyclical = (y-1900)*5 + (y-1900+3)/4 + 9 +(this.getCyclical(y+'-'+m+'-'+d))
// var gzD = calendar.toGanZhi(dayCyclical-1);
//该日期所属的星座
var astro = calendar.toAstro(m,d);
//该日期所有的节日
var festival = [];
//农历传统节日
var lf = calendar.lunarFestival[month+'-'+day];
if(lf != undefined && lf != null && lf != '') festival.push(lf);
if(month==12 && (isLeap?day == calendar.leapDays(year):calendar.monthDays(month-1)==29?day == 30:day == 29)) festival.push('除夕');
//公历节日
var sf = calendar.solarFestival[m+'-'+d];
if(sf != undefined && sf != null && sf != '') festival.push(sf);
if(m==5 && d==calendar.getSunday(y,m,2)) festival.push('母亲节');
if(m==6 && d==calendar.getSunday(y,m,3)) festival.push('父亲节');
return {'lYear':year,'lMonth':month,'lDay':day,'isFestival':festival.length>0,'festival':festival,'Animal':calendar.getAnimal(year),'IMonthCn':(isLeap?"\u95f0":'')+calendar.toChinaMonth(month),'IDayCn':calendar.toChinaDay(day),'cYear':y,'cMonth':m,'cDay':d,'gzYear':gzY,'gzMonth':gzM,'gzDay':gzD,'isToday':isToday,'isLeap':isLeap,'nWeek':nWeek,'ncWeek':"\u661f\u671f"+cWeek,'isTerm':isTerm,'Term':Term,'astro':astro};
},
getLunar:function (date) {
var D;
if(date==undefined){
D = new Date();
}else{
D = new Date(date);
}
D.setHours(D.getHours()+8)//根据国际UTC标准中国时区应为UTC+8
var cY = D.getUTCFullYear();
var cM = D.getUTCMonth()+1;
var cD = D.getUTCDate();
//console.log('getLunar:月'+cM+'--'+cD+'日')
return calendar.solar2lunar(cY,cM,cD);
},
/**
* 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
* @param y lunar year
* @param m lunar month
* @param d lunar day
* @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
* @return JSON object
* @eg:console.log(calendar.lunar2solar(1987,9,10));
*/
lunar2solar:function(y,m,d,isLeapMonth) { //参数区间1900.1.31~2100.12.1
var isLeapMonth = !!isLeapMonth;
var leapOffset = 0;
var leapMonth = calendar.leapMonth(y);
var leapDay = calendar.leapDays(y);
if(isLeapMonth&&(leapMonth!=m)) {return -1;}//传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
if(y==2100&&m==12&&d>1 || y==1900&&m==1&&d<31) {return -1;}//超出了最大极限值
var day = calendar.monthDays(y,m);
var _day = day;
//bugFix 2016-9-25
//if month is leap, _day use leapDays method
if(isLeapMonth) {
_day = calendar.leapDays(y,m);
}
if(y < 1900 || y > 2100 || d > _day) {return -1;}//参数合法性效验
//计算农历的时间差
var offset = 0;
for(var i=1900;i<y;i++) {
offset+=calendar.lYearDays(i);
}
var leap = 0,isAdd= false;
for(var i=1;i<m;i++) {
leap = calendar.leapMonth(y);
if(!isAdd) {//处理闰月
if(leap<=i && leap>0) {
offset+=calendar.leapDays(y);isAdd = true;
}
}
offset+=calendar.monthDays(y,i);
}
//转换闰月农历 需补充该年闰月的前一个月的时差
if(isLeapMonth) {offset+=day;}
//1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
var stmap = Date.UTC(1900,1,30,0,0,0);
var calObj = new Date((offset+d-31)*86400000+stmap);
var cY = calObj.getUTCFullYear();
var cM = calObj.getUTCMonth()+1;
var cD = calObj.getUTCDate();
return calendar.solar2lunar(cY,cM,cD);
},
/**
* 传入农历日期
* @param date 类型String格式L2017-01-02闰月LR2017-06-03
* @returns {*|JSON}
*/
getSolar(date) {
if(date == undefined || date == null || date == '' || date.indexOf('L') == -1) return null;
var isLeapMonth = date.indexOf('R')>-1;
var D = date.replace(/L/,'').replace(/R/,'').split('-');
var cY = parseInt(D[0]);
var cM = parseInt(D[1]);
var cD = parseInt(D[2]);
return calendar.lunar2solar(cY,cM,cD,isLeapMonth);
},
};
export default { calendar }

View File

@@ -3,6 +3,7 @@
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
:isFold="true"
@headBtnClick="buttonClick" />
<base-table
:table-props="tableProps"
@@ -32,6 +33,10 @@ const tableProps = [
prop: 'opPeopleName',
label: '操作人'
},
{
prop: 'deptName',
label: '部门'
},
{
prop: 'opType',
label: '操作类型',

View File

@@ -2,135 +2,296 @@
* @Author: zwq
* @Date: 2024-07-01 14:54:06
* @LastEditors: zwq
* @LastEditTime: 2025-10-19 00:35:24
* @LastEditTime: 2025-11-24 16:11:20
* @Description:
-->
<template>
<el-row :gutter="10" style="background-color: #f2f4f9">
<!--部门数据-->
<el-col :span="4">
<div class="head-container">
<el-input
v-model="deptName"
placeholder="请输入部门名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px" />
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
default-expand-all
highlight-current
@node-click="handleNodeClick" />
</div>
</el-col>
<el-col :span="20">
<div class="groupTeamScheduling">
<div class="operationArea">
<el-row>
<el-col :span="16">
<div style="height: 40px; font-size: 16px">
<span style="color: #409eff; font-weight: 600">
{{ showDeptName }}
</span>
节假日设置
</div>
</el-col>
<el-col :span="8">
<div style="float: right">
<el-button
size="small"
type="primary"
style="margin-right: 10px"
@click="addHoliday">
新增节假日
</el-button>
<el-button size="small" @click="holidayLog">
节假日变更记录
</el-button>
</div>
</el-col>
</el-row>
</div>
<div class="operationArea">
<el-form :inline="true" class="demo-form-inline">
<span class="blue-block"></span>
<el-form-item label="月份选择">
<el-date-picker
v-model="startDay"
type="month"
placeholder="选择月"
size="small"
@change="selectMonth"
:clearable="false"
style="width: 120px"></el-date-picker>
</el-form-item>
<el-form-item style="float: right">
<div
class="app-container"
style="
background-color: #f2f4f9;
padding: 0;
display: grid;
grid-template-columns: 1fr 5fr;
gap: 10px;
">
<div class="head-container">
<el-input
v-model="deptName"
placeholder="请输入部门名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px" />
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick" />
</div>
<div class="groupTeamScheduling">
<div class="operationArea">
<el-row>
<el-col :span="6">
<div style="height: 40px; font-size: 16px">
<span style="color: #409eff; font-weight: 600">
{{ showDeptName }}
</span>
节假日设置
<span
:style="{
color: inherited ? '#67c23a' : '#b5b839',
fontSize: '12px',
fontWeight: 600,
}"
v-show="ishasParent">
{{ inherited ? '继承模式' : '自定义模式' }}
</span>
</div>
</el-col>
<el-col :span="18" v-if="!ishasParent">
<div style="float: right">
<el-button
size="small"
type="primary"
@click="startDay = new Date()">
跳转到今天
style="margin-right: 10px"
v-hasPermi="['base:group-holiday:create']"
@click="addHoliday">
新增节假日
</el-button>
</el-form-item>
</el-form>
<el-button
size="small"
v-hasPermi="['base:group-holiday-log:query']"
@click="holidayLog">
节假日变更记录
</el-button>
</div>
</el-col>
<el-col :span="18" v-else style="text-align: right">
<el-button
size="small"
type="primary"
:disabled="inherited"
v-hasPermi="['base:group-holiday:create']"
@click="addHoliday">
新增节假日
</el-button>
<el-button
size="small"
type="success"
:disabled="inherited"
v-hasPermi="['base:group-holiday:update']"
@click="reExtends">
恢复继承
</el-button>
<el-button
size="small"
type="warning"
:disabled="!inherited"
v-hasPermi="['base:group-holiday:update']"
@click="disExtends">
解除继承
</el-button>
<el-button
size="small"
:disabled="inherited"
v-hasPermi="['base:group-holiday-log:query']"
@click="holidayLog">
节假日变更记录
</el-button>
</el-col>
</el-row>
</div>
<div class="operationArea">
<el-form :inline="true" class="demo-form-inline">
<span class="blue-block"></span>
<el-form-item label="月份选择">
<el-date-picker
v-model="startDay"
type="month"
placeholder="选择月"
size="small"
@change="selectMonth"
:clearable="false"
style="width: 120px"></el-date-picker>
</el-form-item>
<el-form-item label="继承上一级的节假日" v-show="ishasParent">
<div
style="
width: 36px;
height: 36px;
background-color: #67c23a;
border-radius: 3px;
"></div>
</el-form-item>
<el-form-item label="本级自定义的节假日" v-show="ishasParent">
<div
style="
width: 36px;
height: 36px;
background-color: #b5b839;
border-radius: 3px;
"></div>
</el-form-item>
<el-form-item style="float: right">
<el-button
size="small"
type="primary"
@click="(startDay = new Date()), getHolidayPage()">
跳转到今天
</el-button>
</el-form-item>
</el-form>
<div v-if="!ishasParent">
<el-tag
type="warning"
closable
v-if="showTag1"
@close="handleClose(1)"
style="margin-bottom: 10px; color: black">
<i class="el-icon-warning" style="color: #ffbd02"></i>
当前节假日设置为组织架构中最高层级配置默认自动继承至下属部门子部门可选择
<span style="color: red">解除继承</span>
设置后进行独立修改复制后不再继承上级设置
设置后进行独立修改解除后不再继承上级设置
</el-tag>
</div>
<!-- 日历区域 -->
<div class="calenderArea">
<el-calendar v-model="startDay">
<template slot="dateCell" slot-scope="{ data }">
<div v-if="data.type === 'current-month'" @click="showDetail">
<!-- 日期 -->
<div class="dateStyle">
<el-row :gutter="20">
<el-col :span="18">
{{ Number(data.day.split('-')[2]) }}
<div class="lunar-date">{{ getLunarDate(data.day) }}</div>
</el-col>
<el-col :span="6"><div class="work-tip"></div></el-col>
</el-row>
</div>
</div>
<div v-else>
<div v-if="inherited">
<el-tag
type="warning"
closable
v-if="showTag2"
@close="handleClose(2)"
style="margin-bottom: 10px; color: black">
<i class="el-icon-warning" style="color: #ffbd02"></i>
当前部门继承上级节假日设置默认不可修改可通过
<span style="color: red">解除继承</span>
进行自定义解除后将不再继承
</el-tag>
</div>
<div v-else>
<el-tag
type="warning"
closable
v-if="showTag3"
@close="handleClose(3)"
style="margin-bottom: 10px; color: black">
<i class="el-icon-warning" style="color: #ffbd02"></i>
当前部门已解除继承节假日可自由配置点击
<span style="color: red">恢复继承</span>
将清空当前设置并同步上级节假日
</el-tag>
</div>
</div>
</div>
<!-- 日历区域 -->
<div class="calenderArea">
<el-calendar v-model="startDay">
<template slot="dateCell" slot-scope="{ data }">
<div v-if="data.type === 'current-month'">
<!-- 日期 -->
<div
v-else
style="font-size: 20px; font-weight: 500; text-align: left">
class="dateStyle"
@click="
new Date(data.day).getTime() >=
new Date().setHours(0, 0, 0, 0) &&
(!ishasParent || !inherited) &&
HolidayList[Number(data.day.split('-')[2]) - 1]
?.isHoliday &&
showDetail(HolidayList[Number(data.day.split('-')[2]) - 1])
">
<el-row :gutter="20">
<el-col :span="24">
<!-- 公历和农历 -->
<el-col :span="18">
{{ Number(data.day.split('-')[2]) }}
<span style="font-size: 12px">
{{ getLunarDate(data.day) }}
</span>
<div class="lunar-date">{{ getLunarDate(data.day) }}</div>
</el-col>
<!-- 显示假或班 -->
<el-col :span="6">
<div
class="work-tip"
:style="{
backgroundColor: HolidayList[
Number(data.day.split('-')[2]) - 1
]?.isHoliday
? '#67C23A'
: '#409EFF',
}">
{{
HolidayList[Number(data.day.split('-')[2]) - 1]
?.isHoliday
? '假'
: '班'
}}
</div>
</el-col>
<!-- 显示假期名和操作 -->
<el-col
:span="24"
v-if="
HolidayList[Number(data.day.split('-')[2]) - 1]?.isHoliday
">
<div
class="holiday-div"
:style="{
backgroundColor: ishasParent
? HolidayList[Number(data.day.split('-')[2]) - 1]
.isInherit
? '#67c23a'
: '#b5b839'
: '',
}">
{{
HolidayList[Number(data.day.split('-')[2]) - 1]
?.holidayName
}}
<span
class="holiday-div-btn"
v-if="
(!ishasParent || !inherited) &&
new Date(data.day).getTime() >=
new Date().setHours(0, 0, 0, 0)
">
<i class="el-icon-more" style="color: #fff"></i>
</span>
</div>
</el-col>
</el-row>
</div>
</template>
</el-calendar>
</div>
</div>
<div
v-else
style="font-size: 20px; font-weight: 500; text-align: left">
<el-row :gutter="20">
<el-col :span="24">
{{ Number(data.day.split('-')[2]) }}
<span style="font-size: 12px">
{{ getLunarDate(data.day) }}
</span>
</el-col>
</el-row>
</div>
</template>
</el-calendar>
</div>
</el-col>
</div>
<base-dialog
:dialogTitle="dialogTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="cancel"
@confirm="handleConfirm"
:before-close="cancel"
:destroy-on-close="true"
class="addDialog"
width="40%">
<add-or-updata
ref="addOrUpdataRef"
@refreshPage="getHolidayPage"></add-or-updata>
@refreshPage="successSubmit"></add-or-updata>
<template #footer>
<slot name="footer">
<el-row slot="footer" type="flex" justify="end">
@@ -155,6 +316,7 @@
size="small"
type="primary"
class="btnTextStyle"
v-hasPermi="['base:group-holiday:update']"
@click="editHoliday">
修改
</el-button>
@@ -162,6 +324,7 @@
v-if="detail"
class="btnTextStyle"
size="small"
v-hasPermi="['base:group-holiday:delete']"
@click="deleteHoliday">
删除
</el-button>
@@ -174,6 +337,7 @@
dialogTitle="节假日变更记录"
:dialogVisible="logVisible"
@cancel="cancelLog"
:before-close="cancelLog"
:destroy-on-close="true"
width="70%">
<holiday-log ref="holidayLogRef"></holiday-log>
@@ -189,16 +353,22 @@
</slot>
</template>
</base-dialog>
</el-row>
</div>
</template>
<script>
import moment from 'moment';
import { solarToLunar } from 'chinese-lunar';
import { listSimpleDepts } from '@/api/system/dept';
import { getUserProfile } from '@/api/system/user';
import { deptHolidayList } from '@/api/group/holidaySetting';
import {
deptHolidayList,
getEnableData,
disExtends,
reExtends,
updateSchedule,
getSet,
} from '@/api/group/holidaySetting';
import addOrUpdata from './add-or-updata.vue';
import holidayLog from './holidayLog';
@@ -212,13 +382,17 @@ export default {
data() {
return {
startDay: '', // 查询参数
HolidayList: [],
// 部门树选项
deptOptions: undefined,
// 查询的部门名称
deptName: undefined,
// 选择的部门名称
showDeptName: undefined,
topDeptId: undefined, // 保存当前用户的部门id为最高级部门id
parentId: undefined, // 保存部门点击时对象的父id用于解除和恢复继承
deptId: undefined,
ishasParent: false, // 判断是否有上级,false,则表示为最高级
defaultProps: {
children: 'children',
label: 'name',
@@ -227,6 +401,10 @@ export default {
addOrUpdateVisible: false,
detail: false,
logVisible: false,
inherited: true, //该部门是否为继承状态
showTag1: true, //tag标签是否显示的
showTag2: true,
showTag3: true,
};
},
watch: {
@@ -240,28 +418,86 @@ export default {
// 查询用户个人信息
getUserProfile().then((response) => {
this.showDeptName = response.data.dept.name || '';
this.topDeptId = response.data.dept.id || ''; // 保存当前用户的部门id为最高级部门id
this.deptId = response.data.dept.id || '';
this.getHolidayPage();
this.getTreeselect();
this.getSet();
});
this.getTreeselect();
},
methods: {
getHolidayPage() {
deptHolidayList({ deptId: this.deptId }).then((response) => {});
const now = new Date(this.startDay);
const year = now.getFullYear();
const month = now.getMonth();
const startTime = `${year}-${String(month + 1).padStart(2, '0')}-01`;
const lastDate = new Date(year, month + 1, 0).getDate();
const endTime = `${year}-${String(month + 1).padStart(2, '0')}-${String(
lastDate
).padStart(2, '0')}`;
this.HolidayList = [];
deptHolidayList({
deptId: this.deptId,
startTime: Date.parse(startTime),
endTime: Date.parse(endTime),
}).then((res) => {
this.HolidayList = res.data;
});
},
// 切换月份
selectMonth() {
console.log(this.startDay);
this.getHolidayPage();
},
/** 查询部门下拉树结构 */
getTreeselect() {
listSimpleDepts().then((response) => {
getEnableData().then((response) => {
// 遍历部门,判断当前帐号的部门是否有为最上级
const nowDept = response.data.filter((i) => i.id == this.topDeptId);
this.ishasParent = nowDept[0].hasParent;
this.parentId = nowDept[0].parentId;
// 处理 deptOptions 参数
this.deptOptions = [];
this.deptOptions.push(...this.handleTree(response.data, 'id'));
this.deptOptions.push(...this.handleTree1(response.data, 'id'));
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.deptId);
});
});
},
//大整数精度丢失
handleTree1(data, fid) {
const id = fid || 'id';
const parentId = 'parentId';
const children = 'children';
const rootId =
data
.map((item) => item[parentId].toString())
.reduce((min, current) => {
if (current.length < min.length) return current;
if (current.length > min.length) return min;
return current < min ? current : min;
}) || 0;
//对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data));
//循环所有项
const treeData = cloneData.filter((father) => {
let branchArr = cloneData.filter((child) => {
//返回每一项的子级数组
return father[id] == child[parentId];
});
branchArr.length > 0 ? (father.children = branchArr) : '';
//返回第一层
return father[parentId] == rootId;
});
return treeData !== '' ? treeData : data;
},
// 根据部门id查询该部门是否是继承
getSet() {
getSet({ id: this.deptId }).then((res) => {
this.inherited = res.data;
});
this.getHolidayPage();
},
// 筛选节点
filterNode(value, data) {
if (!value) return true;
@@ -271,6 +507,11 @@ export default {
handleNodeClick(data) {
this.deptId = data.id;
this.showDeptName = data.name;
this.ishasParent = data.hasParent;
this.parentId = data.parentId;
this.getSet();
this.showTag1 = true;
this.showTag2 = true;
this.getHolidayPage();
},
//获取农历
@@ -342,9 +583,109 @@ export default {
this.detail = false;
this.dialogTitle = '新增节假日';
this.$nextTick(() => {
this.$refs.addOrUpdataRef.init();
this.$refs.addOrUpdataRef.init(this.deptId, {
inherited: this.inherited,
});
});
},
disExtends() {
this.$confirm(
'当前节假日设置继承自上级部门,解除继承后将不再自动同步上级设置。<br/>系统将保留当前节假日配置作为初始数据,您可以自定义修改。<br/>是否确认解除继承?',
'解除继承',
{
dangerouslyUseHTMLString: true,
confirmButtonText: '确认解除',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
disExtends({ id: this.deptId, pid: this.parentId }).then((res) => {
if (!res.data.updateFlag) {
this.$modal.msgSuccess('操作成功');
this.getSet();
} else {
this.$confirm(
'新增节假日影响已有排班计划,是否立即更新?',
'更新排班',
{
confirmButtonText: '立即更新',
cancelButtonText: '暂不更新',
type: 'warning',
}
)
.then(() => {
updateSchedule({ logId: res.data.logId }).then((res1) => {
this.$modal.msgSuccess('更新成功');
this.getSet();
});
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
});
});
}
});
})
.catch((res) => {
console.log(res);
this.$message({
type: 'info',
message: '已取消',
});
});
},
reExtends() {
this.$confirm(
'恢复继承后,当前部门将重新同步未来时间的上级部门的节假日设置,现有自定义配置将被清空并替换为上级设置,不可恢复。<br/>是否确认继续?',
'恢复继承',
{
dangerouslyUseHTMLString: true,
confirmButtonText: '确认恢复继承',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
reExtends({ id: this.deptId, pid: this.parentId }).then((res) => {
if (!res.data.updateFlag) {
this.$modal.msgSuccess('操作成功');
this.getSet();
} else {
this.$confirm(
'新增节假日影响已有排班计划,是否立即更新?',
'更新排班',
{
confirmButtonText: '立即更新',
cancelButtonText: '暂不更新',
type: 'warning',
}
)
.then(() => {
updateSchedule({ logId: res.data.logId }).then((res1) => {
this.$modal.msgSuccess('更新成功');
this.getSet();
});
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
});
this.getSet();
});
}
});
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
});
});
},
holidayLog() {
this.logVisible = true;
this.$nextTick(() => {
@@ -352,17 +693,22 @@ export default {
});
},
cancel() {
this.getHolidayPage();
this.addOrUpdateVisible = false;
},
successSubmit() {
this.cancel();
this.getHolidayPage();
},
handleConfirm() {
this.$refs.addOrUpdataRef.dataFormSubmit();
},
showDetail(id) {
showDetail(val) {
this.addOrUpdateVisible = true;
this.detail = true;
this.dialogTitle = '节假日详情';
this.$nextTick(() => {
this.$refs.addOrUpdataRef.init(id, true);
this.$refs.addOrUpdataRef.init(this.deptId, val, true, this.inherited); //编辑的时候该部门如果是自定义的但这个val数据是继承的修改之后则变成自定义的inherited
});
},
editHoliday() {
@@ -379,6 +725,15 @@ export default {
cancelLog() {
this.logVisible = false;
},
handleClose(val) {
if (val == 1) {
this.showTag1 = false;
} else if (val == 2) {
this.showTag2 = false;
} else {
this.showTag3 = false;
}
},
},
};
</script>
@@ -386,7 +741,7 @@ export default {
.head-container {
padding: 20px 10px 0;
background-color: #fff;
min-height: calc(100vh - 120px - 8px);
height: 100%;
border-radius: 8px;
}
.groupTeamScheduling {
@@ -465,9 +820,28 @@ export default {
text-align: center;
float: right;
}
.holiday-div {
background-color: #67c23a;
border-radius: 3px;
height: 25px;
text-align: center;
line-height: 24px;
color: #fff;
.holiday-div-btn {
float: right;
transform: rotate(90deg);
font-size: 14px;
pointer-events: none;
}
}
}
}
}
}
}
.addDialog {
.el-dialog__body {
overflow: visible;
}
}
</style>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,319 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Sat Apr 15 15:55:39 2017
By admin
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
panose-1="2 0 6 3 0 0 0 0 0 0"
ascent="896"
descent="-128"
x-height="792"
bbox="0 -224 1273 896.22"
underline-thickness="0"
underline-position="0"
unicode-range="U+0078-E810"
/>
<missing-glyph
/>
<glyph glyph-name=".notdef"
/>
<glyph glyph-name=".notdef"
/>
<glyph glyph-name=".null" horiz-adv-x="0"
/>
<glyph glyph-name="nonmarkingreturn" horiz-adv-x="341"
/>
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
<glyph glyph-name="sousuo" unicode="&#xe602;" horiz-adv-x="1000"
d="M808 54l-73 75q48 76 48 167q0 130 -90.5 222t-218 92t-218 -92t-90.5 -222t90.5 -222t217.5 -92q67 0 128 28l22 -23v0l60 -60q25 -26 62 -26t62.5 26t25.5 63.5t-26 63.5zM262 296.5q0 89.5 62 153t150 63.5t150.5 -63.5t62.5 -153t-62.5 -153t-150.5 -63.5t-150 63.5
t-62 153z" />
<glyph glyph-name="tingzhi" unicode="&#xe61d;"
d="M511 809q106 0 199 -41q93 -40 161.5 -108.5t109 -161t40.5 -198t-40.5 -198.5t-109 -161.5t-161.5 -109t-198.5 -40.5t-197.5 41q-93 40 -161.5 108.5t-109 161.5t-40.5 198.5t40.5 198t109 161t161 109t197.5 40.5v0zM764 231q34 0 61.5 18t27.5 53q0 34 -27.5 50.5
t-61.5 16.5h-501q-34 0 -62.5 -16.5t-28.5 -50.5q0 -35 28.5 -53t62.5 -18h501v0zM764 231z" />
<glyph glyph-name="bianji" unicode="&#xe69e;"
d="M502 330zM380 -16v0l-191 -35l38 188v0zM681 591l-69 -69l153 -153l69 69zM262 171l153 -153l316 317l-153 153z" />
<glyph glyph-name="icon01" unicode="&#xe600;"
d="M858 43l-179 177q18 38 18 80q0 77 -54.5 131.5t-132.5 54.5q-25 0 -49 -6l79 -80q25 -25 23.5 -61.5t-28.5 -63t-63.5 -28t-61.5 22.5l-79 80q-7 -24 -7 -50q0 -77 54.5 -132t131.5 -55q43 0 80 19l179 -178q17 -17 42 -16t43 20q19 18 20 43t-16 42v0zM810 -29
q-13 0 -22.5 9t-9.5 22t9.5 22t22.5 9t22 -9t9 -22t-9 -22t-22 -9v0zM901 383h-18h-42h-1q-12 1 -23 9h-1q-26 17 -25 47q0 8 3 17q3 10 9 17l9 10l21 21l13 12q13 18 13 40.5t-14 40.5l-36 37q-18 14 -41 14.5t-40 -13.5l-14 -13l-29 -30v0v0q-26 -21 -57 -7q-10 4 -18 12
q-13 14 -15 32v14v29v19q-3 22 -19 37.5t-39 18.5h-52q-22 -2 -38 -18t-20 -38v-18v-30v-13v0v0v-2v-2v-1q-1 -1 -1 -4l-1 -1l-0.5 -2l-0.5 -2v0q-1 -1 -3 -5v0q-4 -10 -13 -17q-15 -13 -36 -13q-20 0 -35 12l-9 10l-21 20l-13 13q-17 14 -40 13.5t-40 -14.5l-37 -36
q-14 -18 -14.5 -40.5t12.5 -40.5l13 -13l30 -30v0q1 0 1.5 -1l0.5 -1l0.5 -1t1 -1.5t0.5 -1t1 -1.5l0.5 -0.5t0.5 -1.5l0.5 -1t1.5 -2v-1t0.5 -2t1.5 -2v-1t0.5 -2.5t0.5 -2.5v0q1 -3 1 -5v0q4 -27 -16 -46v0q-14 -14 -33 -16h-13h-30h-18q-22 -3 -38 -19t-18 -38v-53
q2 -22 17.5 -38t38.5 -19h18l42 -1q5 0 5 -1h2q2 -1 3 -1q18 -5 29 -20t11 -33v0q0 -20 -12 -35l-10 -9v0l-21 -21l-13 -13q-13 -18 -13 -40.5t14 -39.5l37 -37q18 -15 40.5 -15t40.5 14l12 12l31 30v0v1q1 0 2 1t2 1q1 1 2 1l2 2l1.5 0.5l1.5 0.5l2 1q1 0 2 1q2 0 2 1v0v0
l5 1v0q1 0 2.5 0.5t2.5 0.5v0h4q26 1 43 -16q13 -13 16 -33v-13v-30v-18q2 -22 18.5 -38t38.5 -18h52q23 2 39 17.5t19 37.5v18v31v12v0q2 15 11 28l2 2l0.5 1t1.5 1q5 5 11 9v0q1 1 3 2q1 1 2 1v0h1l1.5 0.5l1.5 0.5l-50 50q-32 -9 -68 -9q-102 0 -173.5 71.5t-70.5 172.5
q0 102 71.5 173.5t173 71.5t173 -72t71.5 -173q0 -35 -10 -67l50 -49q4 7 12 16q7 7 18 11q8 4 14 4h14h30h17q23 3 38.5 19t18.5 39v52q-2 23 -18 39t-38 19v0zM901 383z" />
<glyph glyph-name="shijian" unicode="&#xe620;"
d="M511.5 684q-104.5 0 -192.5 -51t-139.5 -139.5t-51.5 -193t51.5 -193t139.5 -139.5t192.5 -51t193 51t139.5 139.5t51 193t-51 193t-139.5 139.5t-193 51zM511.5 -48q-94.5 0 -175 46.5t-127 127t-46.5 175t46.5 175t127 127t175 46.5t175 -46.5t127.5 -127t47 -175
t-47 -175t-127.5 -127t-175 -46.5zM704 301h-175v226q0 8 -5 13t-12.5 5t-12.5 -5t-5 -13v-244q0 -7 5 -12t13 -5h192q7 0 12 5t5 12t-5 12.5t-12 5.5z" />
<glyph glyph-name="weixin" unicode="&#xe60f;"
d="M669 495q14 0 30 -2q-20 95 -110.5 157.5t-206.5 62.5q-130 0 -222 -77.5t-92 -189.5q0 -124 126 -212l-31 -94l109 55q80 -16 110 -16q14 0 30 1q-10 33 -10 66q0 103 77.5 176t189.5 73zM500 580q18 0 28.5 -11t10.5 -28.5t-10.5 -28.5t-28.5 -11t-32.5 11.5
t-14.5 28.5t14.5 28t32.5 11zM280 501q-18 0 -32.5 11.5t-14.5 28.5t14.5 28t32.5 11t29 -11t11 -28.5t-11 -28.5t-29 -11zM956 250q0 93 -80 160.5t-187 67.5q-112 0 -189.5 -67t-77.5 -161.5t77.5 -161t189.5 -66.5q31 0 94 16l86 -47l-23 78q110 83 110 181zM602 289
q-11 0 -21 10t-10 21.5t10 21.5t21 10q17 0 28.5 -9.5t11.5 -22t-11.5 -22t-28.5 -9.5zM775 289q-12 0 -21.5 10t-9.5 21.5t9.5 21.5t21.5 10q17 0 28 -9.5t11 -22t-11 -22t-28 -9.5z" />
<glyph glyph-name="fenxiang1" unicode="&#xe655;"
d="M770 222q-38 0 -71.5 -16.5t-55.5 -46.5l-249 125q7 21 7 43q0 25 -8 48l248 124q22 -31 56 -48.5t73 -17.5q65 0 111.5 46.5t46.5 112t-46.5 111.5t-112 46t-112 -46t-46.5 -112q0 -9 1 -18l-261 -131q-46 44 -109 44q-65 0 -111.5 -46.5t-46.5 -112t46.5 -112
t112 -46.5t111.5 47l259 -130q-2 -11 -2 -22q0 -65 46.5 -111.5t112 -46.5t112 46.5t46.5 112t-46.5 111.5t-111.5 46v0z" />
<glyph glyph-name="qq" unicode="&#xe649;"
d="M856 184q-6 81 -83 167q3 7 4.5 21.5t-5 37.5t-22.5 40v2q0 107 -67 177t-164 71q-97 -1 -163.5 -71t-66.5 -177v-2q-17 -17 -23 -40t-5 -37.5t4 -21.5q-77 -86 -83 -167q-2 -41 12 -59q7 -7 17 -4.5t23.5 17.5t24.5 38q13 -46 54 -100q-26 -6 -42 -24t-17 -36.5t7 -35.5
q23 -38 93 -38q106 0 150 42q5 5 15 5t16 -5q43 -42 149 -42q70 0 94 38q7 17 6.5 35.5t-16.5 36.5t-42 24q40 54 53 100q11 -23 24.5 -38t24 -17.5t16.5 4.5q14 18 12 59z" />
<glyph glyph-name="xinzeng" unicode="&#xe642;"
d="M739 330h-188v207q0 22 -34 24q-16 1 -24.5 -6t-8.5 -18v-207h-199q-1 0 -4.5 0.5t-9 -1t-11 -4t-9.5 -8.5t-4 -14q0 -15 2.5 -24t7.5 -12.5t9 -4t11 -0.5h207l-1 -217v-6t0.5 -6t0.5 -5.5t1 -6t2.5 -5t4 -5t5.5 -3t7.5 -2t10.5 -0.5q35 0 35 42l1 214h189q42 0 42 36
q0 16 -10.5 24.5t-21.5 7.5h-11zM518.5 770q-97.5 0 -186.5 -38t-153 -102.5t-102 -153t-38 -186.5t38 -186.5t102 -153t153 -102.5t186.5 -38t186.5 38t153.5 102t102.5 153t38 187t-38 186.5t-102.5 153t-153.5 102.5t-186.5 38zM519 -126q-113 0 -209 55.5t-151.5 151.5
t-55.5 209t55.5 209t151.5 151.5t209 55.5t208.5 -55.5t151.5 -151.5t56 -209t-56 -209t-151.5 -151.5t-208.5 -55.5z" />
<glyph glyph-name="tishi" unicode="&#xe64d;"
d="M512.5 193q-10.5 0 -18 7.5t-7.5 17.5v328q0 10 7.5 17.5t18 7.5t18 -7.5t7.5 -17.5v-328q0 -10 -7.5 -17.5t-18 -7.5zM512.5 27q-10.5 0 -18 7.5t-7.5 17.5v2q0 11 7.5 18.5t18 7.5t18 -7.5t7.5 -18.5v-2q0 -10 -7.5 -17.5t-18 -7.5zM512.5 -135q-88.5 0 -168.5 34
q-78 33 -138.5 93.5t-93.5 138.5q-34 81 -34 169t34 169q33 78 93.5 138.5t138.5 93.5q80 34 168.5 34t169.5 -34q78 -33 138.5 -93.5t93.5 -138.5q34 -81 34 -169t-34 -169q-33 -78 -93.5 -138.5t-138.5 -93.5q-81 -34 -169.5 -34zM513 684q-77 0 -147 -29t-124.5 -83.5
t-83.5 -124.5t-29 -147t29 -147t83.5 -124.5t124.5 -83.5t147 -29t147 29t124.5 83.5t83.5 124.5t29 147t-29 147t-83.5 124.5t-124.5 83.5t-147 29z" />
<glyph glyph-name="shijian1" unicode="&#xe6fb;"
d="M513 -202q-102 0 -195 39.5t-160 106.5t-107 160t-40 195.5t40 195.5t107 160t160 107t195 40t195 -40t160 -107t107 -160t40 -195.5t-40 -195.5t-107 -160t-160 -106.5t-195 -39.5zM513 745q-91 0 -173 -35.5t-142 -95t-95 -142t-35 -173t35 -173t95 -142t142 -95
t173 -35.5t173 35.5t142 95t95 142t35 173t-35 173t-95 142t-142 95t-173 35.5zM770 174q-5 -11 -16.5 -15.5t-22.5 0.5l-236 79q-18 9 -17 29l-0.5 1t-0.5 2v326q0 12 9 21t21 9t20.5 -9t8.5 -21v-310l220 -73q11 -5 15 -16.5t-1 -22.5z" />
<glyph glyph-name="iconfontweibowukuang" unicode="&#xe661;"
d="M727 341q-16 3 -20.5 9.5t-0.5 11.5l3 4q1 3 3 7t6 15.5t4.5 22.5t-4.5 25.5t-16 25.5q-14 14 -37 18.5t-46 1t-44 -9t-33 -11.5l-13 -5q-10 -3 -17 -4.5t-10.5 0t-5.5 3.5t-2 7.5t1 9t3 12.5t3 14q0 15 -2.5 27.5t-11 27t-23 22t-41 7t-62.5 -12.5q-35 -12 -71.5 -36
t-64 -49.5t-50 -49.5t-34.5 -40l-12 -15q-33 -44 -48.5 -87.5t-16.5 -65t0 -21.5q6 -48 30 -86.5t57 -62t78.5 -40t86.5 -24.5t88 -11q76 -6 157 11.5t151 61t99 103.5q17 36 17.5 67t-10.5 51t-29.5 35t-34 22t-27.5 9v0zM415 28q-110 -5 -188 42.5t-78 119.5t77.5 124
t188.5 57q112 5 188.5 -37t76.5 -113q0 -73 -78 -130.5t-187 -62.5v0zM385 307q-30 -3 -53.5 -13.5t-37 -23.5t-22.5 -30t-12.5 -30.5t-4.5 -28t-0.5 -19.5t0.5 -8v0v-5t2 -11.5t5.5 -16.5t12 -17t19.5 -15q67 -32 126 -19.5t94 58.5q14 17 18.5 42t-2 50.5t-22.5 47
t-48.5 33t-74.5 6.5v0zM348 116q-20 -2 -35 8t-15 27q0 18 14 32.5t34 16.5q23 2 37.5 -9t14.5 -29q0 -16 -14.5 -30t-35.5 -16v0zM435 189q-7 -5 -14.5 -4.5t-11.5 6.5t-2 14.5t9 13.5q8 6 15.5 5t11.5 -7q3 -7 1 -15t-9 -13v0zM798 400q9 0 16 6t8 14v3q4 32 -1 57
t-16.5 39t-26.5 23t-30.5 11.5t-28.5 3t-21 -0.5l-8 -1q-10 0 -17 -7t-7 -17t7 -17t17 -7q32 6 50.5 0.5t26 -19.5t9 -28t0.5 -25l-2 -11q0 -10 7 -17t17 -7v0zM781 679q-51 12 -121 -1l-1.5 -1l-1.5 -1h-1q-11 -3 -18.5 -12.5t-7.5 -21.5q0 -14 10.5 -24.5t25.5 -10.5
q18 3 31 8q6 0 18.5 1.5t33.5 -3.5t42 -13t43 -26.5t37 -43.5q28 -60 11 -115q-7 -17 -7 -34q0 -14 10 -22.5t25 -8.5t23 5.5t11 23.5v0q19 57 14.5 102.5t-20 79t-43.5 58t-56 39t-58 21.5v0zM781 679z" />
<glyph glyph-name="delete" unicode="&#xe616;"
d="M768 -128h-96v672h-96v-672h-128v672h-96v-672h-96v672h512v-672zM416 704h192v-64h-192v64zM880 640h-176v96q0 26 -19 45t-45 19h-256q-26 0 -45 -19t-19 -45v-96h-176q-20 0 -34 -14t-14 -34t14 -34t34 -14h16v-704q0 -26 19 -45t45 -19h576q26 0 45 19t19 45v704h16
q20 0 34 14t14 34t-14 34t-34 14z" />
<glyph glyph-name="dizhi" unicode="&#xe685;"
d="M512 -212q-16 17 -41.5 47.5t-92 115.5t-117 161.5t-92 166.5t-41.5 149q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5q0 -59 -41.5 -149t-92 -166.5t-116.5 -161.5t-92.5 -115.5t-41.5 -47.5v0zM512 684q-106 0 -181 -75t-75 -181t75 -181t181 -75t181 75
t75 181t-75 181t-181 75z" />
<glyph glyph-name="guanbi" unicode="&#xe637;"
d="M481.5 748q-97.5 0 -186 -37.5t-152.5 -101.5t-102 -153t-38 -186t38 -185.5t102 -152.5t152.5 -102t186 -38t186 38t152.5 102t102 152.5t38 185.5t-38 186t-102 153t-152.5 101.5t-186 37.5zM683 69v0q-10 -10 -24 -10t-24 10l-153 153l-154 -154v0q-10 -10 -24 -10
t-24 10t-10 24t10 24l153 154l-153 154q-10 10 -10 24t10 24v0q10 10 24 10t24 -10l153 -154l154 154v0q10 10 24 10t24 -10t10 -24t-10 -24l-153 -154l153 -153q10 -10 10 -24t-10 -24z" />
<glyph glyph-name="shoucang1" unicode="&#xe604;"
d="M512 727q-16 0 -26 -22l-95 -191q-11 -23 -36 -41t-50 -22l-211 -30q-25 -4 -29.5 -18.5t12.5 -32.5l154 -149q17 -17 26.5 -46.5t5.5 -53.5l-36 -211q-3 -18 3 -27.5t18 -9.5q10 0 22 6l189 99q22 12 53 12t53 -12l189 -99q12 -6 22 -6q12 0 18 9.5t3 27.5l-36 211
q-4 24 5.5 53.5t26.5 46.5l154 149q17 18 12.5 32.5t-29.5 18.5l-211 30q-25 4 -50 22t-36 41l-95 191q-10 22 -26 22v0z" />
<glyph glyph-name="phone" unicode="&#xe622;"
d="M295 688q34 0 60 -28q15 -16 39 -44q24 -26 22 -58.5t-28 -56.5l-13 -11q-30 -27 -45 -39q-42 -34 -33 -89t46 -112q67 -102 160 -157q20 -12 61 -26q14 -5 29 -5q33 0 60 25q17 17 53 48l5 4q27 23 57 23q35 0 62 -29q23 -25 39 -43q23 -27 21.5 -58t-27.5 -55l-6 -6
q-41 -47 -103 -76q-19 -7 -41 -7q-27 0 -63 10q-123 35 -247 146q-160 143 -234 314q-41 97 -34 171q5 51 41 81q13 11 38 34q17 15 25 22q26 22 56 22zM295 735q-48 0 -87 -34q-7 -6 -28.5 -25t-33.5 -29q-52 -43 -58 -113q-9 -87 38 -194q77 -181 245 -331
q133 -119 266 -156q43 -12 76 -12q32 0 59 10q19 9 37 20t30.5 20t23.5 18.5t17 16t10.5 11.5t4.5 6q40 37 42.5 87t-32.5 91q-17 19 -40 44q-42 45 -97 45q-48 0 -88 -35q-43 -37 -60 -54q-13 -12 -27 -12q-7 0 -14 3q-36 12 -52 22q-83 49 -144 142q-32 49 -39 94
q-5 28 15 43q14 11 60 53q41 37 44 89t-33 93q-25 28 -41 45q-40 42 -94 42v0z" />
<glyph glyph-name="bianji1" unicode="&#xe64a;"
d="M784 525l-126 126l63 63q15 15 37.5 15t37.5 -15l51 -51q15 -15 15 -37.5t-15 -37.5zM418 159l-126 126l342 340l126 -126zM191 56l77 205l124 -125zM756 13q14 0 23 -9.5t9 -22.5t-9 -22.5t-23 -9.5h-564q-13 0 -22 9.5t-9 22.5t9 22.5t22 9.5h564z" />
<glyph glyph-name="guanbi1" unicode="&#xe609;"
d="M512 739q-117 0 -216.5 -58t-157.5 -157.5t-58 -216.5t58 -216.5t157.5 -157.5t216.5 -58t216.5 58t157.5 157.5t58 216.5t-58 216.5t-157.5 157.5t-216.5 58zM721 150l-53 -52l-156 157l-156 -157l-53 52l157 157l-157 156l52 53l157 -157l156 157l53 -53l-157 -156z
" />
<glyph glyph-name="cuowu" unicode="&#xe617;"
d="M564 276l289 288q10 10 10 24.5t-10 25t-24.5 10.5t-24.5 -11l-290 -287l-286 287q-11 11 -25 11t-24.5 -10.5t-10.5 -25t10 -24.5l287 -287l-289 -288q-10 -10 -10 -24.5t10 -25t24.5 -10.5t24.5 11l289 287l289 -290q11 -10 25.5 -10t24.5 10t10 24.5t-10 24.5
l-289 290v0zM564 276z" />
<glyph glyph-name="tupian" unicode="&#xe6a0;"
d="M975 714h-926q-21 0 -35 -14t-14 -34v-732q0 -20 14 -34t35 -14h926q21 0 35 14t14 34v732q0 20 -14 34t-35 14zM926 147l-180 180q-16 17 -39.5 17t-39.5 -17l-211 -211l-91 91q-14 15 -35.5 15t-37.5 -15l-192 -192q-3 8 -3 17v536q0 21 14.5 35t34.5 14h731
q21 0 35 -14t14 -35v-421zM316.5 519q-40.5 0 -68.5 -28.5t-28 -68.5t28 -68.5t68.5 -28.5t69 28.5t28.5 68.5t-28.5 68.5t-69 28.5z" />
<glyph glyph-name="yonghuming" unicode="&#xe618;"
d="M705 -212q-5 0 -10 3q-22 14 -52.5 20.5t-51.5 7.5h-24h-38v0h-477q-8 0 -14 5.5t-6 14.5v24q-2 41 23 84q22 38 62 65q49 32 123 45h1q28 2 76 15q66 18 72 33q1 3 2 5q2 11 -1 43q-3 34 -17 66t-25.5 47.5t-33.5 39.5q-19 22 -26 32q-30 45 -34 97v1q0 21 19 38l1 1v0
q0 2 -1 8v3q-6 31 -6.5 74t4.5 74q2 24 15.5 49.5t22 34.5t14.5 14v0q13 11 18 19l1 2q0 1 -0.5 2l-0.5 1q-7 15 -4 27q3 19 25 25q8 2 23 2l1 1q47 2 75 0q53 -4 98 -14.5t71.5 -21.5t48 -24t27.5 -18.5t9 -9.5h1q22 -27 33 -67q3 -12 4 -21q7 -43 4 -104q-1 -22 -5 -48
q-1 -5 0 -7l3 -3q10 -10 13 -20q2 -7 2 -17v-1q-3 -52 -34 -97q-7 -10 -26 -32q-21 -24 -33 -39.5t-26 -47.5t-17 -66q-2 -32 0 -43q1 -2 1 -5q1 -1 4 -4.5t21 -12t48 -16.5q48 -13 76 -15v0h1q74 -14 123 -46q41 -27 63 -65q24 -42 21 -83v-24q0 -9 -5.5 -14.5t-14.5 -5.5
h-189q-8 0 -14 5.5t-6 14t6 14.5t14 6h169v4v2q3 30 -17 63q-18 29 -50 50q-42 27 -107 39q-42 6 -81 16q-87 23 -99 59q-8 14 -4 64q4 41 20 78t29.5 54.5t36.5 44.5q18 20 24 28q23 34 26 76v4l-4 4l-5 5q-12 16 -9 38q4 25 5 45q3 57 -4 95v1q-1 7 -3 17q-8 30 -25 51
q-15 15 -49 32q-71 34 -178 42q-25 2 -70 -1h-1h-8q6 -15 2 -27q-2 -6 -6 -13q-8 -13 -26 -28q-4 -4 -10.5 -11t-16.5 -25.5t-11 -34.5v-3q-5 -27 -4.5 -67t5.5 -68v-3q6 -29 -11 -45h-1q-5 -5 -5 -6v0q-1 -1 -1 -2q4 -42 27 -76q6 -8 23 -28q23 -27 36.5 -44.5t29.5 -54.5
t20 -78q4 -49 -3 -64q-12 -36 -100 -59q-41 -11 -80 -16q-65 -11 -106 -38q-33 -21 -51 -50q-20 -34 -18 -64v-2v-4h457h38v0h24v0q10 0 24.5 -1.5t47 -10t53.5 -22.5q7 -5 9 -13t-3 -15q-6 -9 -17 -9v0zM629 116q0 -1 1 -1q-1 0 -1 1v0zM396 116l-1 -1l1 1v0z" />
<glyph glyph-name="mima" unicode="&#xe61e;"
d="M511 285q-22 0 -38 -15.5t-16 -37.5q0 -24 18 -40v-49q0 -15 10.5 -25.5t25.5 -10.5t25 10.5t10 25.5v49q18 16 18 40q0 22 -15.5 37.5t-37.5 15.5v0zM760 445h-35v89q0 89 -63 151.5t-151.5 62.5t-151 -62.5t-62.5 -151.5v-89h-35q-37 0 -63 -26t-26 -63v-338
q0 -37 26 -63t63 -26h498q37 0 63 26t26 63v338q0 37 -26 63t-63 26v0zM511 712q74 0 126 -52t52 -126v-89h-356v89v0q0 74 52 126t126 52v0zM814 18q0 -22 -16 -37.5t-38 -15.5h-498q-22 0 -38 15.5t-16 37.5v338q0 23 16 38.5t38 15.5h498q22 0 38 -15.5t16 -38.5v-338v0z
M814 18z" />
<glyph glyph-name="shoucang" unicode="&#xe60b;"
d="M752 -127q-16 0 -30 7l-208 103l-209 -103q-15 -8 -34 -6.5t-34 11.5q-15 11 -22 28.5t-4 35.5l43 225l-164 153q-30 29 -17 68q6 18 20 30t32 15l229 42l102 208q18 37 58 37q19 0 35 -10t24 -27l102 -208l229 -41q18 -3 32 -15t20 -30q6 -17 1.5 -35.5t-17.5 -31.5
l-166 -155l42 -224q3 -19 -4 -36.5t-22 -28.5q-17 -12 -38 -12v0zM514 35l228 -114q12 -6 21.5 1.5t7.5 19.5l-46 248l183 173q8 8 5 19q-4 12 -16 14l-252 44l-113 230q-5 10 -17.5 10t-17.5 -10l-113 -229l-251 -47q-13 -2 -17 -13q-4 -12 5 -20l183 -171l-48 -249
q-2 -11 8 -18q10 -8 20 -2l230 114v0zM514 35z" />
<glyph glyph-name="zhengque" unicode="&#xe60e;"
d="M512 -125q-116 0 -213.5 57t-154.5 154.5t-57 213.5t57 213.5t154.5 154.5t213.5 57t213.5 -57t154.5 -154.5t57 -213.5t-57 -213.5t-154.5 -154.5t-213.5 -57zM512 672q-101 0 -186.5 -50t-135.5 -135.5t-50 -186.5t50 -186.5t135.5 -135.5t186.5 -50t186.5 50
t135.5 135.5t50 186.5t-50 186.5t-135.5 135.5t-186.5 50zM682 448q5 9 2.5 20t-12 16.5t-20.5 2.5t-16 -13l-170 -294l-95 88q-8 8 -19 8.5t-19 -7t-8 -18.5t7 -20l122 -112q7 -8 18 -8t19 7q2 2 49.5 84t94.5 164z" />
<glyph glyph-name="tuichu" unicode="&#xe7c8;" horiz-adv-x="1274"
d="M851 -212h-716q-57 0 -94 38q-41 40 -41 90v768q0 50 41 91q37 37 94 37h716q50 0 88 -37q34 -35 34 -91v-77q0 -10 -7.5 -17.5t-18 -7.5t-18 7.5t-7.5 17.5v77q0 35 -20 54q-22 23 -51 23h-716q-35 0 -58 -23q-26 -25 -26 -54v-768q0 -29 26 -54q23 -23 58 -23h716
q29 0 51 23q20 19 20 54v77q0 10 7.5 17.5t18 7.5t18 -7.5t7.5 -17.5v-77q0 -56 -34 -91q-38 -37 -88 -37v0zM1203 274h-640q-10 0 -17.5 7.5t-7.5 18.5t7.5 18.5t17.5 7.5h640q11 0 18.5 -7.5t7.5 -18.5t-7.5 -18.5t-18.5 -7.5v0zM1031 57q-11 0 -18.5 7.5t-7.5 18t8 18.5
l199 199l-199 199q-8 8 -8 18.5t7.5 18t18 7.5t18.5 -8l217 -217q7 -7 7 -18t-7 -18l-217 -217q-8 -8 -18 -8v0zM1031 57z" />
<glyph glyph-name="wodedingdan30" unicode="&#xe638;"
d="M179 148l204 -213l500 522l-203 212l-501 -521v0zM16 -196l321 78l-207 215l-114 -293v0zM939 725q-26 26 -44 41t-40 25t-43.5 3.5t-42.5 -28.5l-39 -45l207 -216l43 42q21 22 26.5 44t-4 45.5t-24 43t-39.5 45.5v0z" />
<glyph glyph-name="chenggong" unicode="&#xe62a;"
d="M511 -147q-91 0 -174 35.5t-143 95t-95.5 142.5t-35.5 174t35.5 174t95.5 143t143 95.5t174 35.5t174 -35.5t142.5 -95.5t95 -143t35.5 -174t-35.5 -174t-95 -142.5t-142.5 -95t-174 -35.5zM784 458l-14 14q-6 6 -14.5 6t-14.5 -6l-298 -292l-110 115q-6 6 -21 -8
l-14 -15q-15 -14 -8 -21l146 -153q7 -6 21 8l14 15q4 3 6 7l307 301q6 6 6 14.5t-6 14.5z" />
<glyph glyph-name="time" unicode="&#xe62f;"
d="M512 736q-185 0 -316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5zM512 -96q-104 0 -192.5 51.5t-140 140t-51.5 192.5t51.5 192.5t140 140t192.5 51.5t192.5 -51.5t140 -140t51.5 -192.5t-51.5 -192.5
t-140 -140t-192.5 -51.5zM672 288h-160v224q0 13 -9.5 22.5t-22.5 9.5t-22.5 -9.5t-9.5 -22.5v-256q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5t-9.5 22.5t-22.5 9.5z" />
<glyph glyph-name="jingshu" unicode="&#xe611;"
d="M270 606v40q0 9 -6 14.5t-14 5.5t-14 -5.5t-6 -14.5v-399q0 -2 1 -5v-97h-14q-22 0 -38 -15t-18 -37v-4v-1v-1q1 -22 17 -37.5t39 -15.5h14v-39h-17h-3q-37 2 -63 29.5t-26 65.5v1.5v1.5q-1 64 0 551v2q0 40 28 67.5t67 27.5h31h477h5q8 0 14 -5.5t6 -13.5v-76h-385
q-56 0 -95 -40zM883.5 -29q-8.5 0 -14 -6t-5.5 -14v-54h-494q-22 0 -38 15.5t-17 37.5v0.5v0.5v4q1 22 17 37.5t38 15.5h509h4h1q8 0 13.5 6t5.5 14v556q0 8 -5.5 14t-13.5 6h-5h-477h-32q-39 0 -67 -28t-28 -67v-2v-551v-2v-2q0 -37 26 -64.5t63 -29.5q2 -1 3 -1h517
q8 0 13.5 6t5.5 14v74q0 8 -5.5 14t-14 6zM766 154q-10 -1 -21 -2.5t-31.5 -2t-22.5 -0.5h-26q-23 0 -41 -1.5t-35 -5.5q-2 -1 -7 -1q-7 0 -14 5t-7 11t8 11q2 2 9 10q11 12 19 10q4 -4 10.5 -5.5t11.5 -1.5q3 0 10 0.5t10 0.5h7q3 3 4.5 9.5t1.5 12.5q0 4 -1 13v13v8l-5 7
q-9 0 -20.5 -1.5t-28.5 -5.5q-1 3 -1.5 5.5t-0.5 5.5q0 15 12 23.5t28 8.5q10 0 16 -3l101 -4q3 -6 3 -13q0 -16 -13 -16h-44q-2 -7 -2 -11q-2 -13 -2 -26q0 -4 0.5 -9t0.5 -7l3 -4q88 -10 90 -10q0 -19 -22 -24zM591 437q7 8 14 10l5 5q8 5 15 5q6 0 13 -4h2q4 0 8 1
q10 0 19 -1.5t20 -5.5q10 9 24 9q12 0 14 -12q6 -10 6 -18q0 -15 -19 -29q-8 -7 -17 -13v-2q1 -5 6 -8q23 -11 40 -16q50 -18 93 -24q-6 -15 -12 -23q-19 -24 -42 -24q-6 0 -8 1q-13 4 -29 16q-43 32 -45 33q-1 1 -16 14q-9 8 -17 6q-6 -6 -14.5 -13.5t-17 -16t-14.5 -13.5
q-29 -23 -55 -23q-10 5 -14 9q-8 6 -8 14q44 18 69 35q34 23 57 58q1 8 -3 10.5t-11 2.5h-8q-10 0 -16 -1q-21 -4 -36 -12q-10 4 -10 14q0 8 7 16zM422 350q5 4 16 14q14 15 23 26q26 33 43 63q3 4 6.5 5t6.5 1q9 0 16 -9.5t7 -20.5q0 -15 -12 -22q-13 -10 -21 -17
q-25 -21 -47 -43q2 -5 6.5 -7.5t9.5 -2.5q10 1 14 1t6 -1q5 5 9 8q22 21 37 45q8 3 15 -3.5t12 -12.5q0 -14 -12 -26q-10 -8 -20 -17q-25 -26 -29 -31q-16 -18 -23 -36q9 0 37 12q13 6 22 6q4 -1 6 -1l8 -17q-16 -14 -42.5 -23t-49.5 -16q-13 -2 -19 11q-3 7 -3 16
q0 21 13 29l4 4q8 12 13 23l-49 -4l-11 23q-2 13 8 23zM389 178q6 12 21 15q15 2 28 5l123 33q2 1 5 1q8 0 8 -11q0 -8 -4.5 -15.5t-11.5 -7.5q-8 -4 -20 -9q-30 -12 -53 -20q-38 -13 -69 -21q-5 -6 -11 -6q-7 0 -12 8.5t-5 19.5q0 6 1 8z" />
<glyph glyph-name="huiyuan1" unicode="&#xe610;"
d="M614 -212h-204q-63 0 -94 0.5t-80 3t-73 9t-51 17t-38 28.5t-11 42v20q0 93 46.5 171.5t126.5 124.5t174 46h204q94 0 174 -46t126.5 -124.5t46.5 -171.5v-20q0 -18 -6.5 -32.5t-22.5 -25t-31 -18t-44.5 -12t-50 -7t-60.5 -4t-63 -1.5h-69v0v0zM408 193
q-120 0 -205.5 -84t-85.5 -202v-21q0 -14 25 -23t77 -12.5t88.5 -4t100.5 -0.5h208q56 0 91.5 0.5t89.5 4t82 12.5t28 23v21q0 118 -85.5 202t-205.5 84h-208v0zM502 270q-114 0 -194.5 79.5t-80.5 191.5t80.5 191.5t194.5 79.5t194.5 -79.5t80.5 -191.5t-80.5 -191.5
t-194.5 -79.5v0v0v0zM283 542q0 -89 64 -152t154.5 -63t154.5 63t64 151.5t-64 151.5t-154.5 63t-154.5 -63t-64 -151v0v0v0z" />
<glyph glyph-name="xiazai" unicode="&#xe6d2;"
d="M356 296v-1v-1v-2v0v-0.5v-0.5q0 -1 1 -2v-1l0.5 -0.5l0.5 -0.5l140 -157l0.5 -0.5l0.5 -0.5h0.5h0.5v-0.5v-0.5q1 0 2 -1h0.5h0.5q4 -1 7 1l1 2v0v0l147 157l1 1v1q0 1 1 2v0.5v0.5v0v1q0 8 -8 8h-93v102q0 7 -5 12t-12 5h-68q-7 0 -12 -5t-5 -12v-102v0l-93 -1
q-6 0 -8 -4zM849 446q-9 24 -34 24q-15 0 -25.5 -10.5t-10.5 -26.5q0 -8 3 -15v0q0 -1 5.5 -15t6.5 -17.5t5.5 -15.5t6 -18.5t4 -16.5t3.5 -18t1 -16q0 -127 -89.5 -216.5t-216 -89.5t-216 89.5t-89.5 216t89.5 216t215.5 89.5q43 0 120 -30v0q8 -5 18 -5q15 0 25.5 10.5
t10.5 25.5q0 21 -17 32v0v0q-3 1 -6 3q-68 32 -151 32q-101 0 -187 -50t-136 -136t-50 -187.5t50 -187.5t136 -136t187.5 -50t187.5 50t136 136t50 188q0 74 -33 145zM474 437h68q7 0 12 5t5 12v17q0 7 -5 12t-12 5h-68q-7 0 -12 -5t-5 -12v-17q0 -7 5 -12t12 -5z" />
<glyph glyph-name="zhengque1" unicode="&#xe6e0;"
d="M449 100q-15 0 -25 11l-257 257q-11 10 -11 25t10.5 25.5t25.5 10.5t25 -11l232 -231l392 392q10 10 25 10t25.5 -10.5t10.5 -25t-10 -25.5l-418 -417q-10 -11 -25 -11z" />
<glyph glyph-name="richeng" unicode="&#xe641;"
d="M874 -110h-750q-28 0 -48 19.5t-20 48.5v750q0 28 20 48t48 20h68v-34q0 -42 30 -72t72.5 -30t72.5 30t30 72v34h205v-34q0 -42 29.5 -72t72 -30t72.5 30t30 72v34h68q29 0 49 -20t20 -48v-750q0 -28 -20 -48t-49 -20v0zM879 592h-759v-638h759v638v0zM295 398h-103v102
h103v-102v0zM295 227h-103v103h103v-103v0zM295 57h-103v102h103v-102v0zM465 398h-102v102h102v-102v0zM465 227h-102v103h102v-103v0zM465 57h-102v102h102v-102v0zM636 398h-103v102h103v-102v0zM636 227h-103v103h103v-103v0zM636 57h-103v102h103v-102v0zM806 398h-102
v102h102v-102v0zM806 227h-102v103h102v-103v0zM806 57h-102v102h102v-102v0zM703 674q-28 0 -47.5 19.5t-19.5 47.5v70q0 28 19.5 47.5t47.5 19.5t47.5 -19.5t19.5 -47.5v-70q0 -28 -19.5 -47.5t-47.5 -19.5v0zM294 674q-28 0 -48 19.5t-20 47.5v70q0 28 20 47.5t47.5 19.5
t47.5 -19.5t20 -47.5v-70q0 -28 -20 -47.5t-47 -19.5v0zM294 674z" />
<glyph glyph-name="fo" unicode="&#xe606;"
d="M844 385q0 13 -8 24t-20 16q13 13 13 31t-12.5 30.5t-30.5 12.5h-4q3 8 3 18q0 17 -12.5 30t-30.5 13q-2 0 -4 -1q2 7 2 14q0 18 -12.5 30.5t-30.5 12.5h-4q2 7 2 15q0 18 -12.5 30.5t-30.5 12.5h-3q2 7 2 15q0 17 -12.5 30t-30.5 13q-2 0 -5 -1q1 5 1 10q0 16 -10 28
t-25 15v3q0 18 -12.5 30.5t-30.5 12.5t-30.5 -12.5t-12.5 -30.5v-4q-15 -3 -24 -14.5t-9 -27.5q0 -5 1 -10q-3 1 -5 1q-18 0 -30.5 -13t-12.5 -30q0 -8 2 -15h-3q-18 0 -30.5 -12.5t-12.5 -30.5q0 -8 2 -15h-4q-18 0 -30.5 -12.5t-12.5 -30.5q0 -7 2 -14q-2 1 -4 1
q-18 0 -31 -13t-13 -30q0 -10 4 -18h-4q-18 0 -30.5 -12.5t-12.5 -30.5t13 -31q-12 -5 -20 -16t-8 -24q0 -16 11 -28q-1 -20 13 -47q22 -41 34 -105.5t5 -118.5q-2 -11 -5.5 -29t-6 -30.5t-2.5 -15.5q0 -17 12 -28.5t29 -11.5q15 0 26.5 9.5t13.5 24.5h1q4 -5 9 -10t22 -16
t36 -19t51 -15t68 -7t68 7t51.5 15t36 19t21.5 16t9 10h1q2 -15 13.5 -24.5t26.5 -9.5q17 0 29 11.5t12 28.5q0 3 -2.5 15.5t-6 30.5t-5.5 29q-7 54 5 118.5t34 105.5q15 27 14 47q10 12 10 28zM767 380v-21q-9 -68 -17 -98q-6 -23 -18 -129q-10 -81 -70.5 -129t-138.5 -52
q-77 4 -136.5 52t-69.5 129q-13 106 -18 129q-4 14 -8 38l-7 42l-2 18v8q-1 0 -2 12.5t1 30t9 34t26 26.5t47 7q113 -14 172 -14t148 14q24 3 41 -3t25.5 -17t13 -26.5t5 -27t-0.5 -23.5zM689 323h-99q29 -22 65.5 -18.5t79.5 38.5q-25 -15 -46 -20zM576 150q12 18 -6 39
q-10 11 -18 33.5t-9 50.5t6.5 54t33.5 46t69 25q27 3 52.5 -7t36.5 -22l12 -11q-1 2 -2.5 6t-9.5 14.5t-18 18.5t-28.5 14.5t-40.5 6.5q-64 0 -100 -54.5t-14 -142.5q2 -5 5.5 -17t5 -18t2 -15t-2 -13.5t-9 -8.5t-18.5 -4v0q41 -13 53 5zM509 408.5q0 6.5 4.5 10.5t11 4
t10.5 -4t4 -10.5t-4 -11t-10.5 -4.5t-11 4.5t-4.5 11zM524 408zM472 150q-12 18 7 39q9 11 16.5 33.5t8.5 51t-6.5 54.5t-33.5 46t-67 24q-27 3 -52.5 -7t-37.5 -22l-12 -11l3 6t9.5 14.5t17.5 18.5t28.5 14.5t41.5 6.5q63 0 99 -54.5t14 -142.5q-2 -5 -5.5 -17t-5 -18
t-2 -15t2 -13.5t9.5 -8.5t18 -4v0q-5 -2 -12 -3.5t-21.5 -0.5t-19.5 9zM359 323h99q-29 -22 -65.5 -18.5t-79.5 38.5q25 -15 46 -20zM450 68q74 -76 147 0q-36 -5 -73 -5t-55 2zM592 76l6 1q-9 9 -19 16q-13 10 -26 10q-8 1 -15.5 -2.5t-10.5 -7.5l-4 -3q-1 1 -4 3.5
t-10.5 6.5t-14.5 3q-14 0 -26 -10q-9 -7 -19 -16v0v0v0l2 -1q70 -10 141 0zM737 8q0 8 6 14t14 6t13.5 -6t5.5 -14t-5.5 -13.5t-13.5 -5.5t-14 5.5t-6 13.5zM281 8q0 8 5.5 14t13.5 6t14 -6t6 -14t-6 -13.5t-14 -5.5t-13.5 5.5t-5.5 13.5z" />
<glyph glyph-name="fo3" unicode="&#xe60c;"
d="M483 826q-5 -13 -12 -36.5t-11 -32.5q-7 -21 -12 -29q-2 -4 -5.5 -7t-9 -6.5t-7.5 -5.5q-18 -14 -20 -30q-1 -11 4 -23q-9 -4 -10.5 -6.5t-0.5 -11.5q1 -6 12.5 -38.5t6.5 -51.5q7 0 10 5t4 13.5t3 11.5q9 -6 12 -23q4 -14 -10 -22q-10 -5 -30.5 -11t-24.5 -7
q-13 -5 -22.5 -14t-14.5 -16.5t-8 -23t-4 -21.5t-2 -24q-5 -49 -8 -63q0 -2 -1 -7.5t-1.5 -7t-1.5 -6t-0.5 -6.5t0.5 -6t1 -7t2 -6.5t3 -7.5q1 -1 2 -3q6 -12 7.5 -17t-3.5 -18q-27 -3 -54 -14q-29 -13 -41 -29q-3 -4 -4.5 -9t-1.5 -8.5t1.5 -9.5t2.5 -8.5t4.5 -9.5t3.5 -8
q2 -4 0 -7.5t-6.5 -7.5t-5.5 -7q-5 -10 -3 -25q0 -7 5 -29q-16 -10 -28 -19q-21 -18 -30 -40q-5 -12 -7 -27q-1 -7 -1 -15q7 -4 15 -7q45 -19 115 -29q122 -17 284 -3q55 4 133 17q4 0 10 1q28 5 43.5 8t38 11.5t37.5 20.5q18 15 -9 50q-18 23 -50 39q-7 3 -13 5
q-3 1 -4 2.5t-1 3t0.5 4.5t0.5 4q1 18 2 38q0 1 -13 14q5 8 7 15q6 16 2 29q-5 18 -30 33q-10 5 -25 11q-5 2 -12 7t-10 6t-6 1.5t-4 1.5t-1 5q0 8 2 16q0 2 10 27q8 20 5 46q-9 84 -43 134q-6 7 -23 13.5t-34.5 10.5t-33.5 10.5t-19.5 15.5t7.5 26q5 6 7 -2q1 -3 1 -4
q4 -11 13 -14q8 -3 9 0.5t-2 8.5q-1 3 -1 5q-3 11 -1 24q2 6 6 20t5 22q2 17 -5 22q-3 2 -5 4t-2.5 4t-0.5 5v7q-1 17 -16 31q-7 6 -19 13q-4 3 -5.5 10t-2.5 9q-2 3 -6.5 7.5t-5.5 6.5q-4 6 -4 23q-9 23 -12 31q-1 1 -3 5.5t-2 6.5q-3 6 -8 6h-4v0z" />
<glyph glyph-name="muyu2" unicode="&#xe612;"
d="M752 409q17 -7 47 -17t47 -16.5t39.5 -24t34.5 -41t20.5 -66t8.5 -100.5q0 -34 -2 -61.5t-5.5 -48t-9 -36t-13 -26t-17 -17t-21 -10t-24.5 -5t-28 -2t-31 -0.5q-15 1 -22 1h-347q-43 0 -71 27t-37 67t-2 85q9 63 65.5 79t114.5 -24q13 -9 29 -21t22.5 -16t17.5 -9.5
t21 -6t25 0.5q47 3 71.5 36t24.5 83q0 27 -4.5 51.5t-15 49.5t-31.5 40t-50 15q-24 0 -45.5 -11t-36.5 -24t-41.5 -24t-58.5 -11q-31 0 -53 27t-27.5 65.5t-1 77t27 65.5t56.5 27q36 0 69 -16.5t59.5 -40t79.5 -59t115 -63.5zM460.5 821q-31.5 16 -69 -1t-58.5 -57
q-19 -37 -14 -73.5t30 -56.5q-257 -493 -275 -536q-12 -28 7 -45q22 -20 48 8q13 14 24 39q28 67 225 519q30 -5 60 13t48 52q21 41 13.5 81.5t-39 56.5z" />
<glyph glyph-name="xiaoxizhongxin" unicode="&#xe605;"
d="M48 669v-395q0 -57 40.5 -98t98.5 -41h208l7 -175l205 175h234q58 0 98.5 41t40.5 98v395q0 58 -40.5 98.5t-98.5 40.5h-654q-58 0 -98.5 -40.5t-40.5 -98.5v0zM647 449.5q0 27.5 19.5 47t46.5 19.5t46.5 -19.5t19.5 -47t-19.5 -46.5t-46.5 -19t-46.5 19t-19.5 46.5z
M446 449.5q0 27.5 19.5 47t46.5 19.5t46.5 -19.5t19.5 -47t-19.5 -46.5t-46.5 -19t-46.5 19t-19.5 46.5zM249 449.5q0 27.5 19 47t46.5 19.5t46.5 -19.5t19 -47t-19 -46.5t-46.5 -19t-46.5 19t-19 46.5z" />
<glyph glyph-name="shouqi" unicode="&#xe677;"
d="M833 -32v832q0 6 -5 11t-11 5h-33q-6 0 -11 -5t-5 -11v-832q0 -7 5 -11.5t11 -4.5h33q6 0 11 4.5t5 11.5zM545 -32v832q0 6 -5 11t-11 5h-33q-6 0 -11 -5t-5 -11v-832q0 -7 5 -11.5t11 -4.5h33q6 0 11 4.5t5 11.5zM256 -32v832q0 6 -5 11t-11 5h-33q-6 0 -11 -5t-5 -11
v-832q0 -7 5 -11.5t11 -4.5h33q6 0 11 4.5t5 11.5z" />
<glyph glyph-name="mima1" unicode="&#xe654;"
d="M847 -128h-675q-44 0 -75 29t-31 71v424q0 41 30.5 70.5t75.5 29.5h26v98q0 128 90.5 215t220.5 87t221 -87t91 -215v-99h26q44 0 75 -29t31 -71v-424q0 -41 -31 -70t-75 -29zM465 187v-111q0 -18 13 -30t31.5 -12t31.5 12t13 30v111q20 11 32.5 30.5t12.5 42.5
q0 35 -26.5 59.5t-63 24.5t-63 -24.5t-26.5 -59.5q0 -23 12.5 -42.5t32.5 -30.5zM732 598q0 87 -65 148.5t-157.5 61.5t-157.5 -61.5t-65 -148.5v-102h445v102z" />
<glyph glyph-name="xiangshangjiantou" unicode="&#xe65d;"
d="M966 227l-435 432q-7 7 -17.5 7t-17.5 -7l-442 -432q-7 -7 -7 -17.5t7.5 -17.5t17.5 -7t18 7l425 416l416 -416q7 -7 17.5 -7t18 7t7.5 17.5t-8 17.5z" />
<glyph glyph-name="xiangxiajiantou" unicode="&#xe65e;"
d="M966 573q-7 7 -17.5 7t-17.5 -7l-416 -416l-425 416q-8 7 -18 7t-17.5 -7t-7.5 -17.5t7 -17.5l442 -432q7 -8 17.5 -8t17.5 8l435 432q15 20 0 35z" />
<glyph glyph-name="xiangyoujiantou" unicode="&#xe65f;"
d="M762 406l-432 436q-8 7 -18 7t-17.5 -7.5t-7.5 -17.5t7 -18l416 -416l-416 -425q-7 -7 -7 -17.5t7.5 -18t17.5 -7.5t18 8l432 441q7 7 7 17.5t-7 17.5z" />
<glyph glyph-name="xiangzuojiantou" unicode="&#xe660;"
d="M730 -35l-416 425l416 416q7 8 7 18t-7.5 17.5t-17.5 7.5t-18 -7l-432 -436q-7 -7 -7 -17.5t7 -17.5l432 -441q8 -8 18 -8t17.5 7.5t7.5 18t-7 17.5z" />
<glyph glyph-name="zhankai1" unicode="&#xe69c;"
d="M928 704h-832q-7 0 -11.5 -4.5t-4.5 -11.5v-32q0 -7 4.5 -11.5t11.5 -4.5h832q7 0 11.5 4.5t4.5 11.5v32q0 7 -4.5 11.5t-11.5 4.5zM928 416h-832q-7 0 -11.5 -4.5t-4.5 -11.5v-32q0 -7 4.5 -11.5t11.5 -4.5h832q7 0 11.5 4.5t4.5 11.5v32q0 7 -4.5 11.5t-11.5 4.5z
M928 127h-832q-7 0 -11.5 -4.5t-4.5 -11.5v-32q0 -7 4.5 -11.5t11.5 -4.5h832q7 0 11.5 4.5t4.5 11.5v32q0 7 -4.5 11.5t-11.5 4.5z" />
<glyph glyph-name="location" unicode="&#xe6c2;"
d="M513 -94h-1q-26 0 -44 19q-89 92 -172 205q-166 223 -166 350q0 104 51 192t139 139t192 51t192 -51t139 -139t51 -192q0 -77 -58 -186q-57 -105 -168 -241l-1 -1l-109 -126q-18 -20 -45 -20v0zM512 805q-88 0 -163 -43.5t-118.5 -118.5t-43.5 -163q0 -108 155 -316
q81 -110 168 -200q1 -1 2 -1h1q1 0 2 1l109 125q107 132 161 232q52 97 52 159q0 88 -43.5 163t-118.5 118.5t-163 43.5zM512 302q-74 0 -126.5 52t-52.5 126t52.5 126.5t126.5 52.5t126.5 -52.5t52.5 -126.5t-52.5 -126t-126.5 -52zM512 602q-50 0 -85.5 -35.5t-35.5 -86
t35.5 -86t85.5 -35.5t85.5 35.5t35.5 86t-35.5 86t-85.5 35.5z" />
<glyph glyph-name="suoxiaotuichuquanpingshouhui" unicode="&#xe794;"
d="M410 382h-312q-14 0 -23 -9t-9 -22.5t9 -23t23 -9.5h242l-267 -267q-9 -9 -9 -21.5t9 -21.5t21.5 -9t21.5 8l270 270v-247q0 -13 9 -22.5t22.5 -9.5t23 9.5t9.5 22.5v320q0 32 -40 32zM553 446h313q13 0 22.5 9.5t9.5 23t-9.5 22.5t-22.5 9h-243l267 268q9 9 9 21.5
t-9 21.5t-21.5 9t-21.5 -9l-269 -269v246q0 14 -9.5 23t-23 9t-22.5 -9t-9 -23v-320q0 -15 10.5 -23.5t28.5 -8.5z" />
<glyph glyph-name="xitong1" unicode="&#xe61b;"
d="M512.5 208q-72.5 0 -124 51.5t-51.5 124t51.5 123.5t124 51t124 -51t51.5 -123.5t-51.5 -124t-124 -51.5zM923 461v0l-82 19l-2 6q-8 26 -22 52l-3 6l44 74q12 18 13 36t-11 33l-42 42q-12 13 -33 13t-37 -12h-1l-72 -46l-6 3q-25 14 -52 22l-6 2l-19 84v0
q-3 19 -17.5 34t-33.5 15h-59q-17 0 -30 -15t-17 -35l-21 -82l-6 -2q-29 -9 -56 -24l-6 -3l-74 47v0q-16 12 -37 12t-33 -13l-42 -42q-12 -14 -11 -32.5t12 -36.5l47 -77l-3 -6q-13 -26 -20 -49l-2 -6l-83 -19v0q-19 -3 -34 -17.5t-15 -33.5v-59q0 -17 15 -30t35 -18l83 -20
l2 -6q8 -23 19 -46l3 -6l-47 -77q-11 -18 -12 -36t11 -33l42 -42q12 -13 33 -13t37 12v0l75 47l5 -3q28 -15 56 -24l6 -2l21 -82q5 -20 17.5 -35t30.5 -15h59q18 0 32.5 15t18.5 34v0l18 84l7 2q26 9 51 22l6 3l72 -46h1q16 -12 37 -12t33 13l42 42q12 15 11 33t-13 36
l-44 74l3 6q12 24 20 49l2 6l83 20q21 5 35.5 18t14.5 30v59q0 19 -15 33.5t-34 17.5v0z" />
<glyph glyph-name="ai-edit" unicode="&#xe613;" horiz-adv-x="1025"
d="M202 771q-41 0 -70.5 -29t-29.5 -70v-598q0 -41 29.5 -70t70.5 -29h598q41 0 70 29t29 70v393l103 99v-529q0 -68 -50 -116.5t-119 -48.5h-668q-68 0 -116.5 48.5t-48.5 116.5v661q0 70 49 123t116 53h529l-99 -103h-393zM568 285l-222 -63l63 221zM590 307l-159 158
l349 346l159 -157zM1010 725l-47 -47l-159 157l48 47q13 13 31 14t30 -12l99 -98q13 -12 12 -30t-14 -31v0zM1010 725z" />
<glyph glyph-name="sanjiao" unicode="&#xe6a2;"
d="M290 818l651 -440l-651 -441v881z" />
<glyph glyph-name="error-circle" unicode="&#xe615;"
d="M511 -61q-89 0 -170.5 34t-144.5 97t-97 144t-34 170.5t34 171t97 144.5t144.5 96.5t170.5 33.5t170.5 -33.5t144.5 -96.5t96.5 -144.5t33.5 -171t-33.5 -170.5t-96.5 -144t-144.5 -97t-170.5 -34zM511 779q-79 0 -151 -30t-128 -85.5t-85.5 -127.5t-29.5 -151t29.5 -151
t85.5 -128t128 -86t151 -30t151 30t128 86t85.5 128t29.5 151t-29.5 151t-85.5 127.5t-128 85.5t-151 30zM362.5 212q-10.5 0 -18 7.5t-7.5 18t8 18.5l296 297q8 7 18.5 7t18 -7.5t7.5 -18t-8 -18.5l-296 -296q-8 -8 -18.5 -8zM659.5 212q-10.5 0 -18.5 8l-296 296
q-8 8 -8 18.5t7.5 18t18 7.5t18.5 -7l296 -297q8 -8 8 -18.5t-7.5 -18t-18 -7.5z" />
<glyph glyph-name="shouqi1" unicode="&#xe65b;"
d="M510 768l419 -419q14 -14 32.5 -14t32.5 14t14 32.5t-14 32.5l-482 482l-482 -482q-14 -14 -14 -32.5t14 -32.5t32.5 -14t32.5 14l415 419v0zM512 305l419 -419q14 -14 32.5 -14t32.5 14t14 32.5t-14 32.5l-484 482l-482 -482q-14 -14 -14 -32.5t14 -32.5t32.5 -14
t32.5 14l417 419v0zM512 305z" />
<glyph glyph-name="jian" unicode="&#xe648;"
d="M797 516h-91v139q0 47 -33 80t-79 33h-352q-47 0 -80 -33t-33 -80v-351q0 -47 33 -80t80 -33h143v-87q0 -42 29.5 -71.5t70.5 -29.5h312q42 0 71.5 29.5t29.5 71.5v312q0 41 -29.5 70.5t-71.5 29.5zM242 255q-20 0 -34.5 14.5t-14.5 34.5v351q0 21 14.5 35t34.5 14h352
q20 0 34.5 -14t14.5 -35v-139h-158q-41 0 -70.5 -29.5t-29.5 -70.5v-161h-143zM643 452v-148q0 -20 -14.5 -34.5t-34.5 -14.5h-145v161q0 15 10.5 25.5t25.5 10.5h158zM834 104q0 -15 -10.5 -26t-26.5 -11h-312q-15 0 -25.5 11t-10.5 26v87h145q46 0 79 33t33 80v148h91
q16 0 26.5 -10.5t10.5 -25.5v-312z" />
<glyph glyph-name="daiban1" unicode="&#xe679;"
d="M511 831q-91 0 -173.5 -35.5t-142 -95t-94.5 -142t-35 -173t35 -173t94.5 -142t142 -95t173 -35.5t173 35.5t142.5 95t95 142t35 173t-35 173t-95 142t-142.5 95t-172.5 35.5v0zM495 728q5 1 5 2h20q22 -10 24 -12q27 -22 18 -55q-10 -34 -45 -38q-21 -2 -37.5 10
t-20.5 32t6.5 37.5t29.5 23.5v0zM273 633q51 -35 153 -114q60 -47 116 -91q27 -21 21 -52q-7 -34 -40 -42q-34 -7 -55 20q-138 178 -179 234q-21 29 -31 46q-2 5 -3 8q7 -1 18 -9v0zM856 372q-1 0 -1 -4q0 -2 1 -3v-8q-1 -5 -2 -15.5t-2 -16.5q-13 -74 -56 -137
q-45 -64 -112 -103q-60 -34 -125 -43q-3 0 -11 -0.5t-12 -0.5h-5h-3h-4h-27h-3h-3h-8q-5 0 -15.5 1t-16.5 2q-93 17 -165 78q-64 54 -96 133q-17 40 -22 83q-1 3 -1 9.5t-1 9.5v8q0 1 1 3l-1 4v27q1 0 1 2.5v2.5l-1 3v6q0 1 4 22q6 44 24 86q4 11 15 16t22 1
q16 -5 22.5 -18.5t0.5 -28.5q-10 -28 -15 -49q-15 -74 8 -144q21 -61 66 -106q39 -41 92 -63q56 -23 116 -21q83 4 150 51q64 45 95 117q30 69 20 143q-15 116 -109 189q-6 4 -12.5 8t-14.5 9t-12 7q-9 7 -14 15q-14 22 6 42q14 15 37 4q106 -56 157 -163q25 -53 30 -113
q1 -4 2 -4v-6q-1 0 -1 -2.5v-2.5v-4l1 -4v-22v0zM856 372z" />
<glyph glyph-name="laba" unicode="&#xe647;"
d="M867 611q-9 10 -22 10t-22.5 -9.5t-9.5 -22.5t9 -23q74 -73 74 -182q0 -104 -74 -182q-9 -10 -9 -23t9.5 -22.5t22.5 -9.5t22 10q93 93 93 227t-93 227zM774 518q-9 10 -22 10t-22.5 -9.5t-9.5 -22.5t10 -22q38 -39 38 -90q0 -56 -38 -90q-10 -9 -10 -22t9.5 -22.5
t22.5 -9.5t22 10q58 57 58 134q0 38 -15.5 74t-42.5 60zM557 752l-237 -144v-448l237 -144q33 -21 58 -7.5t25 52.5v643q0 40 -25 54t-58 -6zM64 512v-256q0 -41 27.5 -68.5t68.5 -27.5h96v448h-96q-41 0 -68.5 -27.5t-27.5 -68.5z" />
<glyph glyph-name="shenfenxinxi" unicode="&#xe810;"
d="M511 707h324q24 0 37 -2q87 -11 87 -98q1 -228 0 -438q0 -48 -29 -77.5t-77 -29.5q-361 -1 -684 0q-48 0 -76 28t-28 75q-1 220 0 436q1 105 106 106h340v0v0zM413 210v82q-2 25 -19 44t-41 21q-63 5 -128 0q-22 -1 -37.5 -15t-19.5 -36q-2 -14 -3 -29.5t-1.5 -36
t-0.5 -30.5h250v0v0zM365 486q0 31 -22 52.5t-54 22.5q-32 0 -54 -22t-22 -54t22 -54t54 -22t54 22.5t22 54.5v0v0zM661 308h118q33 0 34 26q2 30 -32 30q-123 1 -239 0q-33 0 -32 -31q1 -25 34 -25h117v0v0zM661 205v0h118q34 1 34 26q0 13 -8.5 21t-23.5 8q-107 1 -240 0
q-16 0 -22 -9q-12 -17 -6 -27q11 -17 28 -18t120 -1v0v0zM704 409h75q16 0 25 7.5t9 19.5q-1 25 -32 26q-79 1 -157 0q-15 -1 -23.5 -9t-7.5 -19q4 -25 34 -25h77v0v0zM704 409z" />
<glyph glyph-name="zhankai" unicode="&#xe63c;"
d="M204 391l326 -289l288 288l41 -42l-327 -327l-367 326zM204 747l326 -290l288 289l41 -42l-327 -327l-367 326z" />
<glyph glyph-name="icon-yxj-record" unicode="&#xe639;"
d="M774 476h-520q-9 0 -16 7t-7 16.5t7 16t16 6.5h520q9 0 16 -6.5t7 -16t-7 -16.5t-16 -7zM623 297h-369q-9 0 -16 8t-7 17.5t7 17.5t16 8h369q9 0 16 -8t7 -17.5t-7 -17.5t-16 -8zM689 118h-435q-9 0 -16 8t-7 17.5t7 17.5t16 8h435q9 0 16 -8t7 -17.5t-7 -17.5t-16 -8z
M660 660h-296q-38 0 -64 25.5t-26 62.5q0 30 19 53.5t50 29.5q7 29 31 47t56 18h164q32 0 56 -18t31 -47q31 -6 50 -29.5t19 -54.5q0 -36 -26 -61.5t-64 -25.5zM430 850q-19 0 -31 -11.5t-12 -28.5q0 -9 -7 -16t-16 -7q-19 0 -31 -10.5t-12 -27.5t12 -27t31 -10h296
q19 0 31 10.5t12 27t-12 27.5t-31 11q-9 0 -16 6.5t-7 16.5q0 17 -12 28t-31 11h-164zM842 -127h-660q-49 0 -83.5 34.5t-34.5 83.5v660q0 49 34.5 83.5t83.5 34.5h115q10 0 17 -7t7 -16.5t-7 -16.5t-17 -7h-115q-29 0 -50 -21t-21 -50v-660q0 -29 21 -50t50 -21h660
q29 0 50 21t21 50v660q0 29 -21 50t-50 21h-115q-10 0 -17 7t-7 16.5t7 16.5t17 7h115q49 0 83.5 -34.5t34.5 -83.5v-660q0 -49 -34.5 -83.5t-83.5 -34.5z" />
<glyph glyph-name="huiyuan" unicode="&#xe62c;"
d="M573 462q-40 -17 -73.5 -44.5t-58 -63.5t-38 -78t-13.5 -89q0 -41 10.5 -79t29.5 -71h-21q-23 0 -53.5 1.5t-63.5 4.5l-64 6q-32 4 -58.5 8t-44.5 8t-23 8q-8 6 -12.5 39t3.5 84q3 20 13 32.5t24 22t31.5 15t36 10.5t35.5 11t31 15q16 10 25.5 20t13.5 19.5t4 19.5t-1 23
q-2 18 -13 29t-24 22q-7 5 -12 15t-9 20q-4 12 -8 25q-6 1 -11 5t-10.5 11.5t-9.5 21t-3 24.5t5 19q3 9 10 17q0 30 3 60q3 26 11 55t25 52q16 22 34 36t38 22t39 10.5t38 2.5q23 0 45.5 -5t42 -13.5t35 -19.5t24.5 -22q21 -26 30.5 -56.5t13.5 -58.5q4 -31 4 -64
q5 -4 8 -10t5 -14.5t1 -21.5q-2 -17 -7 -27t-11 -15q-8 -7 -15 -9l-4 -10l-4 -11q-1 -6 -4 -12v0v0zM687 436q51 0 96.5 -19.5t79.5 -53.5t53.5 -79.5t19.5 -97t-19.5 -97.5t-53.5 -80t-79.5 -53t-96.5 -19q-53 0 -98.5 19t-79 53t-53.5 80t-20 97t20 97t53.5 80t79 53.5
t98.5 19.5v0v0zM832 235q5 16 -4 29t-24 18.5t-30 1t-22 -24.5q-4 -14 -8 -25q-4 -12 -7 -24q-4 -13 -9 -27.5t-13 -33.5q-8 -21 -22.5 -19.5t-22.5 16.5q-9 16 -16 34q-7 17 -15 36q-7 17 -12 32q-6 14 -10 23q-6 12 -21 14t-28.5 -4t-23 -19t-2.5 -28q5 -16 12 -35.5
t15 -40.5q8 -20 15.5 -40t12.5 -34q12 -30 36 -45t50.5 -16t51 11.5t35.5 38.5q9 21 18 43t17.5 44t15.5 41q7 20 11 34v0v0zM832 235z" />
<glyph glyph-name="renshiguanli" unicode="&#xe60d;" horiz-adv-x="1029"
d="M839 82v4.5v4.5l-16 -9h16zM701 103l15 85q0 5 -3 9l-61 60q-23 22 -14 48q1 5 3 8q-14 7 -34 15q-6 1 -18 4.5t-18 4.5q-12 9 -36 59q-8 1 -23 3q1 14 11 26.5t12 19.5t3 26.5t6 28.5q3 6 13 11t13 9q8 11 12 34q8 42 -2 63q-2 4 -4.5 8.5t-4 7.5t-1.5 9q-1 10 2 44
t3 35q1 51 -7 84q-9 26 -22 34l-27 4l-17 15q-24 15 -49.5 20t-51.5 0t-40.5 -9.5t-35.5 -13.5q-44 -14 -63.5 -71t-2.5 -140q3 -11 -3.5 -23t-6.5 -16q0 -2 1 -17t2.5 -23t4 -21t7 -21t10.5 -12q1 0 5.5 -1.5t8.5 -2.5t4 0l6 -69q3 -5 12 -15.5t11 -22.5l-17 -4
q-24 -50 -36 -59q-6 -2 -18 -5t-18 -5q-24 -9 -69.5 -29t-61.5 -26q-8 -3 -29.5 -11t-31.5 -12.5t-22.5 -15.5t-17.5 -25v-126h419h283q-2 11 -1 21zM762 349q5 1 8 6l1 1q-18 8 -33 14q-23 6 -35 9q-12 8 -34 56l-22 4q0 13 9.5 24.5t12 18.5t3.5 25.5t5 27.5q3 5 12.5 10
t12.5 9q8 10 12 32q7 41 -3 61q-1 3 -3.5 7.5t-4 7.5t-1.5 9q-1 9 2 41.5t3 33.5q1 49 -7 80q-9 25 -21 32l-26 5l-16 14q-49 31 -118 12q1 0 1 -1l3 -1l12 -11l23 -4l5 -3q25 -14 38 -53v-1l1 -1q9 -38 8 -93q0 -4 -2 -24q-4 -44 -3 -51v-1q0 -1 1 -2q4 -7 5 -10
q16 -32 6 -85q-6 -31 -18 -48q-8 -11 -25 -20q0 -3 -1 -13q-1 -21 -4 -33q-3 -7 -7 -13l5 -10q0 -1 1 -2.5t1 -2.5q13 -28 20 -37q5 -1 14 -3.5t13 -3.5l2 -1l3 -1q18 -7 56 -24l1 1zM701 103l15 85q0 5 -3 9l-61 60q-23 22 -14 48q1 5 3 8q-14 7 -34 15q-6 1 -18 4.5
t-18 4.5q-12 9 -36 59q-8 1 -23 3q1 14 11 26.5t12 19.5t3 26.5t6 28.5q3 6 13 11t13 9q8 11 12 34q8 42 -2 63q-2 4 -4.5 8.5t-4 7.5t-1.5 9q-1 10 2 44t3 35q1 51 -7 84q-9 26 -22 34l-27 4l-17 15q-24 15 -49.5 20t-51.5 0t-40.5 -9.5t-35.5 -13.5q-44 -14 -63.5 -71
t-2.5 -140q3 -11 -3.5 -23t-6.5 -16q0 -2 1 -17t2.5 -23t4 -21t7 -21t10.5 -12q1 0 5.5 -1.5t8.5 -2.5t4 0l6 -69q3 -5 12 -15.5t11 -22.5l-17 -4q-24 -50 -36 -59q-6 -2 -18 -5t-18 -5q-24 -9 -69.5 -29t-61.5 -26q-8 -3 -29.5 -11t-31.5 -12.5t-22.5 -15.5t-17.5 -25v-126
h419h283q-2 11 -1 21zM839 82v4.5v4.5l-16 -9h16zM1023 282q7 7 5.5 12.5t-11.5 7.5l-85 12q-9 2 -19 9t-15 16l-38 77q-4 9 -10 9t-11 -9l-38 -77q-4 -9 -14 -16t-20 -9l-85 -12q-9 -2 -11 -7.5t5 -12.5l61 -60q7 -7 11 -18.5t2 -21.5l-14 -85q-3 -15 8 -15q4 0 9 3l76 40
q8 4 20.5 4t21.5 -4l75 -40q5 -3 9 -3q11 0 8 15l-14 85q-2 9 2 21t11 19zM1023 282q7 7 5.5 12.5t-11.5 7.5l-85 12q-9 2 -19 9t-15 16l-38 77q-4 9 -10 9t-11 -9l-38 -77q-4 -9 -14 -16t-20 -9l-85 -12q-9 -2 -11 -7.5t5 -12.5l61 -60q7 -7 11 -18.5t2 -21.5l-14 -85
q-3 -15 8 -15q4 0 9 3l76 40q8 4 20.5 4t21.5 -4l75 -40q5 -3 9 -3q11 0 8 15l-14 85q-2 9 2 21t11 19z" />
<glyph glyph-name="xinzenghuiyuan" unicode="&#xe61f;"
d="M729 4q-84 0 -143.5 59.5t-59.5 143.5q0 60 31.5 109t82.5 74q4 5 7 10q5 12 9 23q6 17 9 27q8 3 16 10q7 6 12 17q6 11 7 29q2 14 0 24q-2 9 -6 15q-3 7 -9 12q0 35 -4 70q-4 29 -14 64q-11 34 -33 62q-9 12 -25.5 24t-37.5 22q-21 9 -45 15q-24 5 -48 5q-20 0 -40 -3
q-21 -3 -41.5 -11.5t-40.5 -23.5t-36 -40q-18 -25 -27 -57q-8 -32 -12 -60q-4 -33 -3 -67q-8 -8 -11 -18q-4 -9 -5 -21t4 -27q4 -14 10 -22t11 -12q6 -5 12 -7q5 -16 8 -28q4 -10 10 -22q4 -10 11 -17q15 -12 26.5 -23.5t13.5 -31.5q1 -13 1 -25t-4 -22q-5 -11 -14 -21
q-9 -11 -27 -22q-22 -14 -52 -22t-57 -18q-28 -10 -48 -27q-21 -17 -25 -49q-8 -57 -3.5 -92.5t12.5 -42.5q5 -5 25 -9t47 -9q28 -4 62 -8t69 -7q32 -3 67 -5q33 -2 57 -2q23 0 58 2t69 5q38 3 72 7q37 5 65 10q30 6 49 12q20 6 24 12q6 10 9 28q0 2 1 5q-45 -24 -96 -24z
M726 383q-74 0 -126 -52t-52 -126t52 -126t126 -52t126.5 52t52.5 126t-52.5 126t-126.5 52v0zM826 207v-5v0q-1 -9 -7.5 -15.5t-15.5 -6.5h-52v-74h-28v0q-9 0 -15.5 6.5t-6.5 15.5v52h-74v28v0q0 9 6.5 15.5t15.5 6.5h52v52v23h29v0q9 -1 15 -7.5t6 -15.5v-52h75v-23v0z
M826 207z" />
<glyph glyph-name="fozhu" unicode="&#xe601;"
d="M96 410v-22t1 -24q-33 -15 -48 -47.5t-5 -67.5q9 -31 34.5 -50t57.5 -19q7 0 15 2q11 -21 25 -39q-20 -30 -15 -66t32 -59q27 -24 63 -24t64 24q20 -10 42 -19q0 -36 23 -63.5t59 -32.5q7 -1 14 -1q32 0 57.5 19.5t34.5 50.5q24 2 46 7q28 -45 81 -45q21 0 40 9
q33 15 47.5 48t4.5 67q18 14 35 30q19 -9 40 -9q53 0 81 44q20 31 14.5 66.5t-32.5 58.5q7 22 13 45q35 5 59 32t24 63v1v1q0 36 -24 63t-60 32q-5 23 -13 44q27 24 32.5 59t-14.5 66t-54.5 40.5t-66.5 -5.5q-17 16 -36 30q11 34 -4 67t-48 48t-67.5 4.5t-53.5 -40.5
q-22 4 -46 6q-10 34 -40 54t-65.5 14.5t-59 -33t-23.5 -63.5q-22 -8 -42 -19q-27 23 -63 23.5t-63 -23.5t-32 -60t15 -65q-14 -19 -25 -39q-36 5 -66.5 -14t-40.5 -54t5.5 -67.5t47.5 -47.5zM144 403q29 3 52 21t31.5 47t-1 57t-32.5 46q8 13 17 26q21 -11 44 -11
q36 0 63 23q23 20 30 49t-3 56q14 7 28 13q13 -22 35 -35.5t48 -13.5q7 0 14 1q30 5 51.5 25t28.5 49q14 -2 30 -5q-2 -29 13.5 -54t42.5 -38q19 -8 40 -8q38 0 66 27l24 -20q-17 -24 -18 -53t15 -55v0q29 -44 81 -44q8 0 19 2q5 -15 9 -29q-28 -11 -44.5 -35.5t-16.5 -54.5
v0v-1q0 -30 17 -54.5t44 -34.5q-4 -15 -9 -30q-28 6 -55.5 -5t-43.5 -37q-17 -26 -15.5 -55t18.5 -53q-12 -10 -23 -20q-21 20 -50 25.5t-57 -7.5q-27 -12 -42 -37.5t-14 -54.5q-16 -3 -30 -5q-7 29 -28.5 49t-51.5 24.5t-56 -9t-41 -38.5q-14 5 -27 12q9 27 2 56t-30 48.5
t-52.5 23t-55.5 -10.5l-16 26q23 18 32 46t0.5 56.5t-31.5 47t-52 21.5v16v15z" />
<glyph glyph-name="iconfontquanping" unicode="&#xe60a;"
d="M144 -16h304q13 0 22 9.5t9 22t-9 22t-22 9.5h-236l260 260q9 9 9 21t-9 21t-21 9t-21 -9l-262 -262v240q0 13 -9 22t-22 9t-22 -9t-9 -22v-311q0 -32 38 -32v0zM880 794h-304q-13 0 -22 -9t-9 -22t9 -22t22 -9h236l-260 -261q-9 -8 -9 -20.5t9 -21.5t21 -9t21 9l262 262
v-240q0 -12 9 -21.5t22 -9.5t22 9.5t9 21.5v312q0 15 -10.5 23t-27.5 8v0z" />
<glyph glyph-name="iconfontshuangjiantou" unicode="&#xe608;"
d="M535 52l335 341q10 11 10 26.5t-10.5 26t-25.5 10.5t-26 -11l-311 -317l-312 317q-11 11 -26 11t-25.5 -10.5t-10.5 -26t11 -26.5l335 -341q11 -12 28 -10q16 -2 28 10v0v0v0v0zM507 309q16 -1 28 10l335 341q10 11 10 26.5t-10.5 26t-25.5 10.5t-26 -10l-311 -318
l-312 318q-11 10 -26 10t-25.5 -10.5t-10.5 -26t11 -26.5l335 -341q11 -11 28 -10v0v0v0z" />
<glyph glyph-name="temple" unicode="&#xe607;"
d="M626 749h-240q15 16 42.5 41t47 45t29.5 39q0 16 3 22q-7 -21 12 -44.5t55 -53.5t51 -49zM715 727v-23q67 -38 74 -38q16 0 28 16q-1 -2 -3 -7t-4.5 -9.5t-4.5 -8.5q-5 -8 -17 -15.5t-19 -7.5h-529q-14 0 -31 19t-14 29q12 -16 29 -16q6 0 36.5 19.5t36.5 25.5v16h418z
M291 593h431v13h-431v-13zM310 513h392v57h-392v-57zM769 459q77 -51 96 -51q8 0 18 6.5t17 15.5q-1 -9 -11.5 -25t-10.5 -26q0 -3 -10 -13h-727l6 7q-3 5 -17 19.5t-18 27.5v10q5 -9 15 -15.5t20 -6.5q9 0 30 11.5t41.5 25t21.5 14.5q3 6 3 28h526v-28zM220 328h610v13
h-610v-13zM763 302v-54h-514q0 7 1.5 21.5t1.5 16.5q0 6 -4.5 10t-4.5 6h520zM843 219v-38q1 0 26 -15t53.5 -30.5t38.5 -15.5q28 0 45 29q7 -14 -21 -47t-50 -33h-861q-24 8 -35 20q-12 8 -22 23.5t-10 20.5v16q12 -29 44 -29q13 0 36.5 13t48.5 29.5t30 18.5q3 0 3 10v28
h674zM157 25h699v16h-699v-16zM189 -52h635v58h-635v-58zM96 -119h820v35h-820v-35z" />
<glyph glyph-name="huiyuan2" unicode="&#xe631;"
d="M516 821q-88 0 -169 -34t-140.5 -91.5t-95 -137.5t-36.5 -168q-2 -120 56 -221.5t158.5 -161t220.5 -61.5q87 -1 167.5 33t139.5 92t95 138t37 167q1 89 -33 171t-92 141.5t-138.5 95.5t-169.5 37zM809 134q-75 94 -187 130q140 177 10 289q-55 47 -128 44t-123 -55
q-23 -24 -36 -56t-15 -68.5t17 -77.5t59 -76q-117 -38 -190 -131q-60 66 -82.5 158t3 190.5t97.5 172.5q71 74 169.5 102t198 6t172.5 -90q80 -74 110 -174.5t9 -196.5t-84 -167zM249 99q6 -8 8 -9q63 -62 157 -84.5t188.5 -1.5t160.5 80q9 11 8.5 16.5t-8.5 14.5
q-140 156 -340 105q-106 -28 -174 -121zM513 281q54 0 94 39t41 94t-39.5 96t-95.5 41q-55 1 -95.5 -39.5t-40.5 -95.5q-1 -56 39 -95.5t97 -39.5z" />
<glyph glyph-name="shangchuan1" unicode="&#xe672;"
d="M512 896q-138 0 -256 -69t-187 -187t-69 -256t69 -256t187 -187t256 -69t256 69t187 187t69 256t-69 256t-187 187t-256 69zM559 128h-56q-12 0 -23 10.5t-11 23.5t11 23.5t23 10.5h56q13 0 23.5 -10.5t10.5 -23.5t-10.5 -23.5t-23.5 -10.5zM687 401h-94v-107
q0 -12 -8.5 -20.5t-21.5 -8.5h-60q-12 0 -20.5 8.5t-8.5 20.5v107h-103q-12 0 -21 8t-9 18q0 30 13 38l145 162q13 13 30 13t30 -13l145 -162q13 -13 13 -38q-4 -10 -12.5 -18t-17.5 -8z" />
<glyph glyph-name="sousuo-sousuo" unicode="&#xe603;"
d="M691.5 646.5q-91.5 91.5 -221 91.5t-221 -91.5t-91.5 -221t91.5 -221.5t221 -92t221 92t91.5 221.5t-91.5 221zM181.5 136q-56.5 57 -88 131.5t-31.5 157.5q0 111 54.5 205.5t149 149t205.5 54.5t205 -54.5t149 -149t55 -205.5q0 -83 -31.5 -157.5t-88.5 -131.5
t-131.5 -88.5t-157.5 -31.5t-158 31.5t-131.5 88.5zM946 -50q-17 -16 -40 -16t-39 16l-79 79q-17 17 -17 40t16.5 39.5t39.5 16.5t40 -17l79 -79q16 -16 16 -39t-16 -40v0z" />
<glyph glyph-name="shangchuan" unicode="&#xe63a;"
d="M542 144h-60q-12 0 -21 -9t-9 -21.5t9 -21t21 -8.5h60q12 0 21 8.5t9 21t-9 21.5t-21 9zM512 865q-98 0 -187 -38.5t-153.5 -102.5t-102.5 -153t-38 -187t38 -187t102.5 -153t153.5 -102.5t187 -38.5t187 38.5t153 102.5t102.5 153t38.5 187t-38.5 187t-102.5 153
t-153 102.5t-187 38.5zM512 -55q-89 0 -170.5 35t-140 93.5t-93.5 140t-35 170.5t35 170.5t93.5 140t140 93.5t170.5 35t170.5 -35t140 -93.5t93.5 -140t35 -170.5t-35 -170.5t-93.5 -140t-140 -93.5t-170.5 -35zM541 610q-12 13 -28.5 13t-27.5 -13l-140 -162
q-14 -16 -12 -38q2 -11 10 -18.5t20 -7.5h89v-150q0 -13 9 -21.5t21 -8.5h60q12 0 21 8.5t9 21.5v150h91q11 0 19.5 7.5t9.5 18.5q3 22 -11 38z" />
<glyph glyph-name="shoukuan" unicode="&#xe6fd;"
d="M986 269q-20 11 -72.5 -9.5t-105.5 -52t-103.5 -58.5t-64.5 -27q-3 -1 -9.5 -2.5t-27 -2t-42.5 2.5t-54.5 15t-64.5 31q-52 29 -101.5 61t-73.5 50l-24 17q-3 2 -8.5 5t-24 7.5t-37 5t-45 -6.5t-51.5 -23q-17 -12 -36.5 -23t-30 -16.5l-10.5 -5.5v-327q3 4 8.5 9.5
t22.5 20t35.5 25.5t46 20t53.5 9q43 0 121 -26t137 -51.5t56 -25.5q3 -1 9 -3.5t24 -7t35 -6t39 2t40 14.5l378 282q13 6 18 24t-4.5 39t-32.5 33zM582 211q92 0 170 46t124 124t46 169.5t-46 169.5t-124 124t-170 46q-91 0 -169 -44.5t-124 -121t-46 -167.5
q0 -92 46 -171.5t124 -127t169 -47.5zM474 749l115 -154l115 154h64l-141 -192h103q2 0 4 -1.5t2 -3.5v-2v-19q0 -3 -1.5 -4.5t-3.5 -1.5h-1h-122v-45h115q3 0 4.5 -1.5t1.5 -3.5l1 -1v-26q0 -3 -2 -4.5t-3 -1.5h-2h-115v-71q0 -6 -13 -6h-25q-3 0 -6.5 1.5t-4.5 3.5l-2 1
v71h-109q-5 0 -5.5 0.5t-0.5 5.5v19q0 3 1.5 4.5t2.5 1.5l2 1h115v51h-115q-3 0 -4.5 1.5t-1.5 3.5v1v19q0 3 1.5 4.5l2.5 2.5h2h102l-140 192h64z" />
<glyph glyph-name="men" unicode="&#xe6cf;"
d="M501 422q-19 0 -32.5 -11t-13.5 -27t13.5 -27t32.5 -11t32.5 11t13.5 27t-13.5 27t-32.5 11zM760 784h-497q-32 0 -53.5 -16.5t-24.5 -44.5v0v-672q0 -30 22 -48.5t56 -18.5h497q33 0 56 18t23 44v676q0 26 -23 44t-56 18zM578 57q31 5 51.5 25t20.5 45v514
q0 25 -20.5 45t-51.5 25l-243 33h425q20 0 33 -13q8 -8 8 -20v-654q0 -12 -8 -20q-13 -13 -33 -13h-425zM613 125q0 -5 -11.5 -17t-20.5 -14l-353 -51v680l353 -49q9 -2 20.5 -14t11.5 -17v-518z" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -0,0 +1,411 @@
@charset "UTF-8";
@font-face {
font-family: 'iconfont';
src: url('font/iconfont/iconfont.eot?t=1492242939353'); /* IE9*/
src: url('font/iconfont/iconfont.eot?t=1492242939353#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('font/iconfont/element-icons.woff?t=1492242939353') format('woff'), /* chrome, firefox */
url('font/iconfont/element-icons.ttf?t=1492242939353') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('font/iconfont/iconfont.svg?t=1492242939353#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family:"iconfont" !important;
font-size:16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-time:before { content: "\e62f"; }
.icon-richeng:before { content: "\e641"; }
.icon-guanbi:before { content: "\e617"; }
.icon-xiangzuojiantou:before { content: "\e660"; }
.icon-xiangyoujiantou:before { content: "\e65f"; }
body {
margin: 0px;
padding: 0px;
/*background: url(assets/bg1.jpg) center !important;
background-size: cover;*/
background: #ffffff;
font-size: 12px;
-webkit-font-smoothing: antialiased;
}
body, button, input, select, textarea {
font: 400 1em/1.5 PingFang SC,/*Lantinghei SC,Helvetica Neue,*/Microsoft Yahei,Hiragino Sans GB,Microsoft Sans Serif,WenQuanYi Micro Hei,sans;
}
ul,li,dl,dt,dd{ margin:0; padding:0; list-style:none;}
em,i{ font-style:normal; margin:0; padding:0;}
h1,h2,h3,h4,h5,p{ margin:0; padding:0;}
a{ cursor: pointer;}
.full-jcalendar{
position: relative;
font-size: 14px;
display: inline-block;
}
.full-jcalendar .input-icon{
position: absolute;
width: 28px;
height: 100%;
right: 0;
top: 5px;
text-align: center;
color: #e8a400;
transition: all .3s;
}
.full-jcalendar .input-icon .iconfont{
font-size: 18px;
}
.full-jcalendar .input-icon .iconfont.is-clear{
color:#999;
font-weight: bolder;
}
.full-jcalendar .input-icon__tip{
position: absolute;
right:28px;
top:10px;
width:16px;
cursor: default;
text-align: center;
}
.full-jcalendar .input-icon__tip i{
display: block;
margin:0;
padding:0;
width:16px;
height:16px;
background-color: #ff5a00;
border-radius: 8px;
font-size: 12px;
color:#fff;
line-height: 16px;
text-align: center;
overflow: hidden;
}
.full-jcalendar .input__inner{
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-color: #fff;
background-image: none;
border-radius: 5px;
border: 1px solid #bfcbd9;
box-sizing: border-box;
color: #1f2d3d;
display: inline-block;
font-size: inherit;
height: 36px;
line-height: 1;
outline: none;
padding: 3px 10px;
transition: border-color .2s cubic-bezier(.645,.045,.355,1);
min-width:193px;
width: 100%;
}
.full-jcalendar .input__inner:focus{
outline: none;
border-color:#20a0ff;
}
.full-jcalendar .input__inner:hover{
border-color:#8391a5;
}
.input-icon+.input__inner{
padding-right:28px;
}
.input-icon__tip+.input__inner{
padding-right:35px;
}
.full-jcalendar input.input__inner::placeholder, .full-jcalendar input.input__inner:-moz-placeholder{
color:#97A8BE;
}
.full-jcalendar input.is-disabled{
background-color: #eef1f6;
border-color: #d1dbe5;
color: #bbb;
cursor: not-allowed;
}
.full-jcalendar .is-disabled i{
color: #bbb;
}
.full-jcalendar .is-disabled *{
cursor: not-allowed;
}
.full-jcalendar__main{
cursor: pointer;
position: absolute;
z-index: 1670;
left:2px;
top:38px;
width:296px;
background-color: #ffffff;
border-radius: 5px;
-moz-box-shadow:2px 2px 5px #C9C9C9;
-webkit-box-shadow:2px 2px 5px #C9C9C9;
box-shadow:2px 2px 5px #C9C9C9;
overflow: hidden;
}
.full-jcalendar__main.is-daterange{
width:593px;
}
.full-jcalendar__main .date-range__month{
float: left;
width:296px;
overflow: hidden;
}
.full-jcalendar__main .date-range__month.leftMonth{
border-right:1px solid #F8F8F8;
}
.full-jcalendar-header{
position: relative;
width:100%;
padding:5px 0;
height:24px;
font-size: 14px;
text-align: center;
line-height: 24px;
color:#333;
}
.full-jcalendar-header span{ display: inline-block;}
.full-jcalendar-header .title-year:hover,.full-jcalendar-header .title-month:hover{
color:#50bfff;
}
.date-range__month .full-jcalendar-header .title-year:hover,.date-range__month .full-jcalendar-header .title-month:hover{
color:#333;
}
.full-jcalendar-header .prev-month,.full-jcalendar-header .next-month {
cursor: pointer;
line-height: 20px;
text-align: center;
color: #E1CEB7;
font-size: 20px;
}
.full-jcalendar-header p.prev-month{
position: absolute;
z-index: 1676;
left:5px;
top:5px;
}
.full-jcalendar-header p.next-month {
position: absolute;
z-index: 1676;
right: 5px;
top: 5px;
}
.date-range__month .full-jcalendar-header .prev-year{
position: absolute;
z-index: 1676;
left: 5px;
top: 5px;
}
.date-range__month .full-jcalendar-header .prev-month{
left:35px;
}
.date-range__month .full-jcalendar-header .next-year{
position: absolute;
z-index: 1676;
right: 5px;
top: 5px;
}
.date-range__month .full-jcalendar-header .next-month{
right:35px;
}
.full-jcalendar__body {
margin: 0;
padding: 0;
width: 100%;
height: 280px;
position: relative;
}
.full-jcalendar__body ul,.full-jcalendar__body p {
margin: 0;
padding: 0;
}
.full-jcalendar__body .weeks {
width: 100%;
height: 30px;
display: flex;
border-top: 1px solid #F8F8F8;
}
.full-jcalendar__body .weeks .week {
flex: 1;
text-align: center;
font-size: 14px;
color: #8391A5;
line-height: 30px;
border: none;
}
.full-jcalendar__body .weeks .week strong {
font-weight: normal;
}
.full-jcalendar__body .week-row {
display: flex;
width:100%;
}
.full-jcalendar__body .week-row .day-cell {
position: relative;
flex: 1;
padding: 2px;
border: 1px solid #F8F8F8;
margin-right: -1px;
margin-bottom: -1px;
text-align: center;
}
.full-jcalendar__body .day-cell .day-number .lunar {
font-size: 12px;
color: #ACACAC;
}
.full-jcalendar__body .day-cell .day-number .solar {
font-size: 12px;
color: #483a32;
/*text-shadow: 1px 1px 1px #ddd;*/
}
/*.full-jcalendar__body .day-cell.not-cur-month .solar {*/
/*text-shadow: none;*/
/*}*/
.full-jcalendar__body .day-cell .day-number .solar .is-leap {
display: inline-block;
width:14px;
height:14px;
border-radius: 7px;
background-color: #f00;
font-size: 12px;
color: #fff;
text-align: center;
line-height: 14px;
}
.full-jcalendar__body .day-cell .day-number .term {
fontsize:12px;
color: #FFC200;
}
.full-jcalendar__body .day-cell .day-number .festival {
fontsize:12px;
color: #ff8610;
}
.full-jcalendar__body .day-cell .day-number .is-today {
font-size: 12px;
color: #20a0ff;
}
.full-jcalendar__body .day-cell .day-number .is-empty {
line-height: 34px;
}
.full-jcalendar__body .day-cell.today {
background-color: #FBF9F6;
}
.full-jcalendar__body .day-cell.today:before {
content: " ";
position: absolute;
top: 0;
right: 0;
width: 0;
height: 0;
border-top: .5em solid #20a0ff;
border-left: .5em solid transparent;
}
.full-jcalendar__body .day-cell.choose {
background-color: #d2ecff;
}
.full-jcalendar__body .day-cell.select {
background-color: #009bfe;
}
.full-jcalendar__body .day-cell.select .lunar,
.full-jcalendar__body .day-cell.select .solar,
.full-jcalendar__body .day-cell.select .term ,
.full-jcalendar__body .day-cell.select .festival ,
.full-jcalendar__body .day-cell.select .is-today{
color: #fff;
}
.full-jcalendar__body .day-cell.select .solar .is-leap {
background: none;
}
.full-jcalendar__body .day-cell.not-cur-month .lunar
,.full-jcalendar__body .day-cell.not-cur-month .solar
,.full-jcalendar__body .day-cell.not-cur-month .term
,.full-jcalendar__body .day-cell.not-cur-month .festival{
color: #ddd;
}
.full-jcalendar__body .day-cell:hover {
background-color: #ECF1F4;
}
.full-jcalendar__body .day-cell.choose:hover {
background-color: #009bfe;
}
.full-jcalendar__body .day-cell.choose:hover .lunar,
.full-jcalendar__body .day-cell.choose:hover .solar,
.full-jcalendar__body .day-cell.choose:hover .term ,
.full-jcalendar__body .day-cell.choose:hover .festival ,
.full-jcalendar__body .day-cell.choose:hover .is-today{
color: #fff;
}
.full-jcalendar__body .select:hover{
background-color: #009bfe;
}
.full-jcalendar__body .day-cell.not-optional{
background-color: #ECF1F4;
}
.full-jcalendar__month,.full-jcalendar__year{
position: absolute;
z-index: 1677;
top:0;
left:0;
width:100%;
height:100%;
background-color: #fff;
}
.full-jcalendar__body .close{
position: absolute;
bottom:10px;
right:10px;
padding:3px 5px;
font-size:12px;
background-color: #FBF8FF;
border:1px solid #F8F8F8;
border-radius: 3px;
}
.full-jcalendar__body .data-list{
list-style: none;
margin:auto;
padding:20px 0 0 0;
width:85%;
}
.full-jcalendar__body .data-list li{
position: relative;
list-style: none;
line-height: normal;
float: left;
width:25%;
text-align: center;
padding:5px 0;
margin:10px 0;
font-size:14px;
color:#333;
}
.full-jcalendar__body .data-list li:hover ,.full-jcalendar__body .data-list li.select-year {
background-color: #50bfff;
color: #fff;
}
.full-jcalendar__body .data-list li.curr-year:before {
content: " ";
position: absolute;
top: 0;
right: 0;
width: 0;
height: 0;
border-top: .5em solid #20a0ff;
border-left: .5em solid transparent;
}
.full-jcalendar__body .clearfix{
float: none;
width:100%;
clear: both;
height:0px;
line-height: 0px;
}

View File

@@ -51,6 +51,7 @@
src="/static/videos/login.webm"
muted
autoplay
id="video"
loop
style="
user-select: none;
@@ -338,7 +339,8 @@ export default {
SysUserSocialTypeEnum: SystemUserSocialTypeEnum,
};
},
created() {
created() {
// 租户开关
this.tenantEnable = getTenantEnable();
if (this.tenantEnable) {
@@ -356,8 +358,15 @@ export default {
this.redirect = this.$route.query.redirect
? decodeURIComponent(this.$route.query.redirect)
: undefined;
this.getCookie();
},
this.getCookie();
},
mounted () {
const video = document.getElementById('video');
// 设置为0.5倍速数值越小速度越慢0.5为半速0.75为0.75倍速等)
video.playbackRate = 0.2;
},
methods: {
getCode() {
// 情况一,未开启:则直接登录

Some files were not shown because too many files have changed in this diff Show More