Browse Source

Merge remote-tracking branch 'origin/master'

LuChongMei 10 months ago
parent
commit
c8187f9c09

+ 3 - 2
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/circulation2/controller/GwCirculationCard2Controller.java

@@ -93,7 +93,8 @@ public class GwCirculationCard2Controller {
 		List<RoleDTO> list=userDTO.getRoleDTOList();
 		boolean isadmin=false;
 		for (RoleDTO aa:list) {
-			if(aa.getName().equals("租户管理员")||aa.getName().equals("管理员")||aa.getName().equals("办公室管理员")){
+			//if(aa.getName().equals("租户管理员")||aa.getName().equals("管理员")||aa.getName().equals("办公室管理员")){
+			if(aa.getName().equals("租户管理员")||aa.getName().equals("管理员")){
 				isadmin=true;
 			}
 		}
@@ -137,7 +138,7 @@ public class GwCirculationCard2Controller {
 			}
 			//queryWrapper.groupBy("a.id");
 
-			result=gwCirculationCard2Service.findPage (page, queryWrapper,state,userDTO.getId());
+			result=gwCirculationCard2Service.findPage (page, queryWrapper,state,userDTO.getId(),isadmin);
 
 //		}
 

+ 1 - 1
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/circulation2/mapper/GwCirculationCard2Mapper.java

@@ -23,7 +23,7 @@ public interface GwCirculationCard2Mapper extends BaseMapper<GwCirculationCard2>
 
     int saveGetId(GwCirculationCard2DTO map);
 
-    IPage<GwCirculationCard2DTO> findList(Page<GwCirculationCard2> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper,String state,String userid);
+    IPage<GwCirculationCard2DTO> findList(Page<GwCirculationCard2> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper,String state,String userid,boolean isadmin);
 
     HashMap<String, Object> getStatistics(String userid);
     int getStatistics2(String userid);

+ 9 - 4
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/circulation2/mapper/xml/GwCirculationCard2Mapper.xml

@@ -7,7 +7,7 @@
 		a.year_num AS "yearNum",
 		a.card_num AS "cardNum",
 		a.sending_agency AS "sendingAgency",
-        a.doc_font_size AS "docFontFize",
+        a.doc_font_size AS "docFontSize",
         a.file_source AS "fileSource",
         a.written_time AS "writtenTime",
         a.receiving_time AS "receivingTime",
@@ -45,17 +45,22 @@
         FROM gw_circulation_card2 a
         <include refid="circulation2DetailJoins"/>
         ${ew.customSqlSegment}
-        <if test="state ==3">
+        <if test="state ==3 and !isadmin">
             AND (b.update_by_id=#{userid} or b.create_by_id=#{userid})
         </if>
-        group by a.id
 
+        <if test="state ==5 and !isadmin">
+            AND (b.update_by_id=#{userid} or b.create_by_id=#{userid})
+        </if>
+
+        group by a.id
+        order by a.state asc,a.update_time desc
     </select>
 
     <select id="getStatistics" resultType="java.util.HashMap">
         SELECT IFNULL(sum(if (a.del_flag=0,1,0)),0) allcount,
                IFNULL(sum(if (a.state=3,1,0)),0) gdcount
-        From (SELECT * FROM gw_circulation_card2 ) a
+        From (SELECT * FROM gw_circulation_card2 where del_flag =0) a
 
     </select>
 

+ 2 - 2
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/circulation2/service/GwCirculationCard2Service.java

@@ -37,9 +37,9 @@ public class GwCirculationCard2Service extends ServiceImpl<GwCirculationCard2Map
      * @param queryWrapper
      * @return
      */
-    public IPage<GwCirculationCard2DTO> findPage(Page<GwCirculationCard2> page, QueryWrapper queryWrapper,String state,String userid) {
+    public IPage<GwCirculationCard2DTO> findPage(Page<GwCirculationCard2> page, QueryWrapper queryWrapper,String state,String userid,boolean isadmin) {
 
-        return  baseMapper.findList (page, queryWrapper,state,userid);
+        return  baseMapper.findList (page, queryWrapper,state,userid,isadmin);
     }
 
     public HashMap<String, Object> getStatistics(String userid) {

+ 2 - 2
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/circulation2/service/dto/GwCirculationCard2DTO.java

@@ -66,7 +66,7 @@ public class GwCirculationCard2DTO extends BaseDTO {
 	/**
      * 成文时间
      */
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd")
     @Query(type = QueryType.EQ)
 	@ExcelProperty("成文时间")
 	private Date writtenTime;
@@ -74,7 +74,7 @@ public class GwCirculationCard2DTO extends BaseDTO {
 	/**
      * 收文时间
      */
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd")
     @Query(type = QueryType.EQ)
 	@ExcelProperty("收文时间")
 	private Date receivingTime;

+ 62 - 4
jp-ui/src/views/circulation2/GwCirculationCard2Form.vue

@@ -21,7 +21,7 @@
         </el-col>
         <el-col :span="12">
             <el-form-item label="来文机关" prop="sendingAgency"
-                :rules="[
+                :rules="[{required: true, message:'来文机关不能为空', trigger:'blur'}
                  ]">
               <el-input v-model="inputForm.sendingAgency" placeholder="请填写来文机关"     ></el-input>
            </el-form-item>
@@ -68,18 +68,46 @@
         </el-col>
         <el-col :span="12">
             <el-form-item label="内容摘要" prop="contentSummary"
-                :rules="[
+                :rules="[{required: true, message:'内容摘要不能为空', trigger:'blur'}
                  ]">
           <el-input type="textarea" v-model="inputForm.contentSummary" placeholder="请填写内容摘要"     ></el-input>
            </el-form-item>
         </el-col>
         <el-col :span="24">
-            <el-form-item label="来文附件" prop="attachedDocumentId"
+            <el-form-item label="来文附件图片" prop="attachedDocumentId"
                 :rules="[
                  ]">
-	            <image-upload v-model="inputForm.attachedDocumentId" :limit="3" tip="最多上传3个图片,单个图片不要超过10M"></image-upload>
+	            <image-upload v-model="inputForm.attachedDocumentId" :limit="100" tip=""></image-upload>
            </el-form-item>
         </el-col>
+		<el-col :span="24">
+		    <el-form-item label="来文附件文件" prop="attachedDocumentId2"
+		        :rules="[
+		         ]">
+				<el-upload ref="attachedDocumentId2"
+				class="upload-demo"
+		         :action="`${this.$http.BASE_URL}/gwfile/upload?uploadPath=userdir`"
+		         :on-preview="(file, fileList) => {$window.location.href = (file.response && file.response.url) || file.url}"
+		         :on-success="handleSuccess"
+		         :on-remove="handleRemove"
+		         :before-remove="(file, fileList) => {
+		           return $confirm(`确定移除 ${file.name}?`)
+		         }"
+		         multiple
+		         :limit="100"
+		         :on-exceed="(files, fileList) =>{
+		           $message.warning(`当前限制选择 100 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
+		         }"
+		         :file-list="uploadfilesArra">
+		         <el-button size="small" type="primary">点击上传</el-button>
+				 <template #tip>
+				   <div class="el-upload__tip" style="min-width: 255px;">
+				   </div>
+				 </template>
+		       </el-upload>
+
+		   </el-form-item>
+		</el-col>
         <!-- <el-col :span="12">
             <el-form-item label="备注" prop="remark"
                 :rules="[
@@ -122,6 +150,7 @@
         visible: false,
         loading: false,
 		cardNum: "",
+		uploadfilesArra: [],
         inputForm: {
           id: '',
           yearNum: '',
@@ -133,6 +162,7 @@
           receivingTime: '',
           contentSummary: '',
           attachedDocumentId: '',
+		  attachedDocumentId2: '',
           remark: '',
           state: ''
         }
@@ -183,6 +213,26 @@
 
         })
       },
+
+
+	  handleSuccess(res) {
+		if(this.inputForm.attachedDocumentId2==''){
+			this.inputForm.attachedDocumentId2 = res;
+		}else{
+			this.inputForm.attachedDocumentId2 = this.inputForm.attachedDocumentId2+","+res;
+		}
+	  },
+
+	  handleRemove(res) {
+		  if(this.inputForm.attachedDocumentId2.indexOf(res.response+",")!=-1){
+			this.inputForm.attachedDocumentId2=this.inputForm.attachedDocumentId2.replace(res.response+",","")
+		  }else if(this.inputForm.attachedDocumentId2.indexOf(","+res.response)!=-1){
+			this.inputForm.attachedDocumentId2=this.inputForm.attachedDocumentId2.replace(","+res.response,"")
+		  }else{
+			this.inputForm.attachedDocumentId2=this.inputForm.attachedDocumentId2.replace(res.response,"")
+		  }
+	  },
+
       // 表单提交
       doSubmit () {
         this.$refs['inputForm'].validate((valid) => {
@@ -191,6 +241,14 @@
 			this.inputForm.writtenTime = this.inputForm.writtenTime + " 00:00:00";
 			this.inputForm.receivingTime = this.inputForm.receivingTime + " 00:00:00";
 			this.inputForm.cardNum = this.cardNum
+
+			//文件和图片文件合并
+			if(this.inputForm.attachedDocumentId2!=''){
+				this.inputForm.attachedDocumentId=this.inputForm.attachedDocumentId+","+this.inputForm.attachedDocumentId2;
+			}
+
+			console.log("图片:"+this.uploadfilesArra);
+
             gwCirculationCard2Service.save(this.inputForm).then((data) => {
               this.visible = false
               this.$message.success(data)

+ 9 - 2
jp-ui/src/views/circulation2/GwCirculationCard2FormYb.vue

@@ -13,8 +13,8 @@
 
 
 				<div class="cll" :style="{height:heightpx  }"  >
-					<el-steps direction="vertical" :active="assignWorkOrderRecordDTOList.length"  >
-					  <el-step v-for="item in assignWorkOrderRecordDTOList" :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':item.which=='2'?'承办情况':item.which=='3'?'承办转发':'已归档'" :description="item.state==1?item.nextTruename :item.nextTruename +' - '+item.updateTime"/>
+					<el-steps direction="vertical" :active="stepactive"  >
+					  <el-step v-for="item in assignWorkOrderRecordDTOList" :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':item.which=='2'?'承办情况':item.which=='3'?'承办转发':item.state=='0'?'已归档':'待归档'" :description="item.state==1?item.nextTruename :item.nextTruename +' - '+item.updateTime"/>
 					</el-steps>
 				</div>
 
@@ -181,6 +181,7 @@
         visible: false,
         loading: false,
 		assignWorkOrderRecordDTOList:[],
+		stepactive:0,
         inputForm: {
           id: '',
           yearNum: '',
@@ -279,6 +280,12 @@
 				let a=data.length*60;
 				this.heightpx=a+"px";
 				this.assignWorkOrderRecordDTOList=data.reverse()
+
+
+				let stepactive1 = this.assignWorkOrderRecordDTOList.filter(item => {
+					return item.state == 0
+				})
+				this.stepactive=stepactive1.length
 			})
 
           }

+ 25 - 5
jp-ui/src/views/circulation2/GwCirculationCard2List.vue

@@ -170,15 +170,15 @@
 		  title="内容摘要">
 		</vxe-column>
     <vxe-column
-		  field="attachedDocumentId"
+		  field="attachedDocumentId2"
 		  sortable
 		  title="来文附件">
 		  <template  #default="{ row }">
-		    <template v-if="row.attachedDocumentId">
+		    <template v-if="row.attachedDocumentId2">
 				  <el-image
 				    style="height: 50px;width:50px;margin-right:10px;"
-				    :src="src" v-for="(src, index) in row.attachedDocumentId.split(',')" :key="index"
-				    :preview-src-list="row.attachedDocumentId.split(',')">
+				    :src="src" v-for="(src, index) in row.attachedDocumentId2" :key="index"
+				    :preview-src-list="row.attachedDocumentId2">
 				  </el-image>
 		     </template>
 		  </template>
@@ -250,7 +250,7 @@
 		    writtenTime: '',
 		    receivingTime: '',
 		    contentSummary: '',
-		    state: '1'
+		    state: '5'
 		  },
 		  dataList: [],
 		  tablePage: {
@@ -292,6 +292,21 @@
 		    'orders': this.tablePage.orders,
 		    ...this.searchForm
 		  }).then((data) => {
+			//处理附件中不是图片的,不显示
+
+			data.records.forEach(item => {
+
+				let files=item.attachedDocumentId.split(',')
+				let imgstr=[];
+				files.forEach(item2 => {
+					if (this.isImageFormat(item2)) {
+						imgstr.push(item2)
+					}
+				})
+				item.attachedDocumentId2=imgstr;
+				console.log(item.id+"附件:"+item.attachedDocumentId2);
+			})
+
 		    this.dataList = data.records
 		    this.tablePage.total = data.total
 		    this.loading = false
@@ -305,6 +320,11 @@
 
 		  })
 		},
+		// 使用正则表达式判断文件名或URL是否为图片格式
+		isImageFormat(filename) {
+			const imageFormats = /\.(jpeg|jpg|gif|png|bmp|svg)$/i;
+			return imageFormats.test(filename);
+		},
 		// 当前页
 		currentChangeHandle ({ currentPage, pageSize }) {
 		  this.tablePage.currentPage = currentPage

+ 60 - 9
jp-ui/src/views/circulation2/fileCard.vue

@@ -61,9 +61,9 @@
 							<view>
 								{{ item.content }}
 							</view>
-							<view class="flex " style="line-height: 20px;">
+							<view class="flexll" style="line-height: 20px;">
 								<el-image :src="item.signfj" style="width: 80px; "></el-image>
-								{{ item.updateTime }}
+								<div>{{ item.updateTime }}</div>
 							</view>
 						</view>
 					</div>
@@ -79,9 +79,9 @@
 							<view>
 								{{ leader.content }}
 							</view>
-							<view class="flex " style="line-height: 20px;">
+							<view class="flexll" style="line-height: 20px;">
 								<el-image :src="leader.signfj" style="width: 80px; "></el-image>
-								{{ leader.updateTime }}
+								<div>{{ leader.updateTime }}</div>
 							</view>
 						</view>
 					</div>
@@ -97,9 +97,9 @@
 							<view>
 								{{ item.content }}
 							</view>
-							<view class="flex " style="line-height: 20px;">
+							<view class="flexll" style="line-height: 20px;">
 								<el-image :src="item.signfj" style="width: 80px; "></el-image>
-								{{ item.updateTime }}
+								<div>{{ item.updateTime }}</div>
 							</view>
 						</view>
 					</div>
@@ -125,8 +125,21 @@
 						<!-- <a :href="item.url">{{item.name}}</a> -->
 					</view>
 				</view>
-				<image-upload v-model="inputForm.attachedDocumentId" :limit="3"
-					tip="最多上传3个图片,单个图片不要超过10M"></image-upload>
+				<el-upload ref="imgList"
+								class="upload-demo"
+				  disabled
+				  :on-preview="(file, fileList) => {$window.location.href = (file.response && file.response.url) || file.url}"
+
+				  multiple
+				  :limit="100"
+
+				  :file-list="imgList">
+				 <template #tip>
+				   <div class="el-upload__tip" style="min-width: 255px;">
+				   </div>
+				 </template>
+				</el-upload>
+				<image-upload v-model="inputForm.attachedDocumentId" :limit="100" disabled ></image-upload>
 			</view>
 
 
@@ -179,7 +192,8 @@ export default {
 				writtenTime: '',
 				receivingTime: '',
 				contentSummary: '',
-				attachedDocumentId: ''
+				attachedDocumentId: '',
+				attachedDocumentId2: ''
 			},
 			gwflow: {
 				id: '',
@@ -263,10 +277,38 @@ export default {
 			}
 		},
 
+		// 使用正则表达式判断文件名或URL是否为图片格式
+		isImageFormat(filename) {
+			const imageFormats = /\.(jpeg|jpg|gif|png|bmp|svg)$/i;
+			return imageFormats.test(filename);
+		},
+
 		refresh() {
 			gwCirculationCard2Service.queryById(this.gwId).then(data => {
 				this.inputForm = data
 				this.inputForm.receivingTime = this.inputForm.receivingTime.substring(5, 10)
+				//处理图片
+				let aastr=this.inputForm.attachedDocumentId.split(",");
+				let imgstr="";
+				let filestr=[];
+
+				aastr.forEach(item => {
+					if (this.isImageFormat(item)) {
+						if(imgstr==''){
+							imgstr=item
+						}else{
+							imgstr=imgstr+","+item
+						}
+					}else{
+						let as={};
+						let s1=item.split("name=");
+						as.name=s1[1];
+						as.url=this.$http.BASE_URL+item
+						filestr.push(as)
+					}
+				})
+				this.inputForm.attachedDocumentId=imgstr;
+				this.imgList=filestr;
 
 			})
 			gwFlowService.queryByGwId(this.gwId).then(data => {
@@ -320,6 +362,13 @@ export default {
 	justify-content: center;
 	height: 100%;
 }
+.flexll{
+	line-height: 20px;
+	display: flex;
+	flex-direction: row;
+	align-items: center;
+	align-self: center;
+}
 
 .card_main {
 	width: 100%;
@@ -378,6 +427,8 @@ export default {
 
 .info_abstract_v {
 	margin: 18px;
+	display: flex;
+	flex-direction: column;
 }
 
 .vertical-text {