Bläddra i källkod

2022.9.1 项目el-select的css 项目列表筛选

ggooalice 2 år sedan
förälder
incheckning
5f2a48add6

+ 16 - 0
fhKeeper/formulahousekeeper/timesheet/index.html

@@ -65,6 +65,22 @@
                 height: 35px;
                 line-height: 35px;
             }
+            .projectSelectPopperClass{
+                max-width: 1000px;
+            }
+            .projectSelectPopperClass .el-select-dropdown__item span:nth-child(1){
+                font-size: 13px;
+                height: 34px;
+            }
+            .projectSelectPopperClass .el-select-dropdown__item span:nth-child(2){
+                font-size: 13px;
+                height: 34px;
+                width: 70%;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+                text-align: right;
+            }
         </style>
         <!-- <meta name="wpk-bid" content="dta_2_71020"> <script>var isDingtalk = navigator && /DingTalk/.test(navigator.userAgent);var isProductEnv = window &&window.location &&window.location.host 
             && window.location.host.indexOf('//127.0.0.1')===-1

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue

@@ -592,7 +592,7 @@
                     placeholder="请选择日期"></el-date-picker>
                 </el-form-item><br>
                 <el-form-item label="关联项目" prop="projectId">
-                    <el-select v-model="relationItem.projectId" placeholder="请选择项目" @change="getwuduList(2)" style="width:220px" filterable>
+                    <el-select v-model="relationItem.projectId" placeholder="请选择项目" @change="getwuduList(2)" style="width:220px" filterable popper-class="projectSelectPopperClass">
                         <el-option
                         v-for="item in projectList"
                         :key="item.id"

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -59,7 +59,7 @@
             <el-option v-for="(item) in customerList" :key="item.id" :label="item.customerName" :value="item.id">
             </el-option>
           </el-select>
-          <el-select v-model="cusProJuctId" placeholder="请选择项目" clearable filterable size="small" @change="selcts()">
+          <el-select v-model="cusProJuctId" placeholder="请选择项目" clearable filterable size="small" @change="selcts()" popper-class="projectSelectPopperClass">
             <el-option v-for="(item) in cusProListOvertime" :key="item.id" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
               <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
               <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -114,7 +114,7 @@
             @row-dblclick="dbclick">
             <el-table-column prop="projectName" label="所属项目" width="180">
               <template slot-scope="scope">
-                <el-select size="small" v-model="scope.row.projectId" placeholder="项目" style="width: 150px" filterable>
+                <el-select size="small" v-model="scope.row.projectId" placeholder="项目" style="width: 150px" filterable popper-class="projectSelectPopperClass">
                   <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode" :value="item.id" @click="ok(item)">
                     <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
                     <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -68,7 +68,7 @@
         <el-dialog title="工时报表导出" v-if="exportDialog" :visible.sync="exportDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <el-form ref="form3" :model="exportParam" >
                 <el-form-item prop="projectId" label="选择项目" v-if="radio != '人员' && radio != '项目分类'">
-                    <el-select v-model="exportParam.projectId" placeholder="全部项目"  clearable style="width:350px;" filterable="true">
+                    <el-select v-model="exportParam.projectId" placeholder="全部项目"  clearable style="width:350px;" filterable="true" popper-class="projectSelectPopperClass">
                         <el-option v-for="item in projectList"  :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
                             <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
                             <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>

+ 25 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -46,7 +46,7 @@
                 <!-- 部门筛选 -->
                 <el-form-item v-if="user.timeType.projectWithDept">
                     <span style="margin-left:5px;margin-right:5px;color:#606266;">部门</span>
-                    <el-cascader v-model="deptId" :options="departmentList" placeholder="请选择部门"
+                    <el-cascader v-model="deptId" style="width:140px;" :options="departmentList" placeholder="请选择部门"
                         :props="{ checkStrictly: true, expandTrigger: 'hover' }" :show-all-levels="false" clearable filterable @change="searchClfList" size="small"
                     ></el-cascader>
                 </el-form-item>
@@ -54,7 +54,16 @@
                 <!-- 项目经理筛选 -->
                 <el-form-item>
                     <span style="margin-left:5px;margin-right:5px;color:#606266;">项目经理</span>
-                    <el-select v-model="inchagerId" style="width:190px;" placeholder="请选择" clearable @change="manageSelect" size="small" filterable popper-class="managePopperClass">
+                    <el-select v-model="inchagerId" style="width:140px;" placeholder="请选择" clearable @change="manageSelect" size="small" filterable popper-class="managePopperClass">
+                        <el-option v-for="item in users" :key="item.id" :label="user.companyId == 936 ? item.name + '\u3000' + item.jobNumber : item.name" :value="item.id">
+                            <span style="float: left">{{ item.name }}</span>
+                            <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item>
+                    <span style="margin-left:5px;margin-right:5px;color:#606266;">参与人</span>
+                    <el-select v-model="participationId" style="width:140px;" placeholder="请选择" clearable @change="participationSelect" size="small" filterable popper-class="managePopperClass">
                         <el-option v-for="item in users" :key="item.id" :label="user.companyId == 936 ? item.name + '\u3000' + item.jobNumber : item.name" :value="item.id">
                             <span style="float: left">{{ item.name }}</span>
                             <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
@@ -1270,7 +1279,8 @@ a {
                 addBasekeyNodesialog: false,
                 addFormkeyNodes: {
                     name: ''
-                }
+                },
+                participationId: ''
             };
         },
         // 过滤器
@@ -3056,6 +3066,7 @@ a {
             //选择参与人
             changeParticipator() {
                 //检查是否在参与人中,如果没有需要加入到参与人中
+                // console.log('addform',this.addForm.userId,this.users);
                 this.participator = [];
                 this.addForm.userId.forEach(u=>{
                     var list = this.users.filter(au=>au.id == u);
@@ -3110,6 +3121,11 @@ a {
                 this.getList();
             },
 
+            participationSelect(){
+                this.page = 1
+                this.getList()
+            },
+
             //获取项目列表
             getList() {
                 this.listLoading = true;
@@ -3121,7 +3137,8 @@ a {
                     status: this.status,
                     category: this.statusClf,
                     projectMainId: this.projectMainId,
-                    inchagerId: this.inchagerId
+                    inchagerId: this.inchagerId,
+                    participation: this.participationId
                 }
                 if(this.sortOrder){
                     if(this.sortProp == 'inchargerName'){
@@ -3233,6 +3250,7 @@ a {
 
             //显示新增界面
             handleAdd(i, item) {
+                // console.log('handleadd',i,item);
                 this.contractAmountReasonShow = false
                 if(i == -1) {
                     this.title = "新增项目";
@@ -3311,7 +3329,7 @@ a {
                     for (var i in arrList) {
                         array.push(parseInt(arrList[i]));
                     }
-                    console.log(array, '转换', listList)
+                    // console.log(array, '转换', listList)
                     this.addForm = {
                         id: item.id,
                         name: item.projectName,
@@ -3340,7 +3358,7 @@ a {
                         changeContractReason: ''
                     }
                     this.contractAmountOld = item.contractAmount ? item.contractAmount : 0
-                    console.log(this.addForm, '数据')
+                    // console.log(this.addForm, '数据')
                     if(this.user.timeType.projectWithDept) {
                         this.$set(this.addForm, 'deptId', array.reverse())
                     }
@@ -3391,7 +3409,7 @@ a {
 
 
                     this.deleteVif = item.creatorId
-                    console.log("handleadd",this.deleteVif,this.addForm.id)
+                    // console.log("handleadd",this.deleteVif,this.addForm)
                     if(item.associateDegrees != null && item.associateDegrees != 'null' && item.associateDegrees != '') {
                         var spli = item.associateDegrees.split(',')
                         var sl  = []

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -16,7 +16,7 @@
                         </el-select>
                     </el-form-item>
                 <el-form-item label="项目" style="width: 215px">
-                    <el-select v-model="search.projectId" placeholder="请选择" clearable @change="getList()" filterable="true" size="mini" style="width: 175px">
+                    <el-select v-model="search.projectId" placeholder="请选择" clearable @change="getList()" filterable="true" size="mini" style="width: 175px" popper-class="projectSelectPopperClass">
                         <el-option v-for="item in projectList" :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
                             <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
                             <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>