From ba77fdc6a30c9ad0941e40319f8c4f6fe6fdf9f1 Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期四, 07 八月 2025 10:30:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue |  307 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 307 insertions(+), 0 deletions(-)

diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue
new file mode 100644
index 0000000..0d19c1a
--- /dev/null
+++ b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarAddCon.vue
@@ -0,0 +1,307 @@
+<template>
+  <div ref="device">
+    <a-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" :getContainer="() => this.$refs.device"
+             :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
+
+        <a-row type="flex" :gutter="24">
+          <a-col :md="5">
+            <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
+          </a-col>
+          <a-col :md="19">
+            <device-calendar-add-tree></device-calendar-add-tree>
+            <!--<a-spin :spinning="confirmLoading">-->
+          <!--<a-form :form="form">-->
+          <!--<a-row :gutter="24">-->
+            <!--<a-col :span="12">-->
+              <!--<a-form-item label="鐢熸晥鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
+                <!--<a-date-picker v-decorator="['takeEffectDate',validatorRules.takeEffectDate]" :disabled="disableSubmit"-->
+                               <!--:readOnly="disableSubmit" :disabledDate="disabledDate"/>-->
+              <!--</a-form-item>-->
+            <!--</a-col>-->
+            <!--<a-col :span="12">-->
+              <!--<a-form-item label="澶辨晥鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
+                <!--<a-date-picker v-decorator="['invalidDate',validatorRules.invalidDate]" :disabled="disableSubmit"-->
+                               <!--:readOnly="disableSubmit" :disabledDate="disabledDate"/>-->
+              <!--</a-form-item>-->
+            <!--</a-col>-->
+          <!--</a-row>-->
+          <!--<a-row :gutter="24">-->
+            <!--<a-col :span="12">-->
+              <!--<a-form-item label="鐝埗鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
+                <!--<a-select v-decorator="['shiftId', validatorRules.shiftId]" placeholder="璇烽�夋嫨鐝埗"-->
+                          <!--@change="initShiftSubList">-->
+                  <!--<a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.id">-->
+                    <!--{{ em.shiftName }}-->
+                  <!--</a-select-option>-->
+                <!--</a-select>-->
+              <!--</a-form-item>-->
+            <!--</a-col>-->
+            <!--<a-col :span="12">-->
+              <!--<a-form-item label="鏄熸湡閫夋嫨" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
+                <!--<a-select v-decorator="['weekId', validatorRules.weekId]" placeholder="璇烽�夋嫨鏄熸湡"-->
+                          <!--@change="weekChange"  mode="multiple">-->
+                  <!--<a-select-option v-for="(em,index) in weekList" :key="index" :value="em.id">-->
+                    <!--{{ em.name }}-->
+                  <!--</a-select-option>-->
+                <!--</a-select>-->
+              <!--</a-form-item>-->
+            <!--</a-col>-->
+          <!--</a-row>-->
+
+        <!--</a-form>-->
+            <!--</a-spin>-->
+          </a-col>
+        </a-row>
+
+    </a-modal>
+  </div>
+</template>
+
+<script>
+  import BaseTree from '../../../common/BaseTree'
+  import DeviceCalendarAddTree from './DeviceCalendarAddTree'
+  import moment from 'moment'
+  import pick from 'lodash.pick'
+  import {
+    getAction,
+    postAction,
+    requestPut
+  } from '@/api/manage'
+  import {
+    duplicateCheck
+  } from '@/api/api'
+  import AFormItem from 'ant-design-vue/es/form/FormItem'
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  export default {
+    name: 'DeviceCalendarAddCon',
+    mixins: [JeecgListMixin],
+    components: { AFormItem,BaseTree,DeviceCalendarAddTree},
+    props: {node:{}},
+    data() {
+      return {
+        weekList:[
+          {
+            id:0,
+            name:"鏄熸湡澶�"
+          },
+          {
+            id:1,
+            name:"鏄熸湡涓�"
+          },
+          {
+            id:2,
+            name:"鏄熸湡浜�"
+          },
+          {
+            id:3,
+            name:"鏄熸湡涓�"
+          },
+          {
+            id:4,
+            name:"鏄熸湡鍥�"
+          },
+          {
+            id:5,
+            name:"鏄熸湡浜�"
+          },
+          {
+            id:6,
+            name:"鏄熸湡鍏�"
+          }
+
+        ],
+        title: '',
+        isDaySpan: false,
+        visible: false,
+        show: false,
+        model: {},
+        checked: false,
+
+
+        url: {
+          list: '/mdc/mdcequipment/findListEquipment',
+          add: '/mdc/mdcshiftsub/add',
+          edit: '/mdc/mdcshiftsub/edit',
+          initShiftList: '/mdc/mdcshift/initShiftList',
+          initShiftSubList: '/mdc/mdcshiftsub/initShiftSubList',
+          getShiftSubById: '/mdc/mdcshiftsub/getShiftSubById',
+          settingCalendar: '/mdc/mdcdevicecalendar/settingCalendar',
+        },
+        shiftList: [],
+        shiftSubList: [],
+        disableSubmit: true,
+        selectEquementId:{}
+      }
+    },
+    created() {
+    },
+    // watch:{
+    //   node(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
+    //     if (JSON.stringify(val) != '{}') {
+    //       // if (val.entity.equipmentId) {
+    //       //   this.queryParams.equipmentName = val.entity.equipmentName
+    //       //   this.queryParams.parentId = ''
+    //       //   this.queryParams.equipmentId = val.entity.equipmentId
+    //       // } else {
+    //       //   this.queryParams.parentId = val.entity.id
+    //       //   this.queryParams.equipmentId = ''
+    //       //   this.queryParams.equipmentName = ''
+    //       // }
+    //       // this.searchQuery()
+    //     }
+    //   }
+    // },
+    methods: {
+      changeSelection(val) {
+        this.selectEquementId = val
+      },
+      // close() {
+      //   this.$emit('close')
+      //   this.visible = false
+      // },
+      // handleCancel() {
+      //   this.close()
+      // },
+      // handleOk() {
+      //   // this.selectionRows =  this.SelectedList;
+      //   // console.log(this.selectionRows);
+      //   this.$emit('sendSelectionRows', this.selectionRows)
+      //   this.close()
+      // },
+      disabledDate(current){
+        //Can not slect days before today and today
+        return current && current < moment().endOf("day");
+      },
+      initShiftList() {
+        getAction(this.url.initShiftList).then((res) => {
+          if (res.success) {
+            this.shiftList = res.result
+          }
+        })
+      },
+      weekChange(shiftId) {
+        // getAction(this.url.initShiftSubList, { shiftId, shiftId }).then((res) => {
+        //   if (res.success) {
+        //     this.shiftSubList = res.result
+        //   }
+        // })
+      },
+      add(record) {
+        // let _this = this
+        // this.visible = true
+        // this.form.resetFields()
+        // this.model = Object.assign({}, record)
+        // this.initShiftList()
+        // this.$nextTick(() => {
+        //   this.form.setFieldsValue(pick(this.model, 'equmentName'))
+        //   this.form.setFieldsValue({
+        //     takeEffectDate: moment(),
+        //     invalidDate: moment().endOf('month')
+        //   })
+        // })
+      },
+      close() {
+        this.$emit('close')
+        this.visible = false
+        this.show = false
+      },
+      handleOk() {
+        const that = this
+        // 瑙﹀彂琛ㄥ崟楠岃瘉
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true
+            let formData = Object.assign(this.model, values)
+            postAction(this.url.settingCalendar, formData).then((res) => {
+              if (res.success) {
+                // that.$message.success(res.message)
+                that.$notification.success({
+                  message:'娑堟伅',
+                  description:res.message
+                });
+                that.$emit('ok', res.result)
+              } else {
+                // that.$message.warning(res.message)
+                that.$notification.warning({
+                  message:'娑堟伅',
+                  description:res.message
+                });
+              }
+            }).finally(() => {
+              that.confirmLoading = false
+              that.close()
+            })
+          }
+        })
+      },
+      handleCancel() {
+        this.close()
+      },
+      // shiftSubChange(val) {
+      //   let _this = this
+      //   getAction(this.url.getShiftSubById, { shiftSubId: val }).then((res) => {
+      //     if (res.success) {
+      //       if (res.result.isDaySpan == 'true') {
+      //         _this.isDaySpan = true
+      //       } else {
+      //         _this.isDaySpan = false
+      //       }
+      //       _this.form.setFieldsValue({
+      //         startDate: res.result.startDate,
+      //         endDate: res.result.endDate
+      //       })
+      //       if (res.result.sleepStartDate) {
+      //         _this.form.setFieldsValue({
+      //           sleepStartDate: res.result.sleepStartDate
+      //         })
+      //       }
+      //       if (res.result.sleepStartDate) {
+      //         _this.form.setFieldsValue({
+      //           sleepEndDate: res.result.sleepEndDate
+      //         })
+      //       }
+      //     }
+      //   })
+      // }
+    }
+  }
+</script>
+
+<style scoped lang="less">
+  /deep/ .ant-modal-content{
+    /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/
+    /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/
+    /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
+    /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
+    /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
+    /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
+    /*background-color: #000;*/
+  }
+  /deep/ .ant-modal-close{
+    color: #1191b0;
+    font-size: 24px;
+  }
+  /deep/ .ant-modal-close-x{
+    font-size: 24px;
+  }
+  .ant-btn {
+    padding: 0 10px;
+    margin-left: 3px;
+  }
+
+  .ant-form-item-control {
+    line-height: 0px;
+  }
+
+  /** 涓昏〃鍗曡闂磋窛 */
+  .ant-form .ant-form-item {
+    margin-bottom: 10px;
+  }
+
+  /** Tab椤甸潰琛岄棿璺� */
+  .ant-tabs-content .ant-form-item {
+    margin-bottom: 0px;
+  }
+</style>

--
Gitblit v1.9.3