洪海涛 4 năm trước cách đây
mục cha
commit
e02fc085aa

+ 5 - 2
src/components/Tag/TagSearch.vue

@@ -24,7 +24,7 @@
 </template>
 <script>
 import { taskGetTag } from '@/api/common'
-import { desDecryptId } from '@/utils/crypto-js'
+import { desDecryptId, analysisBizId_id } from '@/utils/crypto-js'
 
 export default {
   name: 'TagSearch',
@@ -65,8 +65,11 @@ export default {
       this.$emit('change', this.tagSelectValue)
     },
     remoteMethod(searchTag = '') {
+      if (!this.$route.query.bizId) return
+      // const bizId_id = analysisBizId_id(this.$route.query.bizId)
       // const bizId_id = window.localStorage.getItem('bizId')
-      const bizId_id = desDecryptId(this.$route.query.bizId_id).replace(/_.*/, '')
+      const bizId_id = desDecryptId(this.$route.query.bizId).replace(/_.*/, '')
+      console.log(bizId_id)
       taskGetTag({
         type: this.type,
         searchTag,

+ 118 - 30
src/components/Tag/index.vue

@@ -11,42 +11,59 @@
           {{ item }}
         </el-tag>
     </span>
-    <span class="add-tag" @click="addTag">添加</span>
+    <span class="add-tag" @click="addTag">打标</span>
 
-    <Modal title="添加标签" :visible="visible" :bg="false">
-      <el-select
-        ref="select"
-        v-model="tagSelectValue"
-        style="width: 100%"
-        multiple
-        remote
-        filterable
-        allow-create
-        default-first-option
-        :placeholder="placeholder"
-        :remote-method="remoteMethod"
-        @click.stop
-        @change="change"
-      >
-        <el-option
-          v-for="(item, itemIndex) in options"
-          :key="itemIndex"
-          :label="item"
-          :value="item"
-        >
-          {{ item }}
-        </el-option>
-      </el-select>
+    <!-- 弹窗 -->
+    <div v-if="visible" class="dialogbox">
+      <div class="box">
+        <div class="title">
+          <span class="line" />
+          <span class="name">设置标签</span>
+          <i class="el-icon-close icon"  />
+        </div>
+        <div class="body">
+          <el-form-item style="width: 100%;margin-right: 0;" :rules="[{ required: true, message: '标签不能为空'}]" label="标签:" class="tag-from">
+           <el-select
+            style="width: 100%;"
+            ref="select"
+            v-model="tagSelectValue"
+            multiple
+            remote
+            filterable
+            allow-create
+            default-first-option
+            :placeholder="placeholder"
+            :remote-method="remoteMethod"
+            @click.stop
+            @change="change"
+          >
+            <el-option
+              v-for="(item, itemIndex) in options"
+              :key="itemIndex"
+              :label="item"
+              :value="item"
+            >
+              {{ item }}
+            </el-option>
+          </el-select>
       <template slot="footer">
-        <el-button @click="close">取消</el-button>
-        <el-button @click="ok">添加</el-button>
+        <el-button size="small" @click="close">取消</el-button>
+        <el-button size="small" type="primary" @click="ok">确定</el-button>
       </template>
-    </Modal>
+          </el-form-item>
+        </div>
+        <div class="footer">
+          <el-button size="small" @click="close">取消</el-button>
+        <el-button size="small" type="primary" @click="ok">确定</el-button>
+        </div>
+      </div>
+      <div class="bg" />
+    </div>
   </div>
 </template>
 <script>
 import Clickoutside from 'element-ui/src/utils/clickoutside'
-import { desDecryptId } from '@/utils/crypto-js'
+import { EncryptId, analysisBizId_id } from '@/utils/crypto-js.js'
 import { taskGetTag } from '@/api/common'
 import Modal from '@/components/modal'
 
@@ -106,8 +123,10 @@ export default {
       this.visible = true
     },
     remoteMethod(searchTag = '') {
+      if (!this.$route.query.bizId) return
+      // const bizId_id = analysisBizId_id(this.$route.query.bizId)
       // const bizId_id = window.localStorage.getItem('bizId')
-      const bizId_id = desDecryptId(this.$route.query.bizId_id).replace(/_.*/, '')
+      const bizId_id = desDecryptId(this.$route.query.bizId).replace(/_.*/, '')
       console.log(bizId_id)
       taskGetTag({
         type: this.type,
@@ -147,4 +166,73 @@ export default {
     border: 1px solid rgba(220, 223, 230) !important;
   }
 }
+
+.dialogbox {
+  .box {
+    position: fixed;
+    top:20vh;
+    left: calc(50% - 250px);
+    width: 500px;
+    min-height: 180px;
+    // overflow: auto;
+    background: #fff;
+    z-index: 1000;
+    border-radius: 4px;
+    display: flex;
+    flex-direction: column;
+    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
+    .title {
+      padding: 5px 0px 5px 18px;
+      // border-bottom: 1px solid #eee;
+      position: relative;
+      .line {
+        display: inline-block;
+        width: 4px;
+        height: 18px;
+        background: #409eff;
+        border-radius: 1px;
+        vertical-align: text-top;
+      }
+      .name {
+        margin-left: 6px;
+        color: rgba(0,0,0,.85);
+        font-weight: 500;
+        font-size: 16px;
+        line-height: 22px;
+        word-wrap: break-word;
+      }
+      .icon {
+        position: absolute;
+        top: 20px;
+        right: 20px;
+        font-size: 16px;
+        color: #909399;
+        cursor: pointer;
+      }
+    }
+    .body {
+      padding: 15px 20px;
+      color: #606266;
+      font-size: 14px;
+      word-break: break-all;
+      // height: calc(80vh - 118px);
+      overflow: auto;
+    }
+    .footer {
+      padding: 15px 20px;
+      text-align: right;
+      // border-top: 1px solid #eee;
+      background: #fff;
+    }
+  }
+  .bg {
+    background: rgba(000, 000, 000, 0.5);
+    position: fixed;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    z-index: 100;
+  }
+}
 </style>

+ 3 - 2
src/views/projectManage/bugList/bugindex.vue

@@ -210,19 +210,20 @@
                         start-placeholder="开始日期"
                         end-placeholder="结束日期"
                         size="small"
+                        style="min-width: 493px"
                         value-format="yyyy-MM-dd HH:mm:ss"
                         :default-time="['00:00:00','23:59:59']"
                         :picker-options="pickerOptions"
                       />
                     </div>
                     <div class="Layout searchItem">
-                      <div class="queryName marginLeft">标签</div>
+                      <div class="queryName">标签</div>
                       <TagSearch v-model="formInline.tagIdList" type="BUG" placeholder="请选择" @change="query_project(form_all)" />
                     </div>
                   </div>
                   <div align="right">
                     <el-button type="text" @click="showSaveSearch = true">保存筛选项</el-button>
-                    <el-button type="primary" style="margin: 0 20px;" size="mini" @click="getBugList()">筛 选</el-button>
+                    <el-button type="primary" style="margin: 0 0 0 10px;" size="mini" @click="getBugList()">筛 选</el-button>
                     <el-button size="mini" @click="resetQuery()">重 置</el-button>
                   </div>
                 </el-col>

+ 5 - 4
src/views/projectManage/projectList/projectIndex.vue

@@ -45,10 +45,7 @@
                 <el-option v-for="item in arr_priority" :key="item.value" :label="item.name" :value="item.value" />
               </el-select>
             </div>
-            <div class="Layout">
-              <div class="queryName marginLeft">标签</div>
-              <TagSearch v-model="form_all.tagIdList" type="PROEJCT" placeholder="请选择" @change="query_project(form_all)" />
-            </div>
+
           </el-form>
         </div>
         <div class="screen" @click="showSelect">{{ goodName }}</div>
@@ -89,6 +86,10 @@
                 </el-option>
               </el-select>
             </div>
+            <div class="Layout">
+              <div class="queryName marginLeft">标签</div>
+              <TagSearch v-model="form_all.tagIdList" type="PROEJCT" placeholder="请选择" />
+            </div>
           </el-form>
         </div>
         <div align="right" style="padding-top: 1%;">

+ 2 - 2
src/views/projectManage/taskList/taskIndex.vue

@@ -280,7 +280,7 @@
             </div>
             <div class="Layout" style="margin: 15px 0;">
               <el-form :model="form_task" class="flex_start">
-                <div class="Layout item">
+                <div class="Layout" style="width: 100%">
                   <div class="queryName">创建日期</div>
                   <el-date-picker
                     v-model="form_task.date"
@@ -292,7 +292,7 @@
                     end-placeholder="结束日期"
                     size="small"
                     class="input"
-                    style="min-width: 458px"
+                    style="min-width: 486px"
                     value-format="yyyy-MM-dd HH:mm:ss"
                     :default-time="['00:00:00','23:59:59']"
                     :picker-options="pickerOptions"