suxinf il y a 4 ans
Parent
commit
f2334eaff8
3 fichiers modifiés avec 114 ajouts et 0 suppressions
  1. 6 0
      src/router/index.js
  2. 5 0
      src/tableConfig/parameter.js
  3. 103 0
      src/views/parameter/CommonParam.vue

+ 6 - 0
src/router/index.js

@@ -32,6 +32,8 @@ import MediaPlatform  from '../views/parameter/MediaPlatform'
 import Grouping from '../views/parameter/Grouping'
 // 链接上传
 import LinkUpload  from '../views/parameter/LinkUpload'
+// 常用参数
+import CommonParam  from '../views/parameter/CommonParam'
 
 Vue.use(VueRouter)
 
@@ -105,6 +107,10 @@ const routes = [
       {
         path: 'linkUpload',
         component: LinkUpload
+      },
+      {
+        path: 'commonParam',
+        component: CommonParam
       }
     ]
   }

+ 5 - 0
src/tableConfig/parameter.js

@@ -33,6 +33,11 @@ const TAG = [
         num: 7,
         title: '链接上传',
         path: 'linkUpload'
+    },
+    {
+        num: 8,
+        title: '常用参数',
+        path: 'commonParam'
     }
 ]
 

+ 103 - 0
src/views/parameter/CommonParam.vue

@@ -0,0 +1,103 @@
+<template>
+  <div class="common_param">
+    <div class="content">
+      <p class="text">链接上传时限设置</p>
+      <div class="time_limit">
+        <div class="left">
+          <p>仅支持</p>
+          <p class="num" v-if="!editFlag">{{ timeLimit }}</p>
+          <input type="text" v-model="timeLimit" v-else />
+          <p>个月内上传的资料进行反馈</p>
+        </div>
+        <p class="edit" @click="edit">{{ editFlag ? "确定" : "编辑" }}</p>
+      </div>
+    </div>
+    <div class="button">
+      <div class="current_button" @click="submit" style="margin: 0">保存</div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      timeLimit: 5,
+      editFlag: false,
+    };
+  },
+  methods: {
+    submit: function () {
+      let timeLimit = +this.timeLimit;
+      if (timeLimit <= 0) {
+        alert("请填写大于零的整数");
+      } else if (Math.ceil(timeLimit) !== timeLimit) {
+        alert("请填写大于零的整数");
+      } else {
+        console.log(timeLimit);
+      }
+    },
+    edit: function () {
+      this.editFlag = !this.editFlag;
+    },
+  },
+};
+</script>
+
+<style scoped lang="less">
+.common_param {
+  height: 120px;
+  margin-top: 10px;
+  .content {
+    padding: 0 10px;
+    border-bottom: 1px solid #ccc;
+    .text {
+      font-size: 20px;
+      margin-top: 10px;
+      height: 30px;
+      line-height: 30px;
+    }
+    .time_limit {
+      display: flex;
+      justify-content: space-between;
+      margin-top: 30px;
+      padding-left: 100px;
+      padding-bottom: 30px;
+      .left {
+        display: flex;
+        p {
+          height: 28px;
+          line-height: 28px;
+          font-size: 16px;
+        }
+        .num {
+          width: 200px;
+          text-align: center;
+        }
+        input {
+          width: 180px;
+          border: 1px solid #ccc;
+          color: #555;
+          padding-left: 20px;
+          font-size: 16px;
+        }
+      }
+      .edit {
+        height: 28px;
+        line-height: 28px;
+        color: #0056a0;
+        font-size: 16px;
+        &:hover {
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .button {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    margin-top: 50px;
+  }
+}
+</style>