zhangdan 4 年之前
父节点
当前提交
3170417f5f

+ 11 - 0
src/config/router.config.js

@@ -166,6 +166,17 @@ export const asyncRouterMap = [{
           icon: 'crown',
           hidden: true
         }
+      },
+      {
+	  path: '/editionSetting/add',
+	  name: 'editionSetting_edit',
+	  component: () => import(/* webpackChunkName: "appSetting" */
+          '@/views/appSetting/addEditionSetting.vue'),
+	  meta: {
+          title: '编辑',
+          icon: 'crown',
+          hidden: true
+	  }
       }
       ]
     }

+ 7 - 7
src/views/appSetting/addEditionSetting.vue

@@ -30,8 +30,8 @@
                 show-time
                 placeholder="年/月/日 时/分/秒"
                 v-decorator="[
-                  'formData.updateDate',
-                  { initialValue: formData.updateDate,
+                  'formData.publicDate',
+                  { initialValue: formData.publicDate,
                     rules: [{required: true, message: '请选择更新时间!' }] },
                 ]" />
             </a-form-item>
@@ -158,14 +158,14 @@ export default {
       form: this.$form.createForm(this),
       formData: {
         version: '',
-        updateDate: null,
+        publicDate: null,
         downloadUrl: '',
         forceUpgrade: '0',
         upgradeContent: '',
         attachment: ''
       },
       applyName: 'IT后台',
-      applyCode: 'zyit',
+      applyCode: 'atit',
       mode1: 'time'
     }
   },
@@ -177,8 +177,8 @@ export default {
       this.form.validateFields((err, values) => {
         if (!err) {
           const query = this.$route.query
-          const formData = Object.assign({}, this.formData, values.formData, { applyName: 'IT后台' }, { applyCode: 'zyit' })
-          formData.updateDate = formData.updateDate.format('YYYY-MM-DD HH:mm:ss')
+          const formData = Object.assign({}, this.formData, values.formData, { applyName: 'IT后台' }, { applyCode: 'atit' })
+          formData.publicDate = formData.publicDate.format('YYYY-MM-DD HH:mm:ss')
           saveItem(formData).then(res => {
             // console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {
@@ -223,7 +223,7 @@ export default {
             const page = res.data
             vm.formData = Object.assign(vm.formData, page)
             vm.formData.forceUpgrade = Number(vm.formData.forceUpgrade)
-            vm.formData.updateDate = moment(vm.formData.updateDate)
+            vm.formData.publicDate = moment(vm.formData.publicDate)
             vm.$refs.upfile.setFileList(vm.formData.attachment)
           }
         })

+ 17 - 16
src/views/appSetting/bannerSetting.vue

@@ -14,9 +14,9 @@
       :data="loadData"
       bordered>
       <!-- 广告图位置 -->
-      <!-- <span slot="position" slot-scope="text,record">
+      <span slot="position" slot-scope="text,record">
         {{ $refs.position.getNameByCode(text) }}
-      </span> -->
+      </span>
       <span slot="action" slot-scope="text, record">
         <template>
           <a-icon type="eye" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="handleEdit(record, 1)" />
@@ -50,15 +50,16 @@
             :disabled="disabled"
             placeholder="请输入轮播图名称32个字以内" />
         </a-form-item>
-        <!-- <a-form-item required label="广告图位置" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-item label="广告图位置" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
           <v-select
             ref="position"
             code="ADVERT_POSITION"
             v-model="formData.position"
             allowClear
             placeholder="请选择广告图位置"
-            :disabled="disabled"></v-select>
-        </a-form-item> -->
+            :disabled="disabled"
+            v-decorator="['formData.position', { initialValue:formData.position,rules: [{ required: true, message: '请选择广告图位置!' }] }]"></v-select>
+        </a-form-item>
         <a-form-item label="跳转链接" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
           <a-input
             v-decorator="['formData.url', { initialValue:formData.url,rules: [{ required: false, message: '请填写跳转链接!' }] }]"
@@ -144,15 +145,15 @@ export default {
         minWidth: '40',
         align: 'center'
       },
-      // {
-      //   title: '广告图位置',
-      //   minWidth: '100',
-      //   dataIndex: 'position',
-      //   align: 'center',
-      //   scopedSlots: {
-      //     customRender: 'position'
-      //   }
-      // },
+      {
+        title: '广告图位置',
+        minWidth: '100',
+        dataIndex: 'position',
+        align: 'center',
+        scopedSlots: {
+          customRender: 'position'
+        }
+      },
       {
         title: '名称',
         minWidth: '100',
@@ -225,7 +226,7 @@ export default {
         url: '', // 图片路径
         status: '', // 状态
         sort: '', // 排序
-        // position: '' // 广告图位置
+        position: '', // 广告图位置
         photoBasePath: '',	// 图片基础路径
         photoPath: ''	// 图片路径
       },
@@ -286,7 +287,7 @@ export default {
       this.formData.url = ''
       this.formData.status = ''
       this.formData.sort = ''
-      // this.formData.position = ''
+      this.formData.position = ''
       this.formData.photoBasePath = ''
       this.formData.photoPath = ''
       this.title = '新增'

+ 14 - 2
src/views/appSetting/editionSetting.vue

@@ -16,6 +16,7 @@
       <span slot="action" slot-scope="text, record">
         <template>
           <a-icon type="edit" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="handleEdit(record)" />
+          <!-- <span v-if="this.currentDate < this.publicDate">-</span> -->
         </template>
       </span>
       <template slot="upgradeContent" slot-scope="text, record">
@@ -84,7 +85,7 @@ export default {
         {
           title: '更新时间',
           minWidth: '100',
-          dataIndex: 'updateDate',
+          dataIndex: 'publicDate',
           align: 'center'
         },
         {
@@ -95,18 +96,29 @@ export default {
           scopedSlots: { customRender: 'action' }
         }
       ],
-      applyCode: 'zyit',
+      applyCode: 'atit',
       applyName: 'IT后台',
+	  // publicDate: null,
+	  // currentDate: null,
       // 获取列表数据
       loadData: parameter => {
         return getEditionSettingList(Object.assign(parameter))
           .then(res => {
             // console.log(res,'1111')
             const no = (res.data.pageNo - 1) * res.data.pageSize
+
             for (let i = 0; i < res.data.list.length; i++) {
               const _item = res.data.list[i]
               _item.no = no + i + 1
               // _item.releaseStatus = _item.releaseStatus + '' === 'FB'
+			  // this.publicDate = new Date(_item.publicDate.replace(/-/g, '/'))
+			  // this.currentDate = new Date()
+			  // if (currentDate > publicDate) {
+				 // console.log('大于0')
+			  // } else {
+				 //  console.log('小于0')
+			  // }
+			  console.log(this.publicDate, this.currentDate)
             }
             return res.data
           })