From e74242e9f270404ac3717aeee59e1ab17815eb50 Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期三, 27 八月 2025 12:06:25 +0800
Subject: [PATCH] 安灯工单:产线多选修改为单选/设备管理模块迁移: 设备台账/设备履历/故障报修/维修工单/保养标准/点检工单/精度参数维护/工艺参数维护/设备附件管理/故障原因维护  (二维码库添加) 设备台账:设备编码重复校验 、自定义控件引用、权限控制

---
 src/views/mdc/base/modules/deviceRepair/JDate.vue |   86 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/src/views/mdc/base/modules/deviceRepair/JDate.vue b/src/views/mdc/base/modules/deviceRepair/JDate.vue
new file mode 100644
index 0000000..803ea19
--- /dev/null
+++ b/src/views/mdc/base/modules/deviceRepair/JDate.vue
@@ -0,0 +1,86 @@
+<template>
+  <a-date-picker
+    dropdownClassName="j-date-picker"
+    :disabled="disabled || readOnly"
+    :placeholder="placeholder"
+    @change="handleDateChange"
+    :value="momVal"
+    :showTime="showTime"
+    :format="dateFormat"
+    :getCalendarContainer="getCalendarContainer"
+    v-bind="$attrs"/>
+</template>
+<script>
+import moment from 'moment'
+export default {
+  name: 'JDate',
+  props: {
+    placeholder:{
+      type: String,
+      default: '',
+      required: false
+    },
+    value:{
+      type: String,
+      required: false
+    },
+    dateFormat:{
+      type: String,
+      default: 'YYYY-MM-DD',
+      required: false
+    },
+    //姝ゅ睘鎬у彲浠ヨ搴熷純浜�
+    triggerChange:{
+      type: Boolean,
+      required: false,
+      default: false
+    },
+    readOnly:{
+      type: Boolean,
+      required: false,
+      default: false
+    },
+    disabled:{
+      type: Boolean,
+      required: false,
+      default: false
+    },
+    showTime:{
+      type: Object,
+      required: {},
+      default: {}
+    },
+    getCalendarContainer: {
+      type: Function,
+      default: (node) => node.parentNode
+    }
+  },
+  data () {
+    let dateStr = this.value;
+    return {
+      decorator:"",
+      momVal:!dateStr?null:moment(dateStr,this.dateFormat)
+    }
+  },
+  watch: {
+    value (val) {
+      if(!val){
+        this.momVal = null
+      }else{
+        this.momVal = moment(val,this.dateFormat)
+      }
+    }
+  },
+  methods: {
+    moment,
+    handleDateChange(mom,dateStr){
+      this.$emit('change', dateStr);
+    }
+  },
+  //2.2鏂板 鍦ㄧ粍浠跺唴瀹氫箟 鎸囧畾鐖剁粍浠惰皟鐢ㄦ椂鍊欑殑浼犲�煎睘鎬у拰浜嬩欢绫诲瀷 杩欎釜鐗涢��
+  model: {
+    prop: 'value',
+    event: 'change'
+  }
+}
+</script>

--
Gitblit v1.9.3