Bläddra i källkod

全局项目搜索临时代码

dev-remain
unknown 4 år sedan
förälder
incheckning
76b4c43ff3
9 ändrade filer med 175 tillägg och 1025 borttagningar
  1. +94
    -973
      package-lock.json
  2. +12
    -0
      public/static/img/了解工作负责人.svg
  3. +10
    -0
      public/static/img/了解负责人关闭.svg
  4. +14
    -10
      src/components/search-bar/search-bar.vue
  5. +0
    -5
      src/router.js
  6. +1
    -13
      src/views/components_web/projDetail/components/personnel-list.vue
  7. +2
    -14
      src/views/components_web/projDetail/projDetail.vue
  8. +0
    -1
      src/views/main_web/index/components/search-proj.vue
  9. +42
    -9
      src/views/main_web/index/index.vue

+ 94
- 973
package-lock.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 12
- 0
public/static/img/了解工作负责人.svg Visa fil

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 2</title>
<g id="项目管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="符号/组件/提示备份" fill-rule="nonzero">
<g id="编组-2">
<circle id="合并形状" fill="#2869E6" cx="10" cy="10" r="10"></circle>
<path d="M10.1448235,12.354 L10.1448235,12.032 C10.1448235,11.654 10.2288235,11.318 10.4108235,11.01 C10.5508235,10.758 10.7608235,10.506 11.0688235,10.24 C11.6848235,9.694 12.0628235,9.33 12.2028235,9.162 C12.5528235,8.7 12.7348235,8.154 12.7348235,7.524 C12.7348235,6.684 12.4688235,6.026 11.9508235,5.55 C11.4048235,5.046 10.6908235,4.808 9.79482351,4.808 C8.78682351,4.808 8.00282351,5.116 7.44282351,5.732 C6.88282351,6.32 6.61682351,7.104 6.61682351,8.084 L7.72282351,8.084 C7.72282351,7.398 7.87682351,6.866 8.18482351,6.474 C8.52082351,6.012 9.03882351,5.788 9.73882351,5.788 C10.3268235,5.788 10.7888235,5.942 11.1108235,6.278 C11.4188235,6.586 11.5868235,7.02 11.5868235,7.58 C11.5868235,7.972 11.4468235,8.336 11.1668235,8.686 C11.0828235,8.798 10.9148235,8.966 10.6908235,9.19 C9.93482351,9.862 9.47282351,10.394 9.27682351,10.814 C9.10882351,11.164 9.02482351,11.57 9.02482351,12.032 L9.02482351,12.354 L10.1448235,12.354 Z M9.58482351,15 C9.82282351,15 10.0188235,14.916 10.1868235,14.762 C10.3548235,14.608 10.4388235,14.412 10.4388235,14.16 C10.4388235,13.922 10.3548235,13.726 10.2008235,13.572 C10.0328235,13.404 9.82282351,13.334 9.58482351,13.334 C9.34682351,13.334 9.15082351,13.404 8.98282351,13.572 C8.81482351,13.726 8.74482351,13.922 8.74482351,14.16 C8.74482351,14.398 8.81482351,14.594 8.98282351,14.762 C9.15082351,14.916 9.34682351,15 9.58482351,15 Z" id="?" fill="#FFFFFF"></path>
</g>
</g>
</g>
</svg>

+ 10
- 0
public/static/img/了解负责人关闭.svg Visa fil

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>符号/小符号/删除-强调备份</title>
<g id="项目管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="符号/小符号/删除-强调备份" fill-rule="nonzero">
<circle id="椭圆形" fill="#2869E6" cx="10" cy="10" r="10"></circle>
<path d="M12.969099,6 L13.7434433,6.77434433 L10.646,9.872 L13.7434433,12.969099 L12.969099,13.7434433 L9.872,10.646 L6.77434433,13.7434433 L6,12.969099 L9.098,9.872 L6,6.77434433 L6.77434433,6 L9.872,9.098 L12.969099,6 Z" id="形状结合" fill="#FFFFFF"></path>
</g>
</g>
</svg>

+ 14
- 10
src/components/search-bar/search-bar.vue Visa fil

@@ -1,10 +1,10 @@
<template>
<div class="search-bar">
<div class="wrap">
<i class="search-icon" @click.stop="searchContentClick"></i>
<i class="search-icon" @click.stop="goToSearch"></i>
<input type="text" v-model="searchContent" @keyup.stop="enterSearchContent"
class="search-input" placeholder="搜索的文本"/>
<i class="close-icon"></i>
class="search-input" :placeholder="placeholder"/>
<i class="close-icon" @click.stop="hideSearchBar"></i>
</div>
</div>
</template>
@@ -13,13 +13,17 @@
export default {
data() {
return {
isShowSearchBar: true,
searchContent: '',
}
},
props: {
placeholder: {
type: String,
default: '搜索的文本'
}
},
watch: {
searchContent(val) {
console.log(val);
this.changeSearchContent();
}
},
@@ -27,17 +31,17 @@
// 按下了enter键
enterSearchContent(e) {
if(this.searchContent && e.keyCode == 13) {
this.searchContentClick();
this.goToSearch();
}
},
changeSearchContent() {
this.$emit('changeSearchContent', this.searchContent)
},
searchContentClick() {
this.$emit('searchContentClick', this.searchContent);
goToSearch() {
this.$emit('goToSearch');
},
hideSearchBar() {
this.isShowSearchBar = false;
this.$emit('hideSearchBar');
},

}
@@ -53,7 +57,7 @@
border-radius: 8px;
background-color: rgba(233, 233, 235, 1);
border: 0.5px solid rgba(174, 174, 174, 1);
padding: 0 0 0 35px;
padding: 0 0 0 32px;
}
.search-icon, .close-icon {
position: absolute;


+ 0
- 5
src/router.js Visa fil

@@ -54,11 +54,6 @@ const router = new Router({
name: 'index',
component: () => import('@/views/main_web/index'),
},
{
path: '/searchProj',
name: 'searchproj',
component: () => import('@/views/main_web/index/components/search-proj'),
},
{
path: '/projnotice',
name: 'projnotice',


+ 1
- 13
src/views/components_web/projDetail/components/personnel-list.vue Visa fil

@@ -64,15 +64,7 @@
return {
ischeckAll: false,
activeCompanyName: 'C0',
activeDeptNameInData: ''
}
},
watch: {
activeDeptName: {
immediate: true,
handler(val) {
this.activeDeptNameInData = val;
}
activeDeptNameInData: 'D0'
}
},
methods: {
@@ -85,10 +77,6 @@
return []
}
},
activeDeptName: {
type: String,
defualt: ''
},
handleCheckItemAll: Function,
handleCheckedOne: Function,
},


+ 2
- 14
src/views/components_web/projDetail/projDetail.vue Visa fil

@@ -180,7 +180,6 @@
:class="{'set-personnel-list-width': isEnterEdit}">
<personnel-list
:listDept="[...listDept]"
:activeDeptName="activeDeptName"
:handleCheckItemAll="handleCheckItemAll"
:handleCheckedOne="handleCheckedOne"/>
</div>
@@ -277,7 +276,6 @@
activeFolderId: '',//点击进入编辑的节点id
coverSrc:'/static/img/faceImg/face01.png',

activeDeptName: '',//默认打开右侧的某一个部门
isShowManagerTips: false,//是否显示工作负责人的提示
isEnterEditPropValue: false,//是否进入编辑模板自定义字段
isDistworkDone: false,//是否有惊醒过工作指派
@@ -361,8 +359,6 @@

this.$bus.$on('setFirstPeopleToManager', this.setFirstPeopleToManager);

// 监听编辑状态下 点击添加第一个工作负责人 -》 右侧人员列表自动打开
this.$bus.$on('openPersonnelListClick', this.openPersonnelListClick);

},
beforeDestroy() {
@@ -379,16 +375,8 @@

this.$bus.$off('setFirstPeopleToManager', this.setFirstPeopleToManager);

this.$bus.$off('openPersonnelListClick', this.openPersonnelListClick);
},
methods: {
/**
* 打开右侧的人员列表
*/
openPersonnelListClick() {
console.log('收到打开事件');
this.activeDeptName = 'D0';
},
/**
* 退出编辑回到项目列表页
*/
@@ -1246,7 +1234,7 @@
display: inline-block;
width: 20px;
height: 20px;
background-color: #2869e6;
background: url('/static/img/了解工作负责人.svg');
cursor: pointer;
}
.ques-text {
@@ -1275,7 +1263,7 @@
top: 5px;
width: 20px;
height: 20px;
background-color:#2869E6;
background: url('/static/img/了解负责人关闭.svg');
cursor: pointer;
}
.tips-text {


+ 0
- 1
src/views/main_web/index/components/search-proj.vue Visa fil

@@ -75,7 +75,6 @@

},
changeSearchContent(content) {
console.log('父级',content);
this.searchContent = content;
},
}


+ 42
- 9
src/views/main_web/index/index.vue Visa fil

@@ -17,15 +17,17 @@
</style>
<template>
<div id="app" v-cloak>
<app-header title="我的项目" :showUserCenter="true" id="proj-list-page">
<app-header :title="showCenterTitle" :showUserCenter="true" id="proj-list-page">
<template #left>
{{currentPlatform.orgName}}
</template>
<template #right>
<!-- <search-bar class="proj-search-bar"
<search-bar v-if="isShowSearchBar" class="proj-search-bar"
placeholder="请输入要搜索的项目名称"
@changeSearchContent="changeSearchContent"
@searchContentClick="searchForProj"/> -->
<!-- <div class="search-proj-entry" @click.stop="goToSearchProj"></div> -->
@hideSearchBar="isShowSearchBar = false"
@goToSearch="searchForProj"/>
<div class="search-proj-entry" @click.stop="isShowSearchBar = true"></div>
</template>
<!-- <template #right>
<span v-on:click="toRecycle">
@@ -170,7 +172,7 @@ const Velocity = window.Velocity;
export default {
elNew: "#new", //样式ID,用于动画
components: {
// SearchBar,
SearchBar,
DistWork,
NewProj,
ProjSetting,
@@ -249,9 +251,16 @@ export default {
isEditProjFolder: false,
fetchTickIns: null,

filterProjListRes: [],
searchContent: '',
searchProjList: [],//搜索出来的项目列表
isShowSearchBar: false,//控制搜索栏显隐
};
},
computed: {
showCenterTitle() {
return this.isShowSearchBar && this.searchContent ? `“${this.searchContent}”搜索结果` : '我的项目';
}
},
mounted: function () {
this.cnName = JSON.parse(sessionStorage.user).userName;
//this.setDateTime();
@@ -267,10 +276,34 @@ export default {
}
},
methods: {
async searchForProj() {
// 判断输入内容是否有效
const rg = /^\s*$/;
if(rg.test(this.searchContent)) {
this.$notify({
message: '请输入有效的项目名称',
type: ['warning']
})
} else {
console.log(this.searchContent);
const res = await prjService.searchProject(this.searchContent);
if(res.Code == 0) {
this.searchProjList = res.Data;
} else {
this.$notify({
type: ['error'],
message:'查询数据失败, 请稍后重试。'
})
}
}

},
changeSearchContent(content) {
this.searchContent = content;
},
goToSearchProj() {
this.$router.push({
name: 'searchproj',
}).catch(err => console.log(err));
},
// 新版创建项目入口
createNewProjectClick() {


Laddar…
Avbryt
Spara