Commit 4ab54a96 authored by 李苏's avatar 李苏 💬

调整

parent 247c4bee
...@@ -337,6 +337,34 @@ export const powerRoutes = [ ...@@ -337,6 +337,34 @@ export const powerRoutes = [
name: 'cneacpip', name: 'cneacpip',
path: "cneacpip", path: "cneacpip",
}, },
{
erpComponent: false,
component: 'ywxxgl/jdysqgl/index',
hidden: false,
meta: {
"title": "监督员授权管理",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920050900',
},
name: 'jdysqgl',
path: "jdysqgl",
},
{
erpComponent: false,
component: 'ywxxgl/jdlcdxgsjs/index',
hidden: false,
meta: {
"title": "季度、轮次大修工时计算",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920050930',
},
name: 'jdlcdxgsjs',
path: "jdlcdxgsjs",
},
{ {
erpComponent: false, erpComponent: false,
component: 'ywxxgl/gshbmjby/index', component: 'ywxxgl/gshbmjby/index',
...@@ -351,6 +379,21 @@ export const powerRoutes = [ ...@@ -351,6 +379,21 @@ export const powerRoutes = [
name: 'gshbmjby', name: 'gshbmjby',
path: "gshbmjby", path: "gshbmjby",
}, },
{
erpComponent: false,
component: 'ywxxgl/rydgzzqrd/index',
hidden: false,
meta: {
"title": "人员到岗资质确认单",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920050950',
},
name: 'rydgzzqrd',
path: "rydgzzqrd",
},
{ {
erpComponent: false, erpComponent: false,
component: 'ywxxgl/ywsjgl/index', component: 'ywxxgl/ywsjgl/index',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: lisu lisu@gavelinfo.com * @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:47:46 * @Date: 2024-09-19 10:47:46
* @LastEditors: lisu lisu@gavelinfo.com * @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-29 10:00:32 * @LastEditTime: 2024-10-29 11:05:32
* @FilePath: /zghywpc-vue/src/views/ywxxgl/gshbmjby/edit.vue * @FilePath: /zghywpc-vue/src/views/ywxxgl/gshbmjby/edit.vue
--> -->
<template> <template>
...@@ -152,9 +152,9 @@ ...@@ -152,9 +152,9 @@
prop: 'qtrid', prop: 'qtrid',
span: 24, span: 24,
type: 'RelMulSelect', type: 'RelMulSelect',
value: [], value: '',
typeConfig: { typeConfig: {
valueType: 'array', valueType: 'string',
src: "kzzx/user/query", src: "kzzx/user/query",
"match": { "match": {
"value": "id", "value": "id",
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>
<!--
* @Description:生成基础baseEdit组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:47:46
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-29 10:16:41
* @FilePath: /zghywpc-vue/src/views/ywxxgl/jdlcdxgsjs/edit.vue
-->
<template>
<!-- prop 穿透赋值 -->
<BaseEdit v-bind="$attrs" :config='editConfig'>
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.editPage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面从表上方插槽 ctx.editPage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.editPage)" size='mini' type="primary">示例按钮</el-button> -->
<!-- <AuxButton :dynamic='true' :queryParams="{
sbxxTreeId:that.form.sbxxTreeId,
zt:'N'
}" :component='Qxsj' rename='选择缺陷数据' code='dynamic' @save="saveQxsj" /> -->
</template>
</BaseEdit>
</template>
<script>
export default {
data() {
return {
editConfig: {
/* 生成form表单 */
editColItemList: [{
"label": "年度",
"prop": "year",
"span": 12,
"type": "year", // 对于整型字段,一般使用input类型
value:new Date().getFullYear(),
"required": true,
},
{
label: '季度',
prop: 'jd',
span: 12,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
optionsData:[
{
id: 1,
name: '第一季度'
},
{
id: 2,
name: '第二季度'
},
{
id: 3,
name: '第三季度'
},
{
id: 4,
name: '第四季度'
}
],
"match": {
"value": "id",
"label": "name"
}
},
value:this.getQuarterFromTimestamp(new Date().getTime())
},
{
"label": "大修",
"prop": "dx",
"span": 12,
"type": "input", // 未标明特殊类型或ftString类型默认为input
"value": "" // 默认值,如果需要可以移除或修改
},
{
"label": "服务名称",
"prop": "fwmc",
"span": 12,
"type": "input", // 未标明特殊类型或ftString类型默认为input
"value": "" // 默认值,如果需要可以移除或修改
},
{
"label": "服务开始时间",
"prop": "fwkssj",
"span": 12,
"type": "datetime", // ftDateTime类型转换为datetime
"value": "" // 默认值,如果需要可以移除或修改
},
{
"label": "服务结束时间",
"prop": "fwjssj",
"span": 12,
"type": "datetime", // ftDateTime类型转换为datetime
"value": "" // 默认值,如果需要可以移除或修改
},
{
"label": "服务量",
"prop": "fwl",
"span": 24,
"type": "input", // 未标明特殊类型或ftString类型默认为input
"value": "" // 默认值,如果需要可以移除或修改
},
{
"label": "合计",
"prop": "hj",
"span": 24,
"type": "input", // 未标明特殊类型或ftString类型默认为input
"value": "" // 默认值,如果需要可以移除或修改
},
{
"label": "备注",
"prop": "bz",
"span": 24,
"type": "input", // 未标明特殊类型或ftString类型默认为input
"value": "" // 默认值,如果需要可以移除或修改
}
],
/* 生成主从表,为空数组默认不展示 */
editTableTitle: [
// {
// title: "序号",
// field: "xh",
// width: 50,
// align: "center"
// },
// {
// title: "点检部位",
// field: "bw",
// width: 180,
// },
// {
// title: "点检项目",
// field: "project",
// width: 160
// },
// {
// title: "点检标准",
// field: "standard",
// width: 140
// },
],
/* 子表名,可选 同editTableTitle一起用*/
detailTable: ''
}
}
},
methods: {
getQuarterFromTimestamp(timestamp) {
const date = new Date(timestamp);
const month = date.getMonth(); // 月份从0开始,0表示1月,11表示12月
let quarter;
if (month >= 0 && month < 3) {
quarter = 1; // 第1季度
} else if (month >= 3 && month < 6) {
quarter = 2; // 第2季度
} else if (month >= 6 && month < 9) {
quarter = 3; // 第3季度
} else {
quarter = 4; // 第4季度
}
return quarter;
}
/**
* @description:示例按钮
* @param {*} ctx操作edit实例内容
* @return {*}
* @author: lisu
*/
// demo(ctx){}
}
}
</script>
<style>
</style>
<!--
* @Description: 生成基础basePage组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:55:27
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-29 10:19:18
* @FilePath: /zghywpc-vue/src/views/ywxxgl/jdlcdxgsjs/index.vue
-->
<template>
<BasePage class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
name: 'jdlcdxgsjs',
data() {
return {
config: {
/* 基本配置*/
url: 'ywxxgl/ujdlcdxgsjs',
tableTitle: [{
label: "年度",
prop: "year",
fieldType: "int"
},
{
label: "季度",
prop: "jd",
fieldType: "int"
},
{
label: "大修",
prop: "dx",
fieldType: "ftString",
width: 300
},
{
label: "服务名称",
prop: "fwmc",
fieldType: "ftString",
width: 300
},
{
label: "服务开始时间",
prop: "fwkssj",
fieldType: "ftDateTime"
},
{
label: "服务结束时间",
prop: "fwjssj",
fieldType: "ftDateTime"
},
{
label: "服务量",
prop: "fwl",
fieldType: "ftString",
width: 192
},
{
label: "合计",
prop: "hj",
fieldType: "ftString",
width: 300
},
{
label: "备注",
prop: "bz",
fieldType: "ftString",
width: 300
},
{
label: "维护人",
prop: "whr",
fieldType: "ftString"
},
{
label: "维护时间",
prop: "whsj",
fieldType: "ftDateTime"
},
{
label: "创建人",
prop: "cjr",
fieldType: "ftString"
},
{
label: "创建时间",
prop: "cjsj",
fieldType: "ftDateTime"
},
],
queryParams: [
[{
label: '年份',
prop: 'year',
span: 6,
type: 'year',
value: new Date().getFullYear()
},
{
label: '季度',
prop: 'jd',
span: 6,
type: 'RelSelect',
typeConfig: {
optionsData: [{
id: 1,
name: '第一季度'
},
{
id: 2,
name: '第二季度'
},
{
id: 3,
name: '第三季度'
},
{
id: 4,
name: '第四季度'
}
]
},
value: (() => {
const now = new Date();
const month = now
.getMonth();
let quarter;
if (month >= 0 && month < 3) {
quarter = 1;
} else if (month >= 3 && month < 6) {
quarter = 2;
} else if (month >= 6 && month < 9) {
quarter = 3;
} else {
quarter = 4;
}
return quarter;
})(),
}
]
],
/* 默认启停用 */
}
}
},
methods: {
/**
* @description:示例按钮
* @param {*} ctx操作basePage实例内容
* @return {*}
* @author: lisu
*/
// demo(ctx){}
},
components: {
Edit
}
}
</script>
<style>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>
<!--
* @Description:生成基础baseEdit组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:47:46
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-29 10:27:27
* @FilePath: /zghywpc-vue/src/views/ywxxgl/jdysqgl/edit.vue
-->
<template>
<!-- prop 穿透赋值 -->
<BaseEdit v-bind="$attrs" :config='editConfig'>
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.editPage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面从表上方插槽 ctx.editPage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.editPage)" size='mini' type="primary">示例按钮</el-button> -->
<!-- <AuxButton :dynamic='true' :queryParams="{
sbxxTreeId:that.form.sbxxTreeId,
zt:'N'
}" :component='Qxsj' rename='选择缺陷数据' code='dynamic' @save="saveQxsj" /> -->
</template>
</BaseEdit>
</template>
<script>
export default {
data() {
return {
editConfig: {
/* 生成form表单 */
editColItemList: [{
"label": "员工号",
"prop": "ygh",
"span": 12, // 假设使用12栅格系统
"type": "input", // ftString类型默认为input输入框
"style": {
"width": "240px" // 保留原始width属性,并转换为样式对象(可选)
},
"value": "" // 默认值,可以根据需要移除或修改
},
{
"label": "姓名",
"prop": "name",
"span": 12,
"type": "input",
"style": {
"width": "192px"
},
"value": ""
},
{
"label": "授权等级",
"prop": "sqdj",
"span": 12,
"type": "input",
"style": {
"width": "192px"
},
"value": ""
},
{
"label": "最新授权时间",
"prop": "zxsqsj",
"span": 12,
"type": "datetime", // ftDateTime类型转换为datetime选择器
"value": ""
},
{
"label": "FME监督员授权时间",
"prop": "jdysqsj",
"span": 12,
"type": "datetime",
"value": ""
},
{
"label": "FME主管监督员授权时间",
"prop": "zgjdysqsj",
"span": 12,
"type": "datetime",
"value": ""
},
{
"label": "FME高级主管监督员授权时间",
"prop": "gjzgjdysqsj",
"span": 12,
"type": "datetime",
"value": ""
},
{
"label": "有效期",
"prop": "yxq",
"span": 12,
"type": "input",
"value": ""
}
],
/* 生成主从表,为空数组默认不展示 */
editTableTitle: [
// {
// title: "序号",
// field: "xh",
// width: 50,
// align: "center"
// },
// {
// title: "点检部位",
// field: "bw",
// width: 180,
// },
// {
// title: "点检项目",
// field: "project",
// width: 160
// },
// {
// title: "点检标准",
// field: "standard",
// width: 140
// },
],
/* 子表名,可选 同editTableTitle一起用*/
detailTable: ''
}
}
},
methods: {
/**
* @description:示例按钮
* @param {*} ctx操作edit实例内容
* @return {*}
* @author: lisu
*/
// demo(ctx){}
}
}
</script>
<style>
</style>
<!--
* @Description: 生成基础basePage组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:55:27
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-29 10:53:23
* @FilePath: /zghywpc-vue/src/views/ywxxgl/jdysqgl/index.vue
-->
<template>
<BasePage labelWidth='130px' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
name: 'jdysqgl',
data() {
return {
config: {
/* 基本配置*/
url: 'ywxxgl/ujdysq',
tableTitle: [{
label: "员工号",
prop: "ygh",
fieldType: "ftString",
width: 240
},
{
label: "姓名",
prop: "name",
fieldType: "ftString",
width: 192
},
{
label: "授权等级",
prop: "sqdj",
fieldType: "ftString",
width: 192
},
{
label: "最新授权时间",
prop: "zxsqsj",
fieldType: "ftDateTime"
},
{
label: "FME监督员授权时间",
prop: "jdysqsj",
fieldType: "ftDateTime"
},
{
label: "FME主管监督员授权时间",
prop: "zgjdysqsj",
fieldType: "ftDateTime"
},
{
label: "FME高级主管监督员授权时间",
prop: "gjzgjdysqsj",
fieldType: "ftDateTime"
},
{
label: "有效期",
prop: "yxq",
fieldType: "ftString",
width: 192
},
{
label: "维护人",
prop: "whr",
fieldType: "ftString"
},
{
label: "维护时间",
prop: "whsj",
fieldType: "ftDateTime"
},
{
label: "创建人",
prop: "cjr",
fieldType: "ftString"
},
{
label: "创建时间",
prop: "cjsj",
fieldType: "ftDateTime"
},
],
queryParams: [
[{
label: '员工号',
prop: 'ygh',
span: 6,
type: 'input',
value: ''
},
{
label: '姓名',
prop: 'name',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
/**
* @description:示例按钮
* @param {*} ctx操作basePage实例内容
* @return {*}
* @author: lisu
*/
// demo(ctx){}
},
components: {
Edit
}
}
</script>
<style>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>
<!--
* @Description:生成基础baseEdit组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:47:46
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-29 10:51:21
* @FilePath: /zghywpc-vue/src/views/ywxxgl/rydgzzqrd/edit.vue
-->
<template>
<!-- prop 穿透赋值 -->
<BaseEdit labelWidth='140px' v-bind="$attrs" :config='editConfig'>
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.editPage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面从表上方插槽 ctx.editPage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.editPage)" size='mini' type="primary">示例按钮</el-button> -->
<!-- <AuxButton :dynamic='true' :queryParams="{
sbxxTreeId:that.form.sbxxTreeId,
zt:'N'
}" :component='Qxsj' rename='选择缺陷数据' code='dynamic' @save="saveQxsj" /> -->
</template>
</BaseEdit>
</template>
<script>
export default {
data() {
return {
editConfig: {
/* 生成form表单 */
editColItemList: [
{
"label": "员工号",
"prop": "ygh",
"span": 12,
"type": "input",
required: true,
},
{
"label": "姓名",
"prop": "name",
"span": 12,
"type": "input",
required: true,
},
{
"label": "身份证",
"prop": "sfz",
"span": 12,
"type": "input"
},
{
"label": "大修轮次",
"prop": "dxlc",
"span": 12,
"type": "input"
},
{
"label": "学历",
"prop": "xueli",
"span": 12,
"type": "input"
},
{
"label": "核电工龄",
"prop": "hdgl",
"span": 12,
"type": "input" // Note: 对于整数类型,这里默认按字符串输入框处理,如果有特殊需求可以改为数字输入框
},
{
"label": "是否乙方合同人员",
"prop": "sfyfhtry",
"span": 12,
"type": "checkbox",
"value": 'N'
},
{
"label": "是否具备工作负责人或QC资质",
"prop": "sfjbgzfzrhqczz",
"span": 12,
"type": "checkbox",
"value": 'N'
},
{
"label": "是否具备班长资质",
"prop": "sfjbbzzz",
"span": 12,
"type": "checkbox",
"value": 'N'
},
{
"label": "FME监督员授权",
"prop": "jdysq",
"span": 12,
"type": "checkbox",
"value": 'N'
},
{
"label": "证明材料是否具备",
"prop": "zmclsfjb",
"span": 12,
"type": "checkbox",
"value": 'N'
}
],
/* 生成主从表,为空数组默认不展示 */
editTableTitle: [
// {
// title: "序号",
// field: "xh",
// width: 50,
// align: "center"
// },
// {
// title: "点检部位",
// field: "bw",
// width: 180,
// },
// {
// title: "点检项目",
// field: "project",
// width: 160
// },
// {
// title: "点检标准",
// field: "standard",
// width: 140
// },
],
/* 子表名,可选 同editTableTitle一起用*/
detailTable: ''
}
}
},
methods: {
/**
* @description:示例按钮
* @param {*} ctx操作edit实例内容
* @return {*}
* @author: lisu
*/
// demo(ctx){}
}
}
</script>
<style>
</style>
<!--
* @Description: 生成基础basePage组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:55:27
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-29 10:52:27
* @FilePath: /zghywpc-vue/src/views/ywxxgl/rydgzzqrd/index.vue
-->
<template>
<BasePage class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
name: 'rydgzzqrd',
data() {
return {
config: {
/* 基本配置*/
url: 'ywxxgl/urydgzzqrd',
tableTitle: [{
label: "员工号",
prop: "ygh",
fieldType: "ftString",
width: 192
},
{
label: "姓名",
prop: "name",
fieldType: "ftString",
width: 192
},
{
label: "身份证",
prop: "sfz",
fieldType: "ftString",
width: 192
},
{
label: "大修轮次",
prop: "dxlc",
fieldType: "ftString",
width: 300
},
{
label: "学历",
prop: "xueli",
fieldType: "ftString",
width: 192
},
{
label: "核电工龄",
prop: "hdgl",
fieldType: "int"
},
{
label: "是否乙方合同人员",
prop: "sfyfhtry",
fieldType: "checkbox",
width: 192
},
{
label: "是否具备工作负责人或QC资质",
prop: "sfjbgzfzrhqczz",
fieldType: "checkbox",
width: 210
},
{
label: "是否具备班长资质",
prop: "sfjbbzzz",
fieldType: "checkbox",
width: 192
},
{
label: "FME监督员授权",
prop: "jdysq",
fieldType: "checkbox",
width: 192
},
{
label: "证明材料是否具备",
prop: "zmclsfjb",
fieldType: "checkbox",
width: 192
},
{
label: "维护人",
prop: "whr",
fieldType: "ftString"
},
{
label: "维护时间",
prop: "whsj",
fieldType: "ftDateTime"
},
{
label: "创建人",
prop: "cjr",
fieldType: "ftString"
},
{
label: "创建时间",
prop: "cjsj",
fieldType: "ftDateTime"
},
],
queryParams: [
[{
label: '员工号',
prop: 'ygh',
span: 6,
type: 'input',
value: ''
},
{
label: '姓名',
prop: 'name',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
/**
* @description:示例按钮
* @param {*} ctx操作basePage实例内容
* @return {*}
* @author: lisu
*/
// demo(ctx){}
},
components: {
Edit
}
}
</script>
<style>
</style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: lisu lisu@gavelinfo.com * @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:55:27 * @Date: 2024-09-19 10:55:27
* @LastEditors: lisu lisu@gavelinfo.com * @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-28 14:18:07 * @LastEditTime: 2024-10-29 10:17:27
* @FilePath: /zghywpc-vue/src/views/ywxxgl/ywjdzb/index.vue * @FilePath: /zghywpc-vue/src/views/ywxxgl/ywjdzb/index.vue
--> -->
<template> <template>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
prop: 'year', prop: 'year',
span: 6, span: 6,
type: 'year', type: 'year',
value: '' value: new Date().getFullYear()
}, },
{ {
label: '季度', label: '季度',
...@@ -117,6 +117,23 @@ ...@@ -117,6 +117,23 @@
} }
] ]
}, },
value: (() => {
const now = new Date();
const month = now
.getMonth();
let quarter;
if (month >= 0 && month < 3) {
quarter = 1;
} else if (month >= 3 && month < 6) {
quarter = 2;
} else if (month >= 6 && month < 9) {
quarter = 3;
} else {
quarter = 4;
}
return quarter;
})(),
} }
] ]
...@@ -128,6 +145,16 @@ ...@@ -128,6 +145,16 @@
}, },
methods: { methods: {
getCurrentQuarterMonthsSimplified(month) {
const quarterOffset = Math.floor(month / 3); // 直接计算季度偏移量
const startMonth = quarterOffset * 3 + 1; // 季度的起始月份(1-based)
const endMonth = startMonth + 2; // 季度的结束月份(对于非12月的情况)
// 特别处理12月的情况
if (month === 11) {
return ['10', '11', '12'];
}
return [startMonth, startMonth + 1, endMonth].map(m => m.toString().padStart(2, '0'));
},
/** /**
* @description:示例按钮 * @description:示例按钮
* @param {*} ctx操作basePage实例内容 * @param {*} ctx操作basePage实例内容
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment