zhuzhuanzhuan
2023-09-27 dda6143d99925035928ef72deb24e9f6193a3560
使用固定数据基本实现看板设备拖拽功能
已修改7个文件
51 ■■■■■ 文件已修改
.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/config/router.config.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dashboard/Analysis.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceRepair/DeviceRepairModelEdit.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -1,4 +1,4 @@
NODE_ENV=development
VUE_APP_API_BASE_URL=http://127.0.0.1:8080
VUE_APP_API_BASE_URL=http://192.168.0.95:9999
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
package.json
@@ -12,6 +12,7 @@
  "dependencies": {
    "@antv/data-set": "^0.11.4",
    "@jeecg/antd-online-mini": "3.0.0-RC",
    "@jiaminghi/data-view": "^2.10.0",
    "@tinymce/tinymce-vue": "2.1.0",
    "@toast-ui/editor": "^2.1.2",
    "ant-design-vue": "^1.7.2",
@@ -47,7 +48,7 @@
    "vue-print-nb-jeecg": "^1.0.9",
    "vue-router": "^3.0.1",
    "vue-splitpane": "^1.0.4",
    "vuedraggable": "^2.20.0",
    "vuedraggable": "2.20.0",
    "vuex": "^3.1.0",
    "vxe-table": "2.9.13",
    "vxe-table-plugin-antd": "1.8.10",
src/config/router.config.js
@@ -360,7 +360,6 @@
      },
    ]
  },
  {
    path: '/test',
    component: BlankLayout,
@@ -374,6 +373,10 @@
    ]
  },
  {
    path:'/testWorkshop',
    component:()=>import('@/views/TestWorkshop.vue')
  },
  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  },
src/main.js
@@ -68,6 +68,9 @@
  right:'100px'
})
// 将自动注册所有组件为全局组件
import dataV from '@jiaminghi/data-view'
Vue.use(dataV)
// import 'echarts-liquidfill'
Vue.prototype.$echarts = echarts
src/views/dashboard/Analysis.vue
@@ -11,6 +11,7 @@
        <!--&lt;!&ndash;<a-radio :value="3">任务表格</a-radio>&ndash;&gt;-->
      <!--&lt;!&ndash;</a-radio-group>&ndash;&gt;-->
    <!--</div>-->
    <a-button type="primary" @click="navigateToTestWorkshop">跳转至测试车间</a-button>
  </div>
</template>
@@ -35,7 +36,10 @@
    },
    methods: {
      navigateToTestWorkshop(){
        const url=this.$router.resolve('/testWorkshop').href
        window.open(url,'_blank')
      }
    }
  }
</script>
src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue
@@ -44,20 +44,22 @@
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss'),minuteStep:5,hideDisabledOptions:true}"
              <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss'),hideDisabledOptions:true}"
                      date-format="YYYY-MM-DD HH:mm:ss"
                      placeholder="请选择开始时间"
                      :disabledDate="disabledDate" class="query-group-cust"
                      v-decorator="['startTime', validatorRules.startTime]" :disabledTime="disabledDateTime"></j-date>
                      v-decorator="['startTime', validatorRules.startTime]" :disabledTime="disabledDateTime"
                      :showToday="false"></j-date>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss'),minuteStep:5,hideDisabledOptions:true}"
              <j-date :show-time="{defaultValue:moment('08:00:00','HH:mm:ss'),hideDisabledOptions:true}"
                      date-format="YYYY-MM-DD HH:mm:ss"
                      placeholder="请选择结束时间"
                      :disabledDate="disabledDate" class="query-group-cust"
                      v-decorator="['endTime', validatorRules.endTime]" :disabledTime="disabledDateTime"></j-date>
                      v-decorator="['endTime', validatorRules.endTime]" :disabledTime="disabledDateTime"
                      :showToday="false"></j-date>
            </a-form-item>
          </a-col>
        </a-row>
@@ -226,7 +228,7 @@
      disabledDate(current) {
        //Can not slect days before today and today
        // return current && current < moment().endOf("day");
        return current < moment().subtract(+2, 'day')//前一天之前的年月日不可选,不包括前一天
        return current < moment().subtract(+2, 'day').endOf('day')//前一天之前的年月日不可选,不包括前一天
      },
      moment,
      // onChange(dates) {
@@ -461,11 +463,11 @@
        this.checked = e.target.checked
      },
      range(start, end) {
        const result = [];
        const result = []
        for (let i = start; i < end; i++) {
          result.push(i);
          result.push(i)
        }
        return result;
        return result
      },
      /**
       * 禁用日期选择器中的时间选择
@@ -473,7 +475,7 @@
       */
      disabledDateTime() {
        return {
          disabledSeconds: () => this.range(1,60)
          disabledSeconds: () => this.range(1, 60)
        }
      }
    }
@@ -499,4 +501,6 @@
  .ant-tabs-content .ant-form-item {
    margin-bottom: 0px;
  }
</style>
src/views/mdc/base/modules/deviceRepair/DeviceRepairModelEdit.vue
@@ -6,10 +6,10 @@
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <j-date :show-time="{minuteStep:5,hideDisabledOptions:true}" date-format="YYYY-MM-DD HH:mm:ss"
              <j-date :show-time="{hideDisabledOptions:true}" date-format="YYYY-MM-DD HH:mm:ss"
                      placeholder="请选择开始时间" :disabledDate="disabledDate"
                      class="query-group-cust" v-decorator="['startTime', validatorRules.startTime]"
                      :disabledTime="disabledDateTime"></j-date>
                      :disabledTime="disabledDateTime" :showToday="false"></j-date>
            </a-form-item>
          </a-col>
@@ -23,11 +23,11 @@
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <j-date :show-time="{minuteStep:5,hideDisabledOptions:true}" date-format="YYYY-MM-DD HH:mm:ss"
              <j-date :show-time="{hideDisabledOptions:true}" date-format="YYYY-MM-DD HH:mm:ss"
                      placeholder="请选择结束时间"
                      :disabledDate="disabledDate"
                      class="query-group-cust" v-decorator="['endTime', validatorRules.endTime]"
                      :disabledTime="disabledDateTime"></j-date>
                      :disabledTime="disabledDateTime" :showToday="false"></j-date>
            </a-form-item>
          </a-col>
          <a-col :span="12">
@@ -171,7 +171,7 @@
      disabledDate(current) {
        //Can not slect days before today and today
        // return current && current < moment().endOf("day");
        return current < moment().subtract(+2, 'day')//前一天之前的年月日不可选,不包括前一天
        return current < moment().subtract(+2, 'day').endOf('day')//前一天之前的年月日不可选,不包括前一天
      },
      moment,
      // onChange(dates) {