Преглед на файлове

Merge branch 'wxl' into online

lex-xin преди 5 години
родител
ревизия
0aaf9df297
променени са 3 файла, в които са добавени 134 реда и са изтрити 2 реда
  1. 2 1
      package.json
  2. 124 0
      src/views/categroyManager/generalSettings/holidaySetting.vue
  3. 8 1
      src/views/categroyManager/globalConfig.vue

+ 2 - 1
package.json

@@ -23,6 +23,7 @@
     "i": "^0.3.6",
     "js-cookie": "2.2.0",
     "linq": "^3.2.2",
+    "node-sass": "^4.14.1",
     "normalize.css": "7.0.0",
     "npm": "^6.13.0",
     "nprogress": "0.2.0",
@@ -31,6 +32,7 @@
     "qs": "^6.8.0",
     "vue": "2.6.10",
     "vue-amap": "^0.5.10",
+    "vue-lunar-calendar-pro": "^1.0.14",
     "vue-quill-editor": "^3.0.6",
     "vue-router": "3.0.6",
     "vuex": "3.1.0"
@@ -56,7 +58,6 @@
     "less": "^3.10.3",
     "less-loader": "^5.0.0",
     "mockjs": "1.0.1-beta3",
-    "node-sass": "^4.13.1",
     "runjs": "^4.3.2",
     "sass-loader": "^7.1.0",
     "script-ext-html-webpack-plugin": "2.1.3",

+ 124 - 0
src/views/categroyManager/generalSettings/holidaySetting.vue

@@ -0,0 +1,124 @@
+<template>
+  <div class='m-container'>
+    <!-- <h2>参数设置</h2> -->
+    <div class="m-core">
+      <!-- 列表 -->
+      <calendar class="calendarComponent" v-if="dataStatus" :first-day-of-week="1" multiple :select-date="dateList" width="800px"/>
+      <div v-if="dataStatus" style="width: 800px; margin: 10px auto; text-align: center;">
+        <el-button type="primary" @click="onSave" style="padding: 16px 33px; font-size: 18px;">保存</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import pagination from '@/components/Pagination/index'
+import { sysConfigList, sysConfigUpdate } from '@/api/generalSettings'
+import Calendar from 'vue-lunar-calendar-pro'
+export default {
+  components: { pagination, Calendar },
+  name: 'holidaySetting',
+  data () {
+    return {
+      configList: [],
+      dateList: [],
+      dataStatus: false
+    }
+  },
+  mounted () {
+    this.__init()
+  },
+  methods: {
+    __init () {
+      sysConfigList({ group: 'holiday' }).then(res => {
+        if (res.code == 200 && res.data.length > 0) {
+          let holiday = res.data[0]
+          this.configList = holiday
+          this.dateList = holiday.paranValue ? JSON.parse(holiday.paranValue) :[]
+          this.dataStatus = true
+        }
+      })
+    },
+    onSave () {
+      let configList = this.configList
+      let params = {
+        id: configList.id,
+        paranValue: JSON.stringify(this.dateList),
+        paramName: configList.paramName
+      }
+      sysConfigUpdate(params).then(res => {
+        if (res.code == 200) {
+          this.$message.success('保存成功')
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+/deep/.el-input-group__append {
+  background: #dcdfe6;
+  border-color: #dcdfe6;
+  &:hover,
+  &:active,
+  &:focus {
+    background: #dcdfe6;
+    border-color: #dcdfe6;
+    color: #fff;
+  }
+}
+.calendarComponent {
+  margin: 0 auto;
+}
+/deep/.calendar-pro__body table td .day-box.select {
+  background-color: #2dd8cd;
+}
+/deep/.calendar-pro__body table td .day-box {
+  height: 80px;
+}
+/deep/.info-festival {
+  color: red;
+}
+/deep/.calendar-pro__title {
+  margin-bottom: 10px;
+}
+/deep/.calendar-pro__tool {
+  button {
+    display: inline-block;
+    line-height: 1;
+    white-space: nowrap;
+    cursor: pointer;
+    background: #fff;
+    border: 1px solid #dcdfe6;
+    color: #606266;
+    -webkit-appearance: none;
+    text-align: center;
+    box-sizing: border-box;
+    outline: none;
+    margin: 0;
+    transition: .1s;
+    font-weight: 500;
+    -moz-user-select: none;
+    -webkit-user-select: none;
+    -ms-user-select: none;
+    padding: 12px 20px;
+    font-size: 14px;
+    border-radius: 4px;
+    margin: 0 5px;
+  }
+}
+
+.el-button--primary {
+  background: #14928a;
+  border-color: #14928a;
+  color: #fff;
+  &:hover,
+  &:active,
+  &:focus {
+    background: #14928a;
+    border-color: #14928a;
+    color: #fff;
+  }
+}
+</style>

+ 8 - 1
src/views/categroyManager/globalConfig.vue

@@ -31,6 +31,10 @@
         <el-tab-pane label="收费分润配置" name="7" v-if="permissionList.overallManagerTwo">
             <overallManagerTwo v-if="activeIndex == 7" />
         </el-tab-pane>
+        <!-- holiday_setting -->
+        <el-tab-pane label="节假日设置" name="8" v-if="permissionList.holidaySetting">
+            <holidaySetting v-if="activeIndex == 8" />
+        </el-tab-pane>
       </el-tabs>
     </div>
   </div>
@@ -38,6 +42,7 @@
 <script>
 import overallManager from './generalSettings/overallManager'
 import overallManagerTwo from './generalSettings/overallManagerTwo'
+import holidaySetting from './generalSettings/holidaySetting'
 import musicalManager from './specialSetup/musicalManager'
 import musicalManagerOut from './specialSetup/musicalManagerOut'
 import typesManager from './specialSetup/typesManager'
@@ -49,6 +54,7 @@ export default {
   components: {
     overallManager,
     overallManagerTwo,
+    holidaySetting,
     musicalManager, 
     musicalManagerOut, 
     typesManager, 
@@ -68,7 +74,8 @@ export default {
         typesManager: permission('/globalConfig/typesManager'),
         chargesList: permission('/globalConfig/chargesList'),
         jobTemplateSetting: permission('/globalConfig/jobTemplateSetting'),
-        errorManager: permission('/globalConfig/errorManager')
+        errorManager: permission('/globalConfig/errorManager'),
+        holidaySetting: permission('/globalConfig/holidaySetting')
       }
     }
   },