shaogen1995 4 лет назад
Родитель
Сommit
936864a996

+ 1 - 1
public/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title><%= htmlWebpackPlugin.options.title %></title>
+    <title>项目资料管理系统</title>
   </head>
   <body>
     <noscript>

BIN
src/assets/img/wd1.png


BIN
src/assets/img/wd2.png


BIN
src/assets/img/wd3.png


BIN
src/assets/img/wd4.png


+ 22 - 0
src/assets/style/initial.css

@@ -22,4 +22,26 @@ a {
 }
 .el-button--text{
   color: #E97B86 !important;
+}
+.el-button--primary{
+  background-color: #DC3545 !important;
+  border-color: #DC3545 !important;
+}
+.el-button:focus, .el-button:hover{
+  color: #fff;
+  border-color: #DC3545;
+  background-color: rgba(220, 53, 69, .4);
+}
+.el-select-dropdown__item.selected{
+  color: #DC3545;
+}
+.el-button--text:focus, .el-button--text:hover{
+  border-color: transparent;
+  background-color: transparent;
+}
+.el-upload-dragger:hover{
+  border-color: #DC3545;
+}
+.el-upload-dragger .el-upload__text em{
+  color: #DC3545;
 }

+ 10 - 0
src/router/index.js

@@ -21,6 +21,16 @@ const routes = [
         name: 'tab1',
         component: () => import('@/views/tab1/index.vue')
       },
+      {
+        path: 'tab1_look',
+        name: 'tab1_look',
+        component: () => import('@/views/tab1/tab1_look.vue')
+      },
+      {
+        path: 'tab1_add',
+        name: 'tab1_add',
+        component: () => import('@/views/tab1/tab1_add.vue')
+      },
       // 文物案例
       {
         path: 'tab2',

+ 11 - 5
src/views/tab1/index.vue

@@ -26,7 +26,7 @@
       <div class="table">
         <div class="title">
           <div class="txt">数据列表</div>
-          <div class="addBtn">+ 新增</div>
+          <div class="addBtn" @click="$router.push('/layout/tab1_add')">+ 新增</div>
         </div>
         <el-table
           :header-cell-style="{ background: '#d8dadc' }"
@@ -47,7 +47,7 @@
           <el-table-column prop="name3" label="保密级别"> </el-table-column>
           <el-table-column label="操作">
             <template>
-              <el-button type="text">查 看</el-button>
+              <el-button type="text" @click="look">查 看</el-button>
               <el-button type="text">编 辑</el-button>
               <el-button type="text">删 除</el-button>
             </template>
@@ -99,9 +99,15 @@ export default {
   // 监听属性 类似于data概念
   computed: {},
   // 监控data中的数据变化
-  watch: {},
+  watch: {
+  },
   // 方法集合
-  methods: {},
+  methods: {
+    // 点击查看
+    look () {
+      this.$router.push('/layout/tab1_look')
+    }
+  },
   // 生命周期 - 创建完成(可以访问当前this实例)
   created () {},
   // 生命周期 - 挂载完成(可以访问DOM元素)
@@ -158,7 +164,7 @@ export default {
     .txt {
       font-weight: 700;
       height: 40px;
-      border-bottom: 2px dashed #999;
+      border-bottom: 2px dashed black;
     }
     .search {
       position: relative;

+ 392 - 0
src/views/tab1/tab1_add.vue

@@ -0,0 +1,392 @@
+<!--  -->
+<template>
+  <div class="template">
+    <div class="top">
+      <div class="location">数据管理 / 项目资料 / <span>新增</span></div>
+    </div>
+    <div class="conten">
+      <div class="search">
+        <div class="txt">项目数据新增</div>
+        <ul>
+          <li
+            v-for="(item, index) in topTab"
+            :key="index"
+            :class="{ active: topTabInd === index }"
+            @click="tabCut(index)"
+          >
+            <a :href="item.id">{{ item.name }}</a>
+          </li>
+        </ul>
+      </div>
+      <div class="tabAll">
+        <!-- 项目详情 -->
+        <div id="tab0" class="conten_box">
+          <div class="title">项目详情</div>
+          <div class="from">
+            <el-form
+              :model="ruleForm"
+              :rules="rules"
+              ref="ruleForm"
+              label-width="100px"
+              class="demo-ruleForm"
+            >
+              <el-form-item label="项目名称:" prop="name">
+                <el-input
+                  v-model="ruleForm.name"
+                  placeholder="请输入项目名称"
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="项目时间:">
+                <el-input
+                  v-model="ruleForm.age"
+                  placeholder="请输入项目时间"
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="项目分类:">
+                <el-select v-model="ruleForm.typeId">
+                  <el-option label="区域一" value="shanghai"></el-option>
+                  <el-option label="区域二" value="beijing"></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="展示形式:">
+                <el-select v-model="ruleForm.application">
+                  <el-option label="网页端" value="web"></el-option>
+                  <el-option label="移动端" value="app"></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="应用技术:">
+                <el-select v-model="ruleForm.technology">
+                  <el-option label="实景拍摄" value="live"></el-option>
+                  <el-option label="虚拟建模" value="virtual"></el-option>
+                  <el-option label="四维看看" value="4dkk"></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="保密级别:">
+                <el-select v-model="ruleForm.level">
+                  <el-option label="一般--所有人可查阅" :value="1"></el-option>
+                  <el-option
+                    label="秘密--查阅人为公司内部所有员工,经过允许可对外分享"
+                    :value="2"
+                  ></el-option>
+                  <el-option
+                    label="机密--查阅人为管理员、项目负责人、获得允许的员工"
+                    :value="3"
+                  ></el-option>
+                  <el-option
+                    label="绝密--查阅人仅为管理员、项目负责人"
+                    :value="4"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="项目合作方:">
+                <el-input
+                  v-model="ruleForm.cooperation"
+                  placeholder="请输入项目合作方"
+                ></el-input>
+              </el-form-item>
+            </el-form>
+          </div>
+        </div>
+        <div id="tab1" class="conten_box">
+          <div class="title">项目网址</div>
+
+          <div class="row" v-for="(item, index) in tab1Arr" :key="index">
+            <el-input v-model="tab1Arr[index].name" placeholder="网址名称" style="width:200px;margin-right: 20px;"></el-input>
+            <el-input v-model="tab1Arr[index].herf" placeholder="URL网址链接" style="width:500px"></el-input>
+             <i class="el-icon-circle-close" @click="tab1Del(index)" v-if="index!==0"></i>
+             <div class="tab_btn" @click="tab1Add" v-else>+ 添加网址</div>
+          </div>
+
+        </div>
+        <div id="tab2" class="conten_box">
+          <div class="title">三维场景</div>
+
+          <div class="row" v-for="(item, index) in tab2Arr" :key="index">
+            <el-input v-model="tab2Arr[index].name" placeholder="场景名称" style="width:200px;margin-right: 20px;"></el-input>
+            <el-input v-model="tab2Arr[index].herf" placeholder="URL网址链接" style="width:500px"></el-input>
+             <i class="el-icon-circle-close" @click="tab2Del(index)" v-if="index!==0"></i>
+             <div class="tab_btn" @click="tab2Add" v-else>+ 添加场景</div>
+          </div>
+        </div>
+
+        <div id="tab3" class="conten_box">
+          <div class="title">资料文档</div>
+          <el-upload
+            class="upload-demo"
+            drag
+            action="https://jsonplaceholder.typicode.com/posts/"
+            multiple
+          >
+            <i class="el-icon-upload"></i>
+            <div class="el-upload__text">
+              将文件拖到此处,或<em>点击上传</em>
+            </div>
+            <div class="el-upload__tip" slot="tip">
+              只能上传jpg/png文件,且不超过500kb
+            </div>
+          </el-upload>
+          <div class="imgBox">
+            <div>
+              <img src="@/assets/img/wd1.png" alt="" />12345678911111111
+            </div>
+          </div>
+        </div>
+        <div id="tab4" class="conten_box">
+          <div class="title">文物</div>
+          <div class="imgBox">
+            <div>
+              <img src="@/assets/img/logo22.png" alt="" />1234567891111111111111
+            </div>
+            <div><img src="@/assets/img/logo22.png" alt="" />12345678</div>
+          </div>
+        </div>
+      </div>
+      <!-- 底部按钮 -->
+      <div class="button_btn">
+        <div @click="$router.go(-1)">取 消</div>
+        <div class="edit">保 存</div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+
+export default {
+  // import引入的组件需要注入到对象中才能使用
+  name: 'tab1Add',
+  components: {},
+  data () {
+    // 这里存放数据
+    return {
+      // 项目网址数据
+      tab1Arr: [{ name: '', href: '' }],
+      tab1: {
+        name: '',
+        herf: ''
+      },
+      // 三维场景数据
+      tab2Arr: [{ name: '', href: '' }],
+      tab2: {
+        name: '',
+        herf: ''
+      },
+      topTabInd: 0,
+      topTab: [
+        { name: '项目详情', id: '#tab0' },
+        { name: '项目网址', id: '#tab1' },
+        { name: '三维场景', id: '#tab2' },
+        { name: '资料文档', id: '#tab3' },
+        { name: '文物', id: '#tab4' }
+      ],
+      ruleForm: {
+        name: '',
+        age: '',
+        typeId: 'shanghai',
+        application: 'web',
+        technology: 'live',
+        level: 1,
+        cooperation: ''
+      },
+      rules: {
+        name: { required: true, message: '请输入项目名称', trigger: 'blur' }
+      }
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  // 方法集合
+  methods: {
+    // 上面的tab栏切换
+    tabCut (index) {
+      this.topTabInd = index
+    },
+    // 点击添加网址
+    tab1Add () {
+      this.tab1Arr.push({ name: '', href: '' })
+    },
+    tab1Del (index) {
+      this.$confirm('确定删除吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.tab1Arr.splice(index, 1)
+          this.$message.success('删除成功!')
+        })
+        .catch(() => {
+          this.$message.info('已取消删除!')
+        })
+    },
+    // 点击添加场景
+    tab2Add () {
+      this.tab2Arr.push({ name: '', href: '' })
+    },
+    tab2Del (index) {
+      this.$confirm('确定删除吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.tab2Arr.splice(index, 1)
+          this.$message.success('删除成功!')
+        })
+        .catch(() => {
+          this.$message.info('已取消删除!')
+        })
+    }
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {},
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {},
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+<style lang='less' scoped>
+/deep/.el-select {
+  width: 500px;
+}
+//@import url(); 引入公共css类
+.template {
+  position: relative;
+  padding: 0px 30px;
+  .top {
+    display: flex;
+    align-items: center;
+    height: 58px;
+    width: 100%;
+
+    .location {
+      font-size: 22px;
+      color: #999;
+      & > span {
+        color: black;
+      }
+    }
+  }
+  .conten {
+    width: 100%;
+    height: 720px;
+    .txt {
+      font-weight: 700;
+      height: 40px;
+      border-bottom: 2px dashed black;
+    }
+    .search {
+      position: relative;
+      padding: 15px 20px 0;
+      border-radius: 5px;
+      box-shadow: 0px 0px 5px 0px;
+      height: 110px;
+      background-color: #d8dadc;
+      ul {
+        margin-top: 15px;
+        display: flex;
+        li {
+          padding-bottom: 5px;
+          cursor: pointer;
+          color: #666;
+          margin-right: 100px;
+        }
+        li:hover {
+          color: black;
+          border-bottom: 2px solid #dc3545;
+        }
+        .active {
+          color: black;
+          border-bottom: 2px solid #dc3545;
+        }
+      }
+    }
+    .conten_box {
+      position: relative;
+      padding: 15px 30px;
+      background-color: #fff;
+      margin-top: 10px;
+      .title {
+        font-weight: 700;
+        padding-bottom: 8px;
+        font-size: 20px;
+        color: #c82333;
+        border-bottom: 1px solid #ccc;
+      }
+      .from {
+        margin-top: 22px;
+        width: 600px;
+      }
+      .tab_btn {
+        margin-left: 20px;
+        cursor: pointer;
+        color: #fff;
+        width: 130px;
+        height: 40px;
+        border-radius: 10px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        background-color: #dc3545;
+      }
+      .row {
+        display: flex;
+        align-items: center;
+        margin: 15px 0 0;
+        & > div {
+          font-weight: 700;
+        }
+        a {
+          background-color: #e7e9eb;
+          padding: 5px 10px;
+          margin-right: 20px;
+        }
+        i {
+          margin-left: 20px;
+          cursor: pointer;
+          font-size: 24px;
+        }
+      }
+    }
+    .tabAll {
+      max-height: 600px;
+      overflow-y: auto;
+    }
+  }
+  .button_btn {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    position: absolute;
+    left: 100px;
+    bottom: 30px;
+    width: 300px;
+    height: 40px;
+    div {
+      border-radius: 10px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      width: 100px;
+      height: 40px;
+      background-color: #fff;
+      cursor: pointer;
+    }
+    .edit {
+      color: #fff !important;
+      background-color: #dc3545 !important;
+    }
+  }
+
+}
+</style>

+ 244 - 0
src/views/tab1/tab1_look.vue

@@ -0,0 +1,244 @@
+<!--  -->
+<template>
+  <div class="template">
+    <div class="top">
+      <div class="location">数据管理 / 项目资料 / <span>查看</span></div>
+    </div>
+    <div class="conten">
+      <div class="search">
+        <div class="txt">项目名称</div>
+        <ul>
+          <li v-for="(item,index) in topTab" :key="index" :class="{active:topTabInd===index}" @click="tabCut(index)">
+            <a :href="item.id">{{item.name}}</a>
+            </li>
+        </ul>
+      </div>
+      <div class="tabAll">
+      <!-- 项目详情 -->
+      <div id="tab0" class="conten_box">
+        <div class="title">项目详情</div>
+        <div class="row"><div>项目名称:</div>123456</div>
+        <div class="row"><div>项目时间:</div>123456</div>
+        <div class="row"><div>项目分类:</div>123456</div>
+        <div class="row"><div>展示形式:</div>123456</div>
+        <div class="row"><div>应用技术:</div>123456</div>
+        <div class="row"><div>保密级别:</div>123456</div>
+        <div class="row"><div>项目合作方:</div>123456</div>
+      </div>
+      <div id="tab1" class="conten_box">
+        <div class="title">项目网址</div>
+        <div class="row"><div>门户网站:</div><a href="http://www.hao123.com" target="_blank">www.hao123.com</a></div>
+        <div class="row"><div>门户网站111111111111:</div><a href="www.hao123.com">www.hao123.com</a></div>
+      </div>
+      <div id="tab2" class="conten_box">
+        <div class="title">三维场景</div>
+        <div class="row"><div>陈云临展:</div><a href="www.hao123.com">www.hao123.com</a></div>
+        <div class="row"><div>汉唐文物临展:</div><a href="www.hao123.com">www.hao123.com</a></div>
+        <div class="row"><div>邬达克临展:</div><a href="www.hao123.com">www.hao123.com</a></div>
+      </div>
+      <div id="tab3" class="conten_box">
+        <div class="title">资料文档</div>
+        <div class="imgBox">
+          <div><img src="@/assets/img/wd1.png" alt="">12345678911111111</div>
+          <div><img src="@/assets/img/wd2.png" alt="">123456789</div>
+          <div><img src="@/assets/img/wd3.png" alt="">123456789</div>
+          <div><img src="@/assets/img/wd4.png" alt="">123456789</div>
+        </div>
+      </div>
+      <div id="tab4" class="conten_box">
+        <div class="title">文物</div>
+        <div class="imgBox">
+          <div><img src="@/assets/img/logo22.png" alt="">1234567891111111111111</div>
+          <div><img src="@/assets/img/logo22.png" alt="">12345678</div>
+        </div>
+      </div>
+      </div>
+      <!-- 底部按钮 -->
+      <div class="button_btn">
+        <div @click="$router.go(-1)">返 回</div>
+        <div class="edit">编 辑</div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+
+export default {
+  // import引入的组件需要注入到对象中才能使用
+  name: 'tab1Look',
+  components: {},
+  data () {
+    // 这里存放数据
+    return {
+      topTabInd: 0,
+      topTab: [
+        { name: '项目详情', id: '#tab0' },
+        { name: '项目网址', id: '#tab1' },
+        { name: '三维场景', id: '#tab2' },
+        { name: '资料文档', id: '#tab3' },
+        { name: '文物', id: '#tab4' }
+      ]
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  // 方法集合
+  methods: {
+    tabCut (index) {
+      this.topTabInd = index
+    }
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {},
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {},
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+<style lang='less' scoped>
+//@import url(); 引入公共css类
+.template {
+  position: relative;
+  padding: 0px 30px;
+  .top {
+    display: flex;
+    align-items: center;
+    height: 58px;
+    width: 100%;
+
+    .location {
+      font-size: 22px;
+      color: #999;
+      & > span {
+        color: black;
+      }
+    }
+  }
+  .conten {
+    width: 100%;
+    height: 720px;
+    .txt {
+      font-weight: 700;
+      height: 40px;
+      border-bottom: 2px dashed black;
+    }
+    .search {
+      position: relative;
+      padding: 15px 20px 0;
+      border-radius: 5px;
+      box-shadow: 0px 0px 5px 0px;
+      height: 110px;
+      background-color: #d8dadc;
+      ul {
+        margin-top: 15px;
+        display: flex;
+        li {
+          padding-bottom: 5px;
+          cursor: pointer;
+          color:#666;
+          margin-right: 100px;
+        }
+        li:hover {
+          color: black;
+          border-bottom: 2px solid #DC3545;
+        }
+        .active {
+          color: black;
+          border-bottom: 2px solid #DC3545;
+        }
+      }
+    }
+    .conten_box{
+      padding: 15px 30px;
+      background-color: #fff;
+      margin-top: 10px;
+      .title{
+        font-weight: 700;
+        padding-bottom: 8px;
+        font-size: 20px;
+        color: #C82333;
+        border-bottom: 1px solid #ccc;
+      }
+      .row{
+        display: flex;
+        align-items: center;
+        margin: 15px 0 0;
+        &>div{
+          font-weight: 700;
+        }
+        a {
+          background-color: #E7E9EB;
+          padding: 5px 10px;
+        }
+      }
+      .imgBox{
+        display: flex;
+        flex-wrap: wrap;
+        &>div {
+        word-wrap: break-word;
+        text-align: center;
+        width: 85px;
+        margin-right: 20px;
+        }
+        img {
+          width: 68px;
+          height: 75px;
+          object-fit: contain;
+        }
+      }
+    }
+    #tab4{
+      .imgBox{
+        &>div {
+        width: 124px;
+        }
+      img {
+        width: 124px;
+        height: 124px;
+        object-fit: contain;
+      }
+      }
+
+    }
+    .tabAll{
+      max-height: 600px;
+      overflow-y: auto;
+    }
+  }
+    .button_btn{
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      position: absolute;
+      left: 100px;
+      bottom: 30px;
+      width: 300px;
+      height: 40px;
+      div {
+        border-radius: 10px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        width: 100px;
+        height: 40px;
+        background-color: #fff;
+        cursor: pointer;
+      }
+      .edit {
+        color: #fff;
+        background-color: #DC3545;
+      }
+    }
+}
+</style>

+ 1 - 1
src/views/tab2/index.vue

@@ -162,7 +162,7 @@ export default {
     .txt {
       font-weight: 700;
       height: 40px;
-      border-bottom: 2px dashed #999;
+      border-bottom: 2px dashed black;
     }
     .search {
       position: relative;

+ 1 - 1
src/views/tab3/index.vue

@@ -150,7 +150,7 @@ export default {
     .txt {
       font-weight: 700;
       height: 40px;
-      border-bottom: 2px dashed #999;
+      border-bottom: 2px dashed black;
     }
     .search {
       position: relative;

+ 1 - 1
src/views/tab4/index.vue

@@ -146,7 +146,7 @@ export default {
     .txt {
       font-weight: 700;
       height: 40px;
-      border-bottom: 2px dashed #999;
+      border-bottom: 2px dashed black;
     }
     .search {
       position: relative;

+ 1 - 1
src/views/tab5/index.vue

@@ -187,7 +187,7 @@ export default {
     .txt {
       font-weight: 700;
       height: 40px;
-      border-bottom: 2px dashed #999;
+      border-bottom: 2px dashed black;
     }
     .search {
       position: relative;