qinzhipeng_v 5 年之前
父节点
当前提交
c66f85c5e3

+ 9 - 0
src/api/reportTemplate.js

@@ -136,6 +136,15 @@ export function dailyReportList(data) {
   })
 }
 
+// 获取缺陷按日期分布数据
+export function bugGetReportDisDataByDate(data) {
+  return request({
+    url: Presentation + '/bug/getReportDisDataByDate',
+    method: 'post',
+    data
+  })
+}
+
 // 准出报告部分
 
 // 新版准出报告list

+ 14 - 10
src/router/index.js

@@ -587,8 +587,7 @@ export const constantRoutes = [{
   },
   {
     path: '/apiManagement',
-    hidden: true,
-    component: (resolve) => require(['@/views/apiManagement/index'], resolve),
+    component: (resolve) => require(['@/views/apiManagement/automatic'], resolve),
     name: '接口管理',
     meta: { title: '接口管理' }
   },
@@ -602,7 +601,6 @@ export const constantRoutes = [{
   {
     path: '/automation',
     component: (resolve) => require(['@/views/automation/index'], resolve),
-    // redirect: '/newWeb/index',
     name: '自动化',
     meta: { title: '自动化' },
     children: [{
@@ -612,15 +610,11 @@ export const constantRoutes = [{
       meta: { title: '扁鹊' }
     },
     {
-      path: '/apiManagemet',
+      path: '/apiManagement',
       name: 'api管理'
+      // component: (resolve) => require(['@/views/apiManagement/automatic.vue'], resolve),
+      // meta: { title: 'api管理' }
     }
-    // {
-    //   path: '/apiManagement',
-    //   name: 'api管理',
-    //   component: (resolve) => require(['@/views/apiManagement/index'], resolve),
-    //   meta: { title: 'api管理' }
-    // }
     ]
   }
   ]
@@ -648,6 +642,16 @@ const createRouter = () => new Router({
   routes: constantRoutes
 })
 const router = createRouter()
+router.beforeEach((to, from, next) => {
+  console.log(this)
+  if (to.name !== '接口管理') {
+    next()
+  } else {
+    window.open('http://zhihui-api.intra.didichuxing.com/', '_blank')
+    next({ path: from.path })
+    history.go(0)
+  }
+})
 
 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
 export function resetRouter() {

+ 0 - 67
src/views/apiManagement/apiList.vue

@@ -1,67 +0,0 @@
-<template>
-  <div>
-    <div v-if="isDetail == false" class="column">
-      <div class="titDiv">
-        <div class="titIcon" />
-        <div class="titSonName">{{ arr[0] }}</div>
-      </div>
-      {{ arr[1] }}
-      <el-table :data="tableData" :header-cell-style="{ background: '#F0F2F4', color: '#333B4A' }" size="mini" width="80%" border show-overflow-tooltip="true">
-        <el-table-column label="接口名称" prop="date" align="center" min-width="120">
-          <template slot-scope="scope">
-            <a href="javascript:void(0)" style="color:#20a0ff" @click="apiDetails(scope.row)">{{ scope.row.methodName }}</a>
-          </template>
-        </el-table-column>
-        <el-table-column label="接口路径" min-width="120" align="center">
-          <template slot-scope="scope">
-            {{ scope.row.methodPath }}
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <apiDetails v-if="isDetail" :list-id="Number(listId)" />
-  </div>
-</template>
-
-<script>
-import '@/views/apiManagement/css/index.css'
-import apiDetails from '@/views/apiManagement/vue/index'
-import { getDocList } from '@/api/apiManagerment.js'
-export default {
-  components: {
-    apiDetails
-  },
-  props: {
-    orderId: { type: Number, default: null }
-  },
-  data() {
-    return {
-      isDetail: false,
-      listId: '',
-      tableData: [],
-      arr: ['乘客远程服务接口共 10 个', 'OrderVoucherRemoteService 代金券远程服务', 'PedestrianVehicleSepRemoteService 人车分离远程服务', 'SmoothMoveRemoteService 平滑移动远程服务', 'Vehicle2BOrderRemoteService B端商户远程服务', 'DriverOrderQueryRemoteService 司机订单查询远程服务']
-    }
-  },
-  watch: {
-    orderId: {
-      immediate: true,
-      handler(ele) {
-        ele === 0 ? this.getList(1) : this.getList(ele)
-      }
-    },
-    methods: {
-      apiDetails(val) {
-        this.listId = val.id
-        this.isDetail = true
-      },
-      async getList(data) {
-        const res = await getDocList(data)
-        if (res.code === 200) {
-          this.tableData = res.data
-        } else {
-          this.$notify({ title: 'Failed', message: res.msg, type: 'error', duration: 3000 })
-        }
-      }
-    }
-  }}
-</script>

+ 28 - 0
src/views/apiManagement/automatic.vue

@@ -0,0 +1,28 @@
+<template>
+  <div>
+    <!-- <iframe :src="envUrl" style="width:100%;" scrolling="no" frameborder="0" :height="iframeHeight" /> -->
+  </div>
+</template>
+
+<script>
+// import { host } from '@/apiConfig/requestIP.js'
+export default {
+  name: 'ENV',
+  data() {
+    return {
+      show: true
+      // iframeHeight: '720px'
+    }
+  },
+  computed: {
+    envUrl() {
+      return 'http://zhihui-api.intra.didichuxing.com/'
+    }
+  },
+  mounted() {
+    window.open('http://zhihui-api.intra.didichuxing.com/', '_blank')
+    // var height = window.innerHeight > document.body.clientHeight ? window.innerHeight : document.body.clientHeight
+    // this.iframeHeight = height + 'px'
+  }
+}
+</script>

+ 0 - 40
src/views/apiManagement/css/index.css

@@ -1,40 +0,0 @@
-.Management .el-divider--horizontal {
-  display: block;
-  height: 1px;
-  width: 100%;
-  margin: 0%;
-}
-
-.titDiv {
-  display: flex;
-  align-items: center;
-  margin: 20px 0;
-}
-
-.titIcon {
-  width: 4px;
-  height: 17px;
-  background: #409EFF;
-  border-radius: 1px;
-}
-
-.titSonName {
-  width: 268px;
-  height: 20px;
-  font-size: 16px;
-  font-weight: 500;
-  color: rgba(51, 59, 74, 1);
-  margin-left: 6px
-}
-
-.choice:hover {
-  color: #00A0FF;
-}
-
-.column .el-dialog__header {
-  padding: 0px;
-}
-
-.column .el-input--small .el-input__inner {
-  border-color: #ffffff;
-}

+ 0 - 713
src/views/apiManagement/index.vue

@@ -1,713 +0,0 @@
-<template>
-  <el-container style=" background: #F2F3F6;">
-    <el-aside class="ApiLeft">
-      <div class="Api_space_evenly">
-        <div :class="{'Api_Interface_list' : Interface_list === '接口列表'}" class="Api_cursor" @click="InterfaceLeft('接口列表')">接口列表</div>
-        <div :class="{'Api_Interface_list' : Interface_list === '接口分类'}" class="Api_cursor" @click="InterfaceLeft('接口分类')">接口分类</div>
-      </div>
-      <div class="Api_search">
-        <el-input v-model="filterText" style="width: 55%;margin-left:4%" size="mini" prefix-icon="el-icon-search" clearable filterable placeholder="请搜索接口" />
-        <el-button v-if="Interface_list === '接口列表'" style="margin-left:4%" type="primary" size="mini">查询</el-button>
-        <el-button v-if="Interface_list === '接口分类'" style="margin-left:4%" type="primary" size="mini" @click="addType()">添加分类</el-button>
-      </div>
-      <div>
-        <el-tree
-          v-if="Interface_list === '接口分类'"
-          ref="tree"
-          class="filter-tree"
-          :data="list"
-          node-key="id"
-          :props="defaultProps"
-          empty-text="无相关接口,请确定搜索内容"
-          default-expand-all
-          :default-expanded-keys="key_arr"
-          :expand-on-click-node="false"
-          :filter-node-method="filterNode"
-          @node-click="handleNodeClick"
-        >
-          <!-- eslint-disable-next-line vue/no-template-shadow -->
-          <span slot-scope="{ node, data }" style="width:100%;display: flex; align-items: center; justify-content: space-between;" class="custom-tree-node" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
-            <span>{{ node.label }}</span>
-            <span v-show="data.parentId === 0 && data.del === true">
-              <el-tooltip class="item" effect="dark" content="添加接口" placement="top">
-                <span v-if="Interface_list === '接口分类'" class="el-icon-plus Api_btn" @click="() => append(data)" />
-              </el-tooltip>
-              <el-tooltip class="item" effect="dark" content="删除文档" placement="top">
-                <span v-if="Interface_list === '接口分类'" class="el-icon-delete Api_btn" @click="() => remove(data)" />
-              </el-tooltip>
-            </span>
-          </span>
-        </el-tree>
-        <el-tree
-          v-if="Interface_list === '接口列表'"
-          :data="list1"
-          node-key="id"
-          empty-text="无相关接口,请确定搜索内容"
-          :default-expanded-keys="key_arr"
-          :expand-on-click-node="false"
-          @node-click="handleNodeClick1"
-        /></div>
-      <div align="center" style="margin: 2% 0 10%;"><el-input v-if="ElMenu" v-model="filterText" style="width: 90%;" size="mini" prefix-icon="el-icon-search" clearable filterable placeholder="请搜索接口" /></div>
-    </el-aside>
-    <el-main class="ApiRight">
-      <div v-if="home" class="ApiRightContent">
-        <div class="Layout">
-          <div class="titFont" style="padding: 15px 0; font-size: 22px; font-family:PingFangSC-Medium,PingFang SC;font-weight:500; color:rgba(51,59,74,1); line-height:35px;">API </div>
-        </div>
-        <el-divider style="color: #EEF0F5; margin: 0 !important" />
-        <div style="font-size:18px; padding: 8% 0 1%; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:35px;">API接口管理平台介绍及接入文档</div>
-        <div style="font-size:14px; width: 80%; font-family:PingFangSC-Regular,PingFang SC; font-weight:400; color:rgba(102,102,102,1); line-height:20px;">计划与EMC合作建设公司级反馈平台,覆盖所有内外部反馈,内部大区、客服等渠道反馈,专项工作组case反馈跟踪等场景,项目较大,处于立项阶段,期望收集更多信息和建议。</div>
-      </div>
-
-      <!-- 接口分类的列表 -->
-      <div v-if="isList" class="ApiRight">
-        <div class="ApiRightContent" style="overflow:scroll; overflow-x: hidden;margin-left:-11px;margin-top:-10px;">
-          <div>
-            <div class="column">
-              <div class="titDiv">
-                <div class="titIcon" />
-                <div class="titSonName">{{ clickData.docName }}</div>
-              </div>
-              <el-table :data="typeListData" :header-cell-style="{ background: '#F0F2F4', color: '#333B4A' }" size="mini" width="80%" border show-overflow-tooltip="true">
-                <el-table-column label="接口名称" prop="date" align="center" min-width="120">
-                  <template slot-scope="scope">
-                    <a href="javascript:void(0)" style="color:#20a0ff" @click="clickDetail(scope.row.id)">{{ scope.row.methodName }}</a>
-                  </template>
-                </el-table-column>
-                <el-table-column label="接口路径" min-width="120" align="center">
-                  <template slot-scope="scope">
-                    {{ scope.row.methodPath }}
-                  </template>
-                </el-table-column>
-              </el-table>
-            </div>
-          </div>
-        </div>
-      </div>
-      <!-- 接口列表的列表 -->
-      <div v-if="isList1" class="ApiRight">
-        <div class="ApiRightContent" style="overflow:scroll; overflow-x: hidden;margin-left:-11px;margin-top:-10px;">
-          <div>
-            <div class="column">
-              <div class="titDiv">
-                <div class="titIcon" />
-                <div class="titSonName">{{ clickData.docName }}</div>
-              </div>
-              <el-table :data="tableData1" :header-cell-style="{ background: '#F0F2F4', color: '#333B4A' }" size="mini" width="80%" border show-overflow-tooltip="true">
-                <el-table-column label="方法名称" prop="prettyshortprint" align="center" min-width="120">
-                  <template slot-scope="scope">
-                    <a href="javascript:void(0)" style="color:#20a0ff" @click="clickDetail(scope.row.id)">{{ scope.row.prettyShortPrint }}</a>
-                  </template>
-                </el-table-column>
-              </el-table>
-            </div>
-          </div>
-        </div>
-      </div>
-
-      <!-- 接口详情 -->
-      <div v-if="detail" class="ApiRight">
-        <div class="ApiRightContent" style="overflow:scroll; overflow-x: hidden;margin-left:-11px;margin-top:-10px;">
-          <div class="column">
-            <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
-              <el-menu-item index="1">预览</el-menu-item>
-              <el-menu-item index="2" disabled>编辑</el-menu-item>
-              <el-menu-item index="3" disabled>运行</el-menu-item>
-            </el-menu>
-
-            <div class="titDiv">
-              <div class="titIcon" />
-              <div class="titSonName">基本信息</div>
-            </div>
-
-            <div style="display:flex;justify-content:space-between;width:65%;margin-left:3%;margin-top:4%">
-              <div class="searchName">接口名称 :
-                {{ baseData.methodName }}
-              </div>
-              <div class="searchName">创建人 :
-                {{ clickData.creator }}
-              </div>
-            </div>
-            <div style="display:flex;justify-content:space-between;width:65%;margin-left:3%;margin-top:3%">
-              <div class="searchName">更新时间 :
-                {{ baseData.gmtModify | formatDate }}
-              </div>
-              <div class="searchName">api版本号 :
-                {{ baseData.currentVersion }}
-              </div>
-            </div>
-            <div style="display:flex;justify-content:space-between;width:100%;margin-left:3%;margin-top:3%">
-              <div class="searchName">接口路径 : {{ baseData.methodPath }}</div>
-            </div>
-
-            <div class="titDiv" style="margin-top:40px">
-              <div class="titIcon" />
-              <div class="titSonName">备注</div>
-            </div>
-            <div class="Layout_space_between" style="margin-left: 20px;color:#606266">
-              {{ baseData.memo }}
-            </div>
-
-            <div class="titDiv" style="margin-top:40px">
-              <div class="titIcon" />
-              <div class="titSonName">请求参数</div>
-            </div>
-            <div class="Layout_space_between" style="margin-left: 20px;color:#606266">
-              <div class="searchName">Query : </div>
-            </div>
-
-            <div class="Layout_space_between" style="margin-left: 20px;color:#606266">
-              <el-table
-                :data="paramData"
-                style="width: 100%;margin-top:10px"
-                row-key="id"
-                border
-                stripe
-                lazy
-                :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
-                :header-cell-style="{ background: '#cccccc', color: '#606266' }"
-              >
-                <el-table-column prop="fieldName" label="参数名称" />
-                <el-table-column prop="fieldType" label="参数类型" />
-              </el-table>
-            </div>
-            <div class="titDiv" style="margin-top:40px">
-              <div class="titIcon" />
-              <div class="titSonName">返回数据</div>
-            </div>
-            <div class="Layout">
-              <el-input
-                v-model="didi"
-                style="color:#333B4A"
-                type="textarea"
-                :autosize="{ minRows: 15, maxRows: 15}"
-                :placeholder="didi"
-              />
-            </div>
-          </div>
-        </div>
-      </div>
-    </el-main>
-
-    <!-- 新建分类 -->
-    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogAddTypeVisible" width="40%">
-      <div style="margin-left:60px">
-        <el-form ref="addDeviceForms" :rules="addTreeTypeRules" :model="addTreeType">
-          <el-form-item label="分类名" prop="docName" label-width="80px">
-            <el-input v-model="addTreeType.docName" size="small" clearable style="width:75%;" placeholder="请填写" />
-          </el-form-item>
-          <el-form-item label="备注" label-width="80px">
-            <el-input v-model="addTreeType.text" size="small" clearable style="width:75%;" placeholder="请填写" />
-          </el-form-item>
-        </el-form>
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button size="small" @click="dialogAddTypeVisible = false">取消</el-button>
-        <el-button size="small" type="primary" @click="addTreeTpye(addTreeType)">确定</el-button>
-      </div>
-    </el-dialog>
-
-    <!--添加接口-->
-    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogAddPortVisible" width="60%">
-      <div style="margin-left:60px">
-        <el-form ref="addTreeTypeForms" :rules="addTreeTypeRules" :model="addTreeType">
-          <el-form-item label="接口名称" prop="docName" label-width="120px">
-            <el-input v-model="addTreeType.docName" size="small" style="width:75%;" clearable placeholder="请填写" />
-          </el-form-item>
-          <el-form-item label="项目" prop="projectName" label-width="120px">
-            <el-select v-model="addTreeType.projectName" size="small" class="filter-item" filterable clearable placeholder="请填写" style="width:75%;" @change="getModuleOpt()">
-              <el-option v-for="item in projectOpt" :key="item.key" :label="item.value" :value="item.value" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="模块" prop="projectModule" label-width="120px">
-            <el-select v-model="addTreeType.projectModule" size="small" class="filter-item" filterable clearable placeholder="请填写" style="width:75%;" @change="getVersionOpt()">
-              <el-option v-for="item in moduleOpt" :key="item.key" :label="item.value" :value="item.value" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="版本" prop="version" label-width="120px">
-            <el-select v-model="addTreeType.version" size="small" class="filter-item" filterable clearable placeholder="请填写" style="width:75%;" @change="getApiOpt()">
-              <el-option v-for="item in versionOpt" :key="item.key" :label="item.value" :value="item.value" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="接口类名" prop="interfaceId" label-width="120px">
-            <el-select v-model="addTreeType.interfaceId" size="small" class="filter-item" filterable clearable placeholder="请填写" style="width:75%;" @change="getMethodOpt()">
-              <el-option v-for="item in apiOpt" :key="item.id" :label="item.interfacePath" :value="item.id" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="方法名" prop="methodId" label-width="120px">
-            <el-select v-model="addTreeType.methodId" size="small" class="filter-item" filterable clearable placeholder="请填写" style="width:75%;">
-              <el-option v-for="item in methodsOpt" :key="item.id" :label="item.prettyShortPrint" :value="item.id" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="备注" label-width="120px">
-            <el-input v-model="addTreeType.text" size="small" style="width:75%;" clearable placeholder="请填写" />
-          </el-form-item>
-        </el-form>
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button size="small" @click="dialogAddPortVisible = false">取消</el-button>
-        <el-button size="small" type="primary" @click="addPortTpye(addTreeType)">确定</el-button>
-      </div>
-      <div style="margin-top:5%" />
-    </el-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import '@/views/projectManage/publicCss/index.css'
-import '@/views/apiManagement/css/index.css'
-import dayjs from 'dayjs'
-import { getParam, getReturn, getApiDetail, getPortDoc, getDocList, createType, getInterfaceInfoListByBizLineId, getProject, getModule, getVersion, getApi, delProject, getMethod, getMethodList } from '@/api/apiManagerment.js'
-
-export default {
-  filters: {
-    formatDate(e) {
-      return dayjs(e).format('YYYY-MM-DD HH:mm:ss')
-    }
-  },
-  data() {
-    return {
-      id: '',
-      label: '',
-      key_arr: [],
-      Interface_list: '接口列表',
-      value: '',
-      home: true,
-      ElMenu: false,
-      detail: false,
-      isList: false,
-      isList1: false,
-      defaultProps: {
-        children: 'children',
-        label: 'label'
-      },
-      docName: '',
-      parentId: '',
-      dialogAddPortVisible: false,
-      dialogAddTypeVisible: false,
-      userInformation: localStorage.getItem('username'),
-      userNames: localStorage.getItem('realname'),
-      textMap: {
-        addType: '添加分类',
-        addPort: '添加接口',
-        editPort: '编辑接口'
-      },
-      dialogStatus: '',
-      addTreeType: {},
-      data: {},
-      bizLineId: {},
-      addTreeTypeRules: {
-        docName: [{ required: true, message: '不能为空', trigger: 'change' }],
-        projectName: [{ required: true, message: '不能为空', trigger: 'change' }],
-        projectModule: [{ required: true, message: '不能为空', trigger: 'change' }],
-        version: [{ required: true, message: '不能为空', trigger: 'change' }],
-        interfaceId: [{ required: true, message: '不能为空', trigger: 'change' }],
-        methodId: [{ required: true, message: '不能为空', trigger: 'change' }]
-
-      },
-      list: [],
-      list1: [],
-      portTreeList: [],
-      projectOpt: [],
-      moduleOpt: [],
-      versionOpt: [],
-      apiOpt: [],
-      filterText: '',
-      typeListData: [],
-      typeListData1: [],
-      clickData: {}, // 点击树获取到的数据
-      methodsOpt: [],
-      didi: '{"code":200,"data":[{"id":6,"docName":"86979","parentId":0,"fileType":1,"children":[]},{"id":1,"docName":"测试文档","parentId":0,"fileType":0,"children":[{"id":3,"docName":"测试文档2","parentId":1,"fileType":1,"children":[{"id":4,"docName":"测试文档3","parentId":3,"fileType":1,"children":[]},{"id":5,"docName":"测试文档4","parentId":3,"fileType":1,"children":[]}]},{"id":2,"docName":"测试小文档","parentId":1,"fileType":2,"methodId":1,"children":[]}]}],"msg":"OK"}',
-      paramData: [],
-      activeIndex: '1',
-      baseData: {},
-      tableData1: [],
-      lastChildrens: [],
-      name: [],
-      all_bizId: [] // 业务线
-    }
-  },
-  watch: {
-    filterText(val) {
-      this.$refs.tree.filter(val)
-    }
-  },
-  created() {
-    this.$store.state.data.status = true
-    this.getPortTree()
-    this.getListTree()
-    this.getProjectOpt()
-  },
-  destroyed() {
-    this.$store.state.data.status = false
-  },
-
-  methods: {
-    InterfaceLeft(vel) {
-      vel === '接口分类' ? this.Interface_list = '接口分类' : this.Interface_list = '接口列表'
-    },
-    append(data) { // 添加节点
-      this.dialogAddPortVisible = true
-      this.dialogStatus = 'addPort'
-      this.parentId = data.id
-      // this.$refs.addTreeTypeForms.resetFields()
-    },
-    mouseenter(data) { // 导航栏显示新建/删除/编辑
-      this.$set(data, 'del', true)
-    },
-    mouseleave(data) { // 导航栏隐藏新建/删除/编辑
-      this.$set(data, 'del', false)
-    },
-
-    // 根据方法id获取详情
-    clickDetail(data) {
-      this.detail = true
-      this.isList1 = false
-      this.isList = false
-      this.getapiDetails(data)
-    },
-    getapiDetails(data) {
-      getApiDetail(data).then(response => {
-        this.baseData = response.data
-        this.getParams(data)
-        this.getReturns(data)
-      })
-    },
-    handlerData(arr) {
-      return arr.map((item, index) => {
-        return {
-          key: index,
-          value: item
-        }
-      })
-    },
-    // 获取新增接口里的枚举值
-    getProjectOpt() {
-      getProject(Number(localStorage.getItem('bizId'))).then(response => {
-        this.projectOpt = this.handlerData(response.data)
-      })
-    },
-    getModuleOpt(bizLineId, projectName) {
-      getModule(Number(localStorage.getItem('bizId')), this.addTreeType.projectName).then(response => {
-        this.moduleOpt = this.handlerData(response.data)
-      })
-    },
-    getVersionOpt(bizLineId, projectName, projectModule) {
-      getVersion(Number(localStorage.getItem('bizId')), this.addTreeType.projectName, this.addTreeType.projectModule).then(response => {
-        this.versionOpt = this.handlerData(response.data)
-      })
-    },
-    getApiOpt() {
-      getApi(this.addTreeType.projectName, this.addTreeType.projectModule, this.addTreeType.version).then(response => {
-        this.apiOpt = response.data
-      })
-    },
-    getMethodOpt(data) {
-      getMethod(this.addTreeType.interfaceId).then(response => {
-        this.methodsOpt = response.data
-      })
-    },
-    // 根据ID获取分类列表
-    getTypeList() {
-      getDocList(this.clickData.id).then(response => {
-        this.typeListData = response.data
-      })
-    },
-
-    // 根据ID获取接口列表
-    getApiList(data) {
-      getMethodList(data).then(response => {
-        this.typeListData1 = response.data
-      })
-    },
-    // 获取接口分类树
-    getPortTree() {
-      getPortDoc(Number(localStorage.getItem('bizId'))).then(response => {
-        this.list = response.data
-        this.list = this.list.map(item => ({
-          ...item,
-          label: item.docName,
-          children: item.children ? item.children.map(item => ({
-            ...item,
-            label: item.docName,
-            children: item.children ? item.children.map(item => ({
-              ...item,
-              label: item.docName,
-              children: item.children ? item.children.map(item => ({
-                ...item,
-                label: item.docName
-              })) : ''
-            })) : ''
-          })) : ''
-        }))
-        this.portTreeList = []
-      })
-    },
-    // 获取接口列表树
-    getListTree() {
-      getInterfaceInfoListByBizLineId(Number(localStorage.getItem('bizId'))).then(response => {
-        this.list1 = response.data
-        this.list1 = this.list1.map(item => ({
-          ...item,
-          label: item.docName,
-          parentId: item.children ? 0 : 1,
-          children: item.children ? item.children.map(item => ({
-            ...item,
-            label: item.docName,
-            children: item.children ? item.children.map(item => ({
-              ...item,
-              label: item.docName,
-              children: item.children ? item.children.map(item => ({
-                ...item,
-                label: item.docName
-              })) : ''
-            })) : ''
-          })) : ''
-        }))
-        this.portTreeList = []
-        this.list1.map(item => {
-          this.findLastChildren(item.children)
-        })
-      })
-    },
-
-    // 添加接口
-    addPortTpye(data) {
-      this.$refs['addTreeTypeForms'].validate((valid) => {
-        if (valid) {
-          this.addTreeType.bizLineId = Number(localStorage.getItem('bizId'))
-          this.addTreeType.fileType = 2
-          this.addTreeType.parentId = this.parentId
-          this.addTreeType.creator = this.userNames
-          createType(this.addTreeType).then(response => {
-            if (response.code === 200) {
-              this.getPortTree()
-              this.getTypeList()
-              this.dialogAddPortVisible = false
-              this.$notify({ title: 'Success', message: response.msg, type: 'success', duration: 3000 })
-            } else {
-              this.$notify({ title: 'Failed', message: response.msg, type: 'error', duration: 3000 })
-            }
-          })
-        }
-      })
-    },
-
-    // 添加分类
-    addTreeTpye(data) {
-      this.addTreeType.docName = data.docName
-      this.addTreeType.fileType = 1
-      this.addTreeType.creator = this.userNames
-      this.addTreeType.bizLineId = Number(localStorage.getItem('bizId'))
-      createType(this.addTreeType).then(response => {
-        if (response.code === 200) {
-          this.getPortTree()
-          this.dialogAddTypeVisible = false
-          this.$notify({ title: 'Success', message: response.msg, type: 'success', duration: 3000 })
-        } else {
-          this.$notify({ title: 'Failed', message: response.msg, type: 'error', duration: 3000 })
-        }
-      })
-    },
-    // 删除节点
-    remove(node, data) {
-      this.$confirm('是否确认?', '删除接口', {
-        distinguishCancelAndClose: true,
-        confirmButtonText: '确定',
-        cancelButtonText: '取消'
-      })
-        .then(() => {
-          delProject(this.clickData.id).then(response => {
-            if (response.code === 200) {
-              this.getPortTree()
-              this.$notify({ title: 'Success', message: response.msg, type: 'success', duration: 3000 })
-            } else {
-              this.$notify({ title: 'Failed', message: response.msg, type: 'error', duration: 3000 })
-            }
-          })
-        })
-        .catch(action => {
-          this.$message({ type: 'success', message: '已取消' })
-        })
-    },
-    // 接口分类点击节点
-    handleNodeClick(data) {
-      this.clickData = data
-      if (data.parentId === 0) {
-        this.isList = true
-        this.home = false
-        this.detail = false
-        this.isList1 = false
-        this.getTypeList(this.clickData.id)
-      }
-      if (data.parentId !== 0) {
-        this.detail = true
-        this.home = false
-        this.isList = false
-        this.isList1 = false
-        this.getapiDetails(this.clickData.methodId)
-      }
-    },
-    // 接口列表点击节点
-    handleNodeClick1(data) {
-      this.clickData = data
-      this.clickData = data
-      if (data.children) {
-        this.isList = false
-        this.isList1 = false
-        this.home = true
-        this.detail = false
-        this.findLastChildren(data.children)
-      }
-      if (!data.children) {
-        this.isList1 = true
-        this.home = false
-        this.isList = false
-        this.detail = false
-        this.getMethodListById(this.clickData.id)
-      }
-    },
-    // 找到树最后的子节点
-    findLastChildren(arr) {
-      arr.map(item => {
-        if (item.children) {
-          this.findLastChildren(item.children)
-        } else {
-          this.name = (item.label).split('.')
-          item.label = this.name[this.name.length - 1]
-          this.lastChildrens.push(item)
-        }
-      })
-    },
-    // 添加方法
-    addPort() {
-      this.dialogAddPortVisible = true
-      this.dialogStatus = 'addPort'
-    },
-    // 添加分类
-    addType() {
-      this.dialogAddTypeVisible = true
-      this.dialogStatus = 'addType'
-    },
-
-    handleSelect(key, keyPath) {
-      console.log(key, keyPath)
-    },
-    // 转成json
-    getLsit: function(jsonStr) {
-      var res = ''
-      for (var i = 0, j = 0, k = 0, ii, ele; i < jsonStr.length; i++) { // k:缩进,j:""个数
-        ele = jsonStr.charAt(i)
-        if (j % 2 === 0 && ele === '}') {
-          k--
-          for (ii = 0; ii < k; ii++) ele = '    ' + ele
-          ele = '\n' + ele
-        } else if (j % 2 === 0 && ele === '{') {
-          ele += '\n'
-          k++
-          for (ii = 0; ii < k; ii++) ele += '    '
-        } else if (j % 2 === 0 && ele === ',') {
-          ele += '\n'
-          for (ii = 0; ii < k; ii++) ele += '    '
-        } else if (ele === '"') j++
-        res += ele
-      }
-      // eslint-disable-next-line no-return-assign
-      return this.didi = res
-    },
-    // 点击接口列表方法
-    getMethodListById(ele) {
-      getMethodList(ele).then(response => {
-        this.tableData1 = response.data
-      })
-    },
-    // 获取接口详情页请求参数
-    getParams(ele) {
-      getParam(ele).then(response => {
-        this.paramData = response.data
-      })
-    },
-    // 获取接口详情页返回参数
-    getReturns(ele) {
-      getReturn(ele).then(response => {
-        this.didi = JSON.stringify(response.data)
-        this.getLsit(this.didi)
-      })
-    },
-    // 过滤树
-    filterNode(value, data) {
-      if (!value) return true
-      return data.label.indexOf(value) !== -1
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-  .ApiLeft {
-    padding: 10px 0px 0px 10px;
-    background: #FFF;
-    color: #333B4A;
-    margin: 10px 0px 10px 10px;
-    min-height: calc(100vh - 76px);
-    .Api_search {
-      margin: 10px 0;
-    }
-    .Api_btn {
-      margin: 0 5px;
-      cursor: pointer;
-    }
-    .Api_btn:hover {
-      color: #409EFF;
-    }
-  }
-  .ApiRight {
-    padding: 10px;
-    background: #F2F3F6;
-    color: #333B4A;
-    min-height: calc(100vh - 65px);
-    .ApiRightContent {
-      background: #FFF;
-      min-height: calc(100vh - 75px);
-      padding: 0.5% 3%;
-      border-radius: 4px;
-      .Layout_space_between{
-        /deep/ .el-table--striped .el-table__body tr.el-table__row--striped td {
-        background: #cccccc;}
-      }
-      .searchName {
-        font-size:14px;
-        font-family:MicrosoftYaHei;
-        line-height:17px;
-        color:#909399;
-        opacity:1;
-        font-weight: 600;}
-      }
-  }
-  .custom-tree-node {
-    flex: 1;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    font-size: 14px;
-    padding-right: 8px;
-  }
-
-  .Api_space_evenly {  // 布局
-    display: flex;
-    align-items: center;
-    justify-content: space-evenly;
-  }
-
-  .Api_Interface_list { // 接口列表和接口分类按钮颜色
-    color: #409EFF;
-    border-bottom: 2px solid #409EFF;
-    padding-bottom: 3px;
-  }
-
-  .Api_cursor { // 小手
-    cursor: pointer;
-  }
-
-</style>

+ 0 - 237
src/views/apiManagement/vue/index.vue

@@ -1,237 +0,0 @@
-<template>
-  <div class="column">
-    <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
-      <el-menu-item index="1">预览</el-menu-item>
-      <el-menu-item index="2" disabled>编辑</el-menu-item>
-      <el-menu-item index="3" disabled>运行</el-menu-item>
-    </el-menu>
-
-    <div class="titDiv">
-      <div class="titIcon" />
-      <div class="titSonName">基本信息</div>
-    </div>
-
-    <div class="Layout_space_between" style="margin-left: 20px">
-      <div style="flex:1;margin-top:20px" class="Layout_flex_start">
-        <div class="searchName">接口名称 : </div>
-        <span style="margin-left: 8px;color:#606266">
-          {{ baseData.methodName }}
-        </span>
-      </div>
-      <div style="flex:1;margin-top:20px" class="Layout_flex_start">
-        <div class="searchName">创建人 : </div>
-        <span style="margin-left: 8px;color:#606266">
-          {{ baseData.name }}
-        </span>
-      </div>
-    </div>
-    <div class="Layout_flex_start" style="margin-left: 20px">
-      <div style="flex:1;;margin-top:20px" class="Layout_flex_start">
-        <div class="searchName">更新时间 : </div>
-        <span style="margin-left: 8px;color:#606266">
-          {{ baseData.gmtModify | formatDate }}
-        </span>
-      </div>
-      <div style="flex:1;margin-top:20px" class="Layout_flex_start">
-        <div class="searchName">api版本号 : </div>
-        <span style="margin-left: 8px;color:#606266">
-          {{ baseData.currentVersion }}
-        </span>
-      </div>
-    </div>
-
-    <div class="Layout_flex_start" style="margin-left: 20px">
-      <div class="Layout_space_between" style="margin-top:20px">
-        <div class="searchName">接口路径 : </div>
-        <span style="margin-left: 8px;color:#606266">
-          {{ baseData.methodPath }}
-        </span>
-      </div>
-    </div>
-
-    <div class="titDiv" style="margin-top:40px">
-      <div class="titIcon" />
-      <div class="titSonName">备注</div>
-    </div>
-    <div class="Layout_space_between" style="margin-left: 20px;color:#606266">
-      {{ baseData.memo }}
-    </div>
-
-    <div class="titDiv" style="margin-top:40px">
-      <div class="titIcon" />
-      <div class="titSonName">请求参数</div>
-    </div>
-    <div class="Layout_space_between" style="margin-left: 20px;color:#606266">
-      <div class="searchName">Query : </div>
-    </div>
-
-    <div class="Layout_space_between" style="margin-left: 20px;color:#606266">
-      <el-table
-        :data="paramData"
-        style="width: 100%;margin-top:10px"
-        row-key="id"
-        border
-        stripe
-        lazy
-        :load="load"
-        :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
-        :header-cell-style="{ background: '#cccccc', color: '#606266' }"
-      >
-        <el-table-column prop="fieldName" label="参数名称" />
-        <el-table-column prop="fieldType" label="参数类型" />
-      </el-table>
-    </div>
-    <div class="titDiv" style="margin-top:40px">
-      <div class="titIcon" />
-      <div class="titSonName">返回数据</div>
-    </div>
-    <div class="Layout">
-      <el-input
-        v-model="didi"
-        style="color:#333B4A"
-        type="textarea"
-        :autosize="{ minRows: 15, maxRows: 15}"
-        :placeholder="didi"
-      />
-    </div>
-  </div>
-</template>
-
-<script>
-import '@/views/apiManagement/css/index.css'
-import '@/styles/PublicStyle/index.scss'
-import dayjs from 'dayjs'
-import { getMethodList, getParam, getReturn } from '@/api/apiManagerment.js'
-
-export default {
-  filters: {
-    formatDate(e) {
-      return dayjs(e).format('YYYY-MM-DD HH:mm:ss')
-    }
-  },
-  props: {
-    orderId: { type: Number, default: null },
-    listId: { type: Number, default: null }
-  },
-  data() {
-    return {
-      didi: '{"code":200,"data":[{"id":6,"docName":"86979","parentId":0,"fileType":1,"children":[]},{"id":1,"docName":"测试文档","parentId":0,"fileType":0,"children":[{"id":3,"docName":"测试文档2","parentId":1,"fileType":1,"children":[{"id":4,"docName":"测试文档3","parentId":3,"fileType":1,"children":[]},{"id":5,"docName":"测试文档4","parentId":3,"fileType":1,"children":[]}]},{"id":2,"docName":"测试小文档","parentId":1,"fileType":2,"methodId":1,"children":[]}]}],"msg":"OK"}',
-      value: '',
-      derId: this.orderId,
-      paramData: [],
-      centerDialogVisible: false,
-      describe: '',
-      textarea2: '',
-      activeIndex: '1',
-      baseData: {},
-      tableData: [],
-      tableData1: [],
-      arr: ['PassRemoteService 乘客远程服务', 'OrderVoucherRemoteService 代金券远程服务', 'PedestrianVehicleSepRemoteService 人车分离远程服务', 'SmoothMoveRemoteService 平滑移动远程服务', 'Vehicle2BOrderRemoteService B端商户远程服务', 'DriverOrderQueryRemoteService 司机订单查询远程服务']
-    }
-  },
-  watch: {
-    orderId: {
-      immediate: true,
-      handler(ele) {
-        ele === 0 ? this.getParams(1) : this.getParams(ele)
-        ele === 0 ? this.getReturns(1) : this.getReturns(ele)
-        ele === 0 ? this.getMethodListById(1) : this.getMethodListById(ele)
-      }
-    },
-    listId: {
-      immediate: true,
-      handler(show) {
-        show === 0 ? this.getParams(1) : this.getParams(show)
-        show === 0 ? this.getReturns(1) : this.getReturns(show)
-        show === 0 ? this.getMethodListById(1) : this.getMethodListById(show)
-      }
-    }
-  },
-  created() {
-    this.getLsit(this.didi)
-    // this.getParams()
-    // this.getMethodListById()
-  },
-  methods: {
-    init(e, ele) {
-      console.log(e)
-    },
-    handleSelect(key, keyPath) {
-      console.log(key, keyPath)
-    },
-    getLsit: function(jsonStr) {
-      var res = ''
-      for (var i = 0, j = 0, k = 0, ii, ele; i < jsonStr.length; i++) { // k:缩进,j:""个数
-        ele = jsonStr.charAt(i)
-        if (j % 2 === 0 && ele === '}') {
-          k--
-          for (ii = 0; ii < k; ii++) ele = '    ' + ele
-          ele = '\n' + ele
-        } else if (j % 2 === 0 && ele === '{') {
-          ele += '\n'
-          k++
-          for (ii = 0; ii < k; ii++) ele += '    '
-        } else if (j % 2 === 0 && ele === ',') {
-          ele += '\n'
-          for (ii = 0; ii < k; ii++) ele += '    '
-        } else if (ele === '"') j++
-        res += ele
-      }
-      // eslint-disable-next-line no-return-assign
-      return this.didi = res
-    },
-    getMethodListById(ele) {
-      getMethodList(ele).then(response => {
-        this.baseData = response.data
-      })
-    },
-
-    getParams(ele) {
-      getParam(ele).then(response => {
-        this.paramData = response.data
-      })
-    },
-
-    getReturns(ele) {
-      getReturn(ele).then(response => {
-        this.didi = JSON.stringify(response.data)
-        this.getLsit(this.didi)
-      })
-    },
-
-    load(tree, treeNode, resolve) {
-      setTimeout(() => {
-        resolve([
-          {
-            id: 31,
-            date: '2016-05-01',
-            name: '王小虎',
-            address: '上海市普陀区金沙江路 1519 弄'
-          }, {
-            id: 32,
-            date: '2016-05-01',
-            name: '王小虎',
-            address: '上海市普陀区金沙江路 1519 弄'
-          }
-        ])
-      }, 1000)
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-.searchName {
-  font-size:14px;
-  font-family:MicrosoftYaHei;
-  line-height:17px;
-  color:#909399;
-  opacity:1;
-  font-weight: 600;
-}
-.Layout_space_between{
-  /deep/ .el-table--striped .el-table__body tr.el-table__row--striped td {
-    background: #cccccc;
-}
-}
-
-</style>

+ 151 - 86
src/views/projectManage/projectList/components/mileStone.vue

@@ -1,37 +1,36 @@
 <template>
   <div>
-    <div style="margin-top: 14%;">
-      <el-divider content-position="right">
-        <el-tooltip class="item" effect="dark" content="温馨提示:点击添加可以新建里程碑" placement="bottom-end">
-          <el-button style="z-index: 999999;" size="mini" type="primary" icon="el-icon-plus" circle @click="details_projectMilepost" />
-        </el-tooltip>
-      </el-divider>
-      <ul class="time-line">
-        <li v-for="(item, index) in valuesList" :key="index">
-          <i>
-            <div>
-              <el-popover class="popover" placement="top" width="200" trigger="click" style="border-radius: 10px;">
-                <p style="text-align: center">
-                  <el-button size="mini" @click="dalete_Milepost = true">删除</el-button>
-                  <el-button size="mini" type="primary" @click="query_date">编辑</el-button>
-                </p>
-                <b slot="reference" @click="get_Milepost(item)">一&nbsp;</b>
-              </el-popover>
-            </div>
-          </i>
-          <div>
-            <p style="white-space:pre-line;"><pre class="description">{{ item.description }}</pre></p>
-            <span style="font-size: 16px; color: #333B4A; font-weight: 500;">{{ item.title | ellipsis(20) }}</span><br>
-            <span style="font-size: 12px; color: #9B9B9B;">{{ item.date | dateStr }}</span>
+    <div class="swiper-container" style="padding: 2% 0;">
+      <el-tooltip class="item" effect="dark" content="温馨提示:点击添加可以新建里程碑" placement="bottom-end">
+        <span class="el-icon-circle-plus-outline created" @click="details_projectMilepost" />
+      </el-tooltip>
+      <swiper ref="mySwiper" class="swiper-wrapper timeline" :options="options">
+        <swiper-slide v-for="(item,index) in valuesList" :key="index" class="swiper-slide">
+          <div class="line" />
+          <div class="center circle circle2">
+            <el-popover placement="top" width="200" trigger="click">
+              <p style="text-align: center">
+                <el-button size="mini" @click="dalete_Milepost = true">删除</el-button>
+                <el-button size="mini" type="primary" @click="query_date">编辑</el-button>
+              </p>
+              <div slot="reference" class="circle-of center" @click="get_Milepost(item)" />
+            </el-popover>
           </div>
-        </li>
-      </ul>
+          <div class="content3">
+            {{ item.title | ellipsis(20) }}
+          </div>
+          <div class="content1">
+            {{ item.date | dateStr }}
+          </div>
+          <div class="content2">
+            {{ item.description }}
+          </div>
+        </swiper-slide>
+      </swiper>
     </div>
-    <el-dialog :visible.sync="dialogFormVisible" class="dialog" :close-on-click-modal="false" @close="close_dialog">
-      <div style="display:flex;align-items: center;margin:0 0 30px 10px;">
-        <div class="titIcon" />
-        <div style="width:150px;height:20px;font-size:18px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px">{{ title_name }}</div>
-      </div>
+
+    <el-dialog :title="title_name" :visible.sync="dialogFormVisible" class="dialog public_task" :close-on-click-modal="false" @close="close_dialog">
+      <div class="blueStripe" />
       <el-form
         ref="form"
         :model="form"
@@ -67,23 +66,35 @@
         <el-button type="primary" @click="Milepost_Submission(form)">提 交</el-button>
       </div>
     </el-dialog>
-    <el-dialog :visible.sync="dalete_Milepost" width="30%" center :close-on-click-modal="false">
-      <div align="center">确定要删除 {{ get_Milepost_data.title }} 项目吗?</div>
+
+    <el-dialog title="删除确认" class="public_task" :visible.sync="dalete_Milepost" width="30%" :close-on-click-modal="false">
+      <div class="blueStripe" />
+      <p align="center">确定要删除 {{ get_Milepost_data.title }} 项目吗?</p>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="dalete_Milepost = false">关 闭</el-button>
-        <el-button type="primary" @click="select_Milepost">确 定</el-button>
+        <el-button size="mini" @click="dalete_Milepost = false">关 闭</el-button>
+        <el-button size="mini" type="primary" @click="select_Milepost">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 <script>
 const _ = require('lodash')
+import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper'
+import 'swiper/css/swiper.css'
+import '@/styles/PublicStyle/index.scss'
 import {
   mileStoneCreate,
   mileStoneUpdate,
   mileStoneDelete
 } from '@/api/projectIndex'
 export default {
+  components: {
+    Swiper,
+    SwiperSlide
+  },
+  directives: {
+    swiper: directive
+  },
   filters: {
     dateStr(value) {
       if (!value) return ''
@@ -153,10 +164,21 @@ export default {
         title: [{ required: true, validator: validatePass, trigger: 'blur' }],
         mtime: [{ required: true, validator: validate, trigger: 'blur' }]
       },
-      form: {}
+      form: {},
+      steps: [],
+      options: {
+        pagination: {
+          el: '.swiper-pagination'
+        },
+        slidesPerView: 5,
+        grabCursor: true
+      }
     }
   },
   computed: {
+    swiper() {
+      return this.$refs.mySwiper.$swiper
+    },
     isEmpty() {
       return this.inputValue === ''
     }
@@ -247,60 +269,103 @@ export default {
   }
 }
 </script>
+
 <style scoped lang="scss">
->>>.el-divider--horizontal {
-  margin: 0;
+.swiper-container {
+  position: relative;
 }
-.time-line {
+.timeline {
+  width: calc(100% - 60px);
   list-style-type: none;
-  padding: 0px;
-  margin: 0px;
-  width: 100%;
-  height: 20vh;
-  min-height: 150px;
-  white-space: nowrap;
-  li {
-    display: inline-block;
-    position: relative;
-    text-align: center;
-    width: 24%;
-    padding-top: 4%;
-    margin: 0 1%;
-    i div {
-      position: absolute;
-      top: -10px;
-      left: 50%;
-      margin-left: -10px;
-      width: 20px;
-      height: 20px;
-      b {
-        display: inline-block;
-        cursor: pointer;
-        border: 2px solid #61D3B8;
-        border-radius: 50%;
-        background: #61D3B8;
-        color: #61D3B8;
-        z-index: 9999;
-        width: 20px;
-        height: 20px;
-      }
-    }
-    i:before {
-      content: '';
-      width: 0%;
-      text-align: center;
-      position: absolute;
-      top: -50%;
-      left: 49.3%;
-      height: 100%;
-      border: 1px dashed #BBBBBB;
-    }
-    div {
-      text-align: center;
-      width: 100%;
-      position: absolute;
-      bottom: 284%;
-    }
+  display: flex;
+  padding: 0;
+  text-align: center;
+}
+.swiper-slide {
+  height: 300px;
+  display: flex;
+  align-items: center;
+  font-size: 18px;
+  position: relative;
+  .line{
+    width: 100%;
+    height:0px;
+    border: 1px solid #DCDFE6;
   }
+  .center {
+    left: 50%;
+    top: 50%;
+    transform: translate(-50%,-50%);
+  }
+  .circle {
+    position: absolute;
+  }
+  .circle2::after{
+    content: '';
+    position: absolute;
+    height: 100px;
+    border: 1px dashed #BBBBBB;
+    left: 50%;
+    bottom: -16px;
+    transform: translate(-50%,33px);
+  }
+
+  .circle-of {
+    position: absolute;
+    border-radius: 50%;
+    width: 18px;
+    height: 18px;
+    z-index: 99;
+    background: #61D3B8;
+  }
+
+   .content1,.content2 {
+    width: 100%;
+    font-size: 12px;
+    color: rgba(51,51,51,1);
+    position: absolute;
+    left: 50%;
+    transform: translateX(-50%);
+  }
+  .content3 {
+    font-size: 16px;
+    color: #333B4A;
+    font-weight: 500;
+    width: 100%;
+    position: absolute;
+    left: 50%;
+    top: 28px;
+    transform: translateX(-50%);
+  }
+  .content2 {
+    bottom:5px;
+    font-weight:500;
+  }
+  .content1 {
+    font-size: 12px;
+    color: #9B9B9B;
+    top: 45px;
+  }
+}
+.created {
+  position: absolute;
+  right: 55px;
+  top: 42%;
+  // bottom: 186px;
+  z-index: 9999999;
+  background: #409EFF;
+  color: #FFF;
+  border-radius: 50%;
+  font-size: 27px;
+  cursor: pointer;
+}
+.swiper-slide {
+  margin-top: -30px;
+}
+.swiper-slide:nth-child(2n) {
+  width: 40%;
+}
+.swiper-slide:nth-child(3n) {
+  width: 20%;
 }
 </style>

+ 21 - 14
src/views/reportManagement/ReleaseReport/components/iconDisplay.vue

@@ -43,7 +43,7 @@
 
 <script>
 import echarts from 'echarts'
-import { bugGetReportOutSumData, bugGetReportNotResolveData, bugGetReportDisDataByMember, bugGetReportDisDataByPri } from '@/api/reportTemplate' // 模版添删改查
+import { bugGetReportOutSumData, bugGetReportNotResolveData, bugGetReportDisDataByMember, bugGetReportDisDataByPri, bugGetReportDisDataByDate } from '@/api/reportTemplate' // 模版添删改查
 export default {
   props: {
     taskIds: { type: Array, default: null }
@@ -73,6 +73,26 @@ export default {
       if (res1.code === 200) {
         this.tableData = res1.dada
       }
+      const res6 = await bugGetReportDisDataByDate({ taskIds: val })
+      if (res6.code === 200) {
+        const data = res6.data.yaxis.map(item => ({
+          ...item,
+          type: 'line',
+          smooth: true
+        }))
+        setTimeout(() => {
+          echarts.init(document.getElementById('line-echarts')).setOption({
+            color: ['#409EFF'],
+            title: { text: '新增缺陷趋势图', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
+            tooltip: { axisPointer: { type: 'shadow' }},
+            grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
+            xAxis: [{ type: 'category', data: res6.data.xaxis === null ? ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期七'] : res6.data.xaxis, axisTick: { alignWithLabel: true }}],
+            yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
+            series: res6.data.yaxis[0].data <= 0 ? [{ name: '直接访问', type: 'line', smooth: true, data: [0, 0, 0, 0, 0, 0, 0] }] : data
+
+          })
+        }, 200)
+      }
       const res2 = await bugGetReportDisDataByMember({ taskIds: val })
       if (res2.code === 200) {
         const data = res2.data.yaxis.map(item => ({
@@ -112,19 +132,6 @@ export default {
           })
         }, 200)
       }
-
-      setTimeout(() => {
-        echarts.init(document.getElementById('line-echarts')).setOption({
-          color: ['#409EFF'],
-          title: { text: '新增缺陷趋势图', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
-          tooltip: { axisPointer: { type: 'shadow' }},
-          grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
-          xAxis: [{ type: 'category', data: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期七'], axisTick: { alignWithLabel: true }}],
-          yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
-          series: [{ name: '直接访问', type: 'line', smooth: true, data: [5, 25, 5, 25, 5, 15, 5] }]
-
-        })
-      }, 200)
     },
 
     click_bugName(id) { // 缺陷跳转

+ 0 - 219
src/views/reportManagement/ReleaseReport/releaeTemplate.vue

@@ -1,219 +0,0 @@
-<template>
-  <!-- 新增测试日报 -->
-  <div class="parent-style">
-    <el-form ref="fromCreateData" class="dailyFrom" :model="fromCreateData" :rules="serviceDataRules">
-      <div class="report-Padding">
-        <span style="color: #f56b6c">*</span>
-        <span class="backStyle"> 任务名称</span>
-      </div>
-
-      <el-select
-        v-model="fromCreateData.taskIds"
-        filterable
-        remote
-        reserve-keyword
-        placeholder="请输入任务名称或ID"
-        :remote-method="remoteMethod"
-        style="width: 100%"
-        size="small"
-        @change="colseSelect"
-      >
-        <el-option v-for="item in tasksOptions" :key="item.id" :label="item.name" :value="item.id" :disabled="item.isScheduleLocked === 1" @click.native="tasksChange(item)">
-          <div class="Layout_space_between"><span>{{ item.name }}</span></div>
-        </el-option>
-      </el-select>
-      <div v-if="selectTask" class="taskError">任务名称不能为空</div>
-      <div v-for="(item, index) in tasksDetailList" :key="index" class="Layout_space_between report-taskList">
-        <span>{{ item.taskIdSting }}</span>
-        <span>{{ item.name }}</span>
-        <i class="el-icon-circle-close didi-hover" @click="delete_task(item)" />
-      </div>
-      <el-form-item label="标题" prop="reportName"><br>
-        <el-input v-model="fromCreateData.reportName" size="small" style="width: 100%;" placeholder="请输入报告名称" />
-      </el-form-item>
-      <el-form-item label="模版内容" prop="content"><br>
-        <normal-area id="report-template" :value.sync="fromCreateData.content" :height="500" />
-      </el-form-item>
-    </el-form>
-    <icon-display :id="taskid_arr" />
-  </div>
-</template>
-
-<script>
-import '@/styles/PublicStyle/index.scss'
-import normalArea from '@/components/input/normalArea'
-import { taskList as allTaskList } from '@/api/taskIndex'
-import iconDisplay from '@/views/reportManagement/daily/components/iconDisplay.vue'
-import { settingGetReportModuleById, dailyReportCreate, dailyReportUpdate } from '@/api/reportTemplate' // 模版添删改查
-
-export default {
-  name: 'DailyNewsAdded',
-  components: {
-    normalArea,
-    iconDisplay
-  },
-  props: {
-    modelId: { type: [String, Number, Object], default: 1 },
-    taskIds: { type: Array, default: () => null }
-  },
-  data() {
-    return {
-      serviceDataRules: {
-        reportName: [{ required: true, message: '标题不能为空', trigger: 'change' }],
-        content: [{ required: true, message: '模版内容不能为空', trigger: 'change' }]
-      },
-      fromCreateData: {}, // listAll
-      tasksOptions: [], // 任务下拉选项
-      tasksDetailList: [], // 已有任务项目
-      taskid_arr: [], // taskIds
-      moduleId: '', // 模块id
-      selectTask: false // 选择的任务id
-    }
-  },
-  watch: {
-    modelId: {
-      handler(newV) {
-        if (newV.id) {
-          if (newV.updateDaily === false) {
-            newV.reportName = ''
-          }
-          this.fromCreateData = newV
-          this.$set(this.fromCreateData, 'taskIds', null)
-          this.moduleId = newV.moduleId
-          newV.updateDaily === false ? this.$refs.fromCreateData.resetFields() : ''
-        } else {
-          this.moduleId = newV
-          this.fromCreateData = {}
-          if (newV === 1 || newV === 2) {
-            this.fromCreateData.content = `<div style="color: #606266"><h3>进度和风险</h3><p>项目整体进度</p><p>项目风险与问题</p><table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="8%"><col width="8%"><col width="8%"><col width="8%"></colgroup><thead><tr><th>风险等级</th><th>风险项</th><th>当前状态</th><th>跟进人</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table><h3>测试情况</h3><p>测试进展</p><table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="8%"><col width="8%"><col width="8%"><col width="8%"><col width="8%"><col width="8%"><col width="8%"></colgroup><thead><tr><th>标题1</th><th>标题2</th><th>标题3</th><th>标题4</th><th>标题5</th><th>标题6</th><th>标题7</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table><p>测试说明</p></div>`
-          } else {
-            this.settingGetReportModuleById(newV)
-          }
-        }
-      },
-      immediate: true
-    },
-    taskIds: {
-      handler(newV) {
-        if (newV[0]) {
-          this.taskid_arr = newV
-          this.tasksDetailList = []
-          newV.map(item => {
-            this.remoteMethods(item)
-          })
-        }
-      },
-      immediate: true
-    }
-  },
-  methods: {
-    async settingGetReportModuleById(val) { // 获取表单数据
-      const res = await settingGetReportModuleById(val)
-      if (res.code === 200) {
-        this.fromCreateData = res.data
-      }
-    },
-    async remoteMethods(query) { // 远程搜索任务
-      const res = await allTaskList({ bizId: Number(localStorage.getItem('bizId')), name: query })
-      if (res.code === 200) {
-        this.tasksOptions = res.data
-        this.tasksDetailList.push(res.data[0])
-        this.$set(this.fromCreateData, 'taskIds', null)
-      }
-    },
-    async remoteMethod(query) { // 远程搜索任务
-      const res = await allTaskList({ bizId: Number(localStorage.getItem('bizId')), name: query })
-      if (res.code === 200) {
-        this.tasksOptions = res.data
-      }
-    },
-    tasksChange(data) { // 任务列表变动
-      this.tasksDetailList.length <= 0 ? this.selectTask = true : this.selectTask = false
-      const isEx = this.tasksDetailList.find(item => item.id === data.id)
-      if (isEx) {
-        this.$message({ message: '任务已存在', type: 'warning', duration: 1000, offset: 150 })
-        return false
-      }
-      this.tasksDetailList.push(data)
-      this.taskid_arr.push(data.id)
-    },
-
-    colseSelect() { // 清空任务名称
-      this.$set(this.fromCreateData, 'taskIds', null)
-    },
-
-    delete_task(val) { // 删除关联的任务
-      this.tasksDetailList = this.tasksDetailList.filter(item => {
-        return item.id !== val.id
-      })
-      this.taskid_arr = this.taskid_arr.filter(item => {
-        return item.id !== val.id
-      })
-      this.tasksDetailList.length <= 0 ? this.selectTask = true : this.selectTask = false
-    },
-
-    // 新建模版
-    getCreateData(val) {
-      this.$refs.fromCreateData.validate((valid) => {
-        if (valid) {
-          this.fromCreateData.bizId = localStorage.getItem('bizId')
-          this.fromCreateData.reportor = localStorage.getItem('usernames')
-          this.fromCreateData.taskIds = this.taskid_arr
-          this.fromCreateData.moduleId = this.moduleId
-          if (val) { // 编辑
-            dailyReportUpdate(this.fromCreateData).then(res => {
-              if (res.code === 200) {
-                this.$emit('SaveNextStep', res.data)
-                this.$message({ type: 'success', message: '更新成功' })
-              }
-            })
-          } else {
-            dailyReportCreate(this.fromCreateData).then(res => {
-              if (res.code === 200) {
-                this.$emit('SaveNextStep', res.data)
-                this.$message({ type: 'success', message: '创建成功' })
-              }
-            })
-          }
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.dailyFrom {
-  >>> .el-form-item {
-    margin-bottom: 0px;
-}
-}
-.parent-style {
-  .report-taskList{
-    font-size:14px;
-    font-family:MicrosoftYaHei;
-    line-height:17px;
-    color:rgba(102,102,102,1);
-    margin-top: 10px;
-    opacity:1;
-  }
-}
-
-  .report-Padding {
-    margin-bottom: 12px;
-  }
-
-  .backStyle {
-    font-size: 14px;
-    font-weight: bold;
-    border-radius: 4px;
-    margin: 10px 0;
-  }
-
-  .taskError {
-    color: #F56C6C;
-    font-size: 12px;
-    line-height: 1;
-    padding-top: 4px;
-  }
-</style>

+ 5 - 0
src/views/reportManagement/testPresentation.vue

@@ -224,6 +224,7 @@ export default {
       this.loading = true
       this.history = true
       const indexPage = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
+      e ? indexPage.reportName = this.state : ''
       if (this.title === '测试日报') {
         const res = await dailyReportListV2(indexPage)
         if (res.code === 200) {
@@ -240,6 +241,7 @@ export default {
       }
       if (this.title === '提测报告') {
         const data = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
+        e ? indexPage.name = this.state : ''
         const res = await reportdelivertestList(data)
         if (res.code === 200) {
           this.tableData = res.data.list || []
@@ -252,6 +254,7 @@ export default {
     returnNewest() { // 返回最新
       this.pageSize = 10
       this.curIndex = 1
+      this.state = ''
       this.getList()
     },
 
@@ -444,6 +447,7 @@ export default {
       this.loading = true
       this.history = false
       const indexPage = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
+      e ? indexPage.reportName = this.state : ''
       if (this.title === '测试日报') {
         const res = await dailyReportList(indexPage)
         if (res.code === 200) {
@@ -460,6 +464,7 @@ export default {
       }
       if (this.title === '提测报告') {
         const data = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
+        e ? indexPage.name = this.state : ''
         const res = await launchTestList(data)
         if (res.code === 200) {
           this.tableData = res.data