Pārlūkot izejas kodu

首页及工作台调整

wangqiang 1 gadu atpakaļ
vecāks
revīzija
2304c037cf

+ 14 - 13
src/layout/components/userbar.vue

@@ -3,15 +3,15 @@
 		<div>
 			<search></search>
 		</div>
-		<div class="screen panel-item hidden-sm-and-down" @click="screen">
-			<el-icon size="20px"><el-icon-full-screen /></el-icon>
-		</div>
-		<div class="screen panel-item hidden-sm-and-down" @click="showMsg">
-			<!-- <el-badge :hidden="msgList.length==0" :value="msgList.length"  type="danger"> -->
-			<el-icon size="20px"><bell></bell></el-icon>
-			<!-- </el-badge> -->
-		</div>
-		<el-dropdown class="user panel-item" trigger="hover">
+<!--		<div class="screen panel-item hidden-sm-and-down" @click="screen">-->
+<!--			<el-icon size="20px"><el-icon-full-screen /></el-icon>-->
+<!--		</div>-->
+<!--		<div class="screen panel-item hidden-sm-and-down" @click="showMsg">-->
+<!--			&lt;!&ndash; <el-badge :hidden="msgList.length==0" :value="msgList.length"  type="danger"> &ndash;&gt;-->
+<!--			<el-icon size="20px"><bell></bell></el-icon>-->
+<!--			&lt;!&ndash; </el-badge> &ndash;&gt;-->
+<!--		</div>-->
+		<!--<el-dropdown class="user panel-item" trigger="hover">
 			<div class="user-avatar">
 				<el-icon size="20px">
 					<svg
@@ -48,12 +48,13 @@
 					>
 				</el-dropdown-menu>
 			</template>
-		</el-dropdown>
+		</el-dropdown>-->
 
 		<el-dropdown
 			class="user panel-item"
 			trigger="hover"
 			@command="handleUser"
+			style="margin-right: 30px"
 		>
 			<div class="user-avatar">
 				<el-avatar :size="30" :src="photo"></el-avatar>
@@ -71,9 +72,9 @@
 				</el-dropdown-menu>
 			</template>
 		</el-dropdown>
-		<div class="panel-item hidden-sm-and-down" @click="openSetting">
-			<el-icon><MoreFilled style="transform: rotate(90deg)" /></el-icon>
-		</div>
+<!--		<div class="panel-item hidden-sm-and-down" @click="openSetting">-->
+<!--			<el-icon><MoreFilled style="transform: rotate(90deg)" /></el-icon>-->
+<!--		</div>-->
 		<el-drawer
 			title="新消息"
 			v-model="msg"

+ 5 - 1
src/views/common/UpLoadComponent.vue

@@ -1,6 +1,6 @@
 <!--文件上传组件-->
 <template>
-  <div>
+  <div :key="uploadKey">
     <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{dividerName}}</el-divider>
     <el-upload ref="upload" style="display: inline-block; :show-header='status'" action=""
                :limit="999" :http-request="httpRequest"
@@ -82,6 +82,7 @@
   export default {
     data () {
       return {
+		  uploadKey: '',
         progressFlag: false,
         loadProgress: 0,
         fileList: [],
@@ -293,6 +294,7 @@
           }
         }
         this.tableKey = Math.random()
+        this.uploadKey = Math.random()
       },
       showFile (row) {
         openWindowOnUrl(row)
@@ -310,6 +312,7 @@
         toHref(row)
       },
       async deleteById (row, index) {
+      	console.log('row', row)
 	  	// this.$refs.upload.handleRemove(this.dataListNew[index])
         await this.dataListNew.splice(index, 1)
 		await this.dataList.splice(index, 1)
@@ -317,6 +320,7 @@
 			  this.ossService.deleteMsgById(row.id)
 		  }
 		this.tableKey = Math.random()
+		this.uploadKey = Math.random()
       },
       /**
        * 关闭dialog时使用  清除el-upload中上传的文件

+ 1 - 1
src/views/cw/projectRecords/ProjectMembersList.vue

@@ -60,7 +60,7 @@
           :data="dataList"
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
-          <vxe-column type="checkbox" width="60" ></vxe-column>
+<!--          <vxe-column type="checkbox" width="60" ></vxe-column>-->
           <vxe-column min-width="230" align="center" title="项目名称" field="projectName">
             <template #default="scope">
               <el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectRecords:view')" @click="view(scope.row.id)">{{scope.row.projectName}}</el-link>

+ 1 - 1
src/views/cw/projectReportArchive/ProjectReportArchiveList.vue

@@ -139,7 +139,7 @@
           :data="dataList"
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
-          <vxe-column type="checkbox" width="60" ></vxe-column>
+<!--          <vxe-column type="checkbox" width="60" ></vxe-column>-->
           <vxe-column min-width="150" align="center" title="档案号" field="fileNumber">
             <template #default="scope">
               <el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectReportArchive:view')" @click="view(scope.row.id)">{{scope.row.fileNumber}}</el-link>

+ 4 - 1
src/views/dashboard/widgets/components/MyNoticePageList.vue

@@ -3,7 +3,10 @@
 		<template #header>
 			<div class="card-header">
 				<span>我的通知</span>
-				<el-button type="text" style="float:right" @click="toPendingList()">更多>></el-button>
+				<div style="float:right;">
+					<el-button type="text" @click="refreshList()">刷新</el-button>
+					<el-button type="text" @click="toPendingList()">更多>></el-button>
+				</div>
 			</div>
 		</template>
 		<el-table :data="dataList" style="width: 100%" height="480">

+ 72 - 3
src/views/dashboard/widgets/components/TodoList.vue

@@ -3,10 +3,13 @@
 		<template #header>
 			<div class="card-header">
 				<span>我的待办</span>
-				<el-button type="text" style="float:right" @click="toPendingList()">更多>></el-button>
+				<div style="float:right;">
+					<el-button type="text" @click="refreshList()">刷新</el-button>
+					<el-button type="text" @click="toPendingList()">更多>></el-button>
+				</div>
 			</div>
 		</template>
-		<el-table :data="dataList" style="width: 100%" height="480">
+		<!--<el-table :data="dataList" style="width: 100%" height="480">
 			<el-table-column
 				label="实例标题"
 				prop="vars.title"
@@ -80,7 +83,60 @@
 			]"
 			@page-change="currentChangeHandle"
 		>
-		</vxe-pager>
+		</vxe-pager>-->
+		<div style="height: calc(100% - 55px);margin-top: 5px">
+			<vxe-table
+				border="inner"
+				auto-resize
+				resizable
+				height="auto"
+				:loading="loading"
+				size="small"
+				ref="todoTable"
+				show-header-overflow
+				show-overflow
+				highlight-hover-row
+				:menu-config="{}"
+				:print-config="{}"
+				:import-config="{}"
+				:export-config="{}"
+				:data="dataList"
+				header-align="center"
+				:checkbox-config="{}">
+				<vxe-column title="实例标题" field="vars.title">
+				</vxe-column>
+				<vxe-column title="流程名称" field="processDefinitionName"></vxe-column>
+				<vxe-column title="当前环节" field="task.name">
+					<template #default="scope">
+						<el-tag>{{scope.row.task.name}}</el-tag>
+					</template>
+				</vxe-column>
+				<vxe-column title="流程发起人" field="vars.userName"></vxe-column>
+				<vxe-column
+					field="task.createTime"
+					title="发起时间">
+				</vxe-column>
+				<vxe-column title="操作" width="100px" fixed="right" align="center">
+					<template #default="scope">
+						<div>
+							<el-button text type="primary" @click="todo(scope.row)">办理</el-button>
+							<el-button  text type="primary" @click="trace(scope.row)">进度</el-button>
+						</div>
+					</template>
+				</vxe-column>
+			</vxe-table>
+			<vxe-pager
+				background
+				style="margin-top: 5px"
+				size="small"
+				:current-page="tablePage.currentPage"
+				:page-size="tablePage.pageSize"
+				:total="tablePage.total"
+				:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+				:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+				@page-change="currentChangeHandle">
+			</vxe-pager>
+		</div>
 	</el-card>
 	<v-dialog
 		title="查看进度"
@@ -123,10 +179,21 @@ export default {
 			visible: false,
 			currentTask: null,
 			processInstanceId: "",
+			timer: null
 		};
 	},
 	mounted() {
+		// 页面加载后
+		// 1.在执行定时器前先执行一次获取接口数据的操作函数, 否则接口会1秒钟后才调用
+		// 2.为了避免退出当前页面后,在其他页面也继续调用接口,退出前需要清除定时器.
 		this.refreshList();
+		this.timer = setInterval(() => {
+			setTimeout(this.refreshList, 0)
+		}, 60000)
+	},
+	beforeDestroy () {
+		clearInterval(this.timer)
+		this.timer = null
 	},
 	activated() {
 		this.refreshList();
@@ -170,11 +237,13 @@ export default {
 					status: row.status,
 				})
 				.then((data) => {
+					var cs = "cs"
 					this.$router.push({
 						path: "/flowable/task/TaskForm",
 						query: {
 							formTitle: `${row.vars.title}`,
 							title: `审批【${row.task.name || ""}】`,
+							cs: cs,
 							...pick(
 								data,
 								"formType",

+ 6 - 0
src/views/flowable/task/TaskForm.vue

@@ -248,6 +248,7 @@
 
 <script>
 // import FlowChart from '../modeler/FlowChart'
+import noticeService from '@/api/flowable/noticeService'
 import useTabs from "@/utils/useTabs";
 import UserSelect from "@/components/userSelect/index.vue";
 import PreviewForm from "@/views/flowable/form/GenerateFlowableForm.vue";
@@ -379,6 +380,7 @@ export default {
 			this.businessId = 'false'
 		},
 		init() {
+			this.cs = this.$route.query.cs;
 			this.taskSelectedTab = "form-first";
 			this.procDefId = this.$route.query.procDefId;
 			this.procDefKey = this.$route.query.procDefKey;
@@ -999,6 +1001,9 @@ export default {
 									} else if (num === '3') {
 										this.$router.push({path: '/sys/dashboard/workBench/PendingList'})
 										this.cc(data)
+									}else if (this.cs === 'cs') {
+										this.$router.push({path: '/dashboard/index'})
+										this.cc(data)
 									} else {
 										this.$router.push({path: '/flowable/task/TodoList'})
 										this.cc(data)
@@ -1212,6 +1217,7 @@ export default {
 	},
 	data() {
 		return {
+			cs: "",
 			form: null,
 			formType: "",
 			formUrl: "",

+ 14 - 14
src/views/home/index.vue

@@ -6,14 +6,14 @@
 				<!-- <DataPanel /> -->
 				<ContentChart />
 			</div>
-			<el-row :gutter="16" style="margin-top: 16px">
-				<el-col :span="12">
-					<CateforiesPercent />
-				</el-col>
-				<el-col :span="12">
-					<Carousel />
-				</el-col>
-			</el-row>
+<!--			<el-row :gutter="16" style="margin-top: 16px">-->
+<!--				<el-col :span="12">-->
+<!--					<CateforiesPercent />-->
+<!--				</el-col>-->
+<!--				<el-col :span="12">-->
+<!--					<Carousel />-->
+<!--				</el-col>-->
+<!--			</el-row>-->
 		</div>
 		<div class="right-side">
 			<el-row :gutter="16">
@@ -30,12 +30,12 @@
 				<el-col class="panel" :span="24">
 					<Announcement />
 				</el-col>
-				<el-col class="panel" :span="12">
-					<Docs />
-				</el-col>
-				<el-col class="panel" :span="12">
-					<Wx />
-				</el-col>
+<!--				<el-col class="panel" :span="12">-->
+<!--					<Docs />-->
+<!--				</el-col>-->
+<!--				<el-col class="panel" :span="12">-->
+<!--					<Wx />-->
+<!--				</el-col>-->
 			</el-row>
 		</div>
 	</div>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1261 - 0
src/views/program/registered/ProjectForm2.vue


+ 4 - 2
src/views/program/registered/ProjectThreeAuditForm.vue

@@ -150,11 +150,12 @@
 
     </div>
     <ProjectThreeAuditFormDialog ref="threeAuditDetail"></ProjectThreeAuditFormDialog>
-	  <ProjectForm  ref="projectFormView"></ProjectForm>
+	  <ProjectForm2  ref="projectFormView"></ProjectForm2>
   </div>
 </template>
 
 <script>
+  import ProjectForm2 from './ProjectForm2'
   import UpLoadComponent from '@/views/common/UpLoadComponent'
   import UserSelect from '@/components/userSelect'
   import SelectUserTree from '@/views/utils/treeUserSelect'
@@ -247,7 +248,8 @@
       }
     },
     components: {
-		ProjectForm: () => import('./ProjectForm.vue'),
+		ProjectForm2,
+		// ProjectForm2: () => import('./ProjectForm2.vue'),
       UpLoadComponent,
       UserSelect,
       WangEditor,

+ 668 - 0
src/views/program/registered/ProjectThreeAuditForm2.vue

@@ -0,0 +1,668 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <div>
+      <div v-if="inputForm.status === '5'&&(tabName === '一级校审'||tabName === '二级校审'||tabName === '三级校审')">
+        <el-row type="flex" justify="end">
+          <el-button @click="downloadFirstAuditTpl">下载</el-button>
+        </el-row>
+      </div>
+		<el-divider content-position="left" v-if="commonJS.isEmpty(tabName) && (inputForm.auditLevel === '1' || inputForm.auditLevel === '2' || inputForm.auditLevel === '3')">
+			<el-link
+				@click="viewProjectInfo(inputForm.programId)" type="primary" style="font-weight: bold;"><i class="el-icon-document"></i>
+				项目信息
+			</el-link>
+
+		</el-divider>
+		<el-divider content-position="left" v-else><i class="el-icon-document"></i> 项目校审</el-divider>
+		<el-form size="large" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+               label-width="125px" @submit.native.prevent>
+          <el-row  :gutter="15">
+            <el-col :span="12">
+              <el-form-item label="项目名称" prop="programProjectListInfo.name"
+              >
+                <el-input size="large" :disabled="true" v-model="inputForm.programProjectListInfo.name" placeholder="请输入项目名称" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="评估基准日" prop="programProjectListInfo.assessmentDate"
+              >
+                <el-date-picker
+                  :disabled="true"
+                  v-model="inputForm.programProjectListInfo.assessmentDate"
+                  type="date"
+                  value-format="YYYY-MM-DD"
+                  placeholder="选择评估基准日"
+                  style="width:100%"
+                  placement="bottom-start"
+                  clearable>
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="12">
+              <el-form-item label="专业评估人员" prop="auditPeopleList"
+                            :rules="[{required: true, message: '专业评估人员不能为空', trigger: 'blur'},{required: true, message: '专业评估人员不能为空', trigger: 'change'}]"
+              >
+                <UserSelect :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" :readonly="true" :limit="10" :modelValue="inputForm.auditPeopleList" @update:modelValue='(value) => {inputForm.auditPeopleList = value}'></UserSelect>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="项目负责人" prop="programProjectListInfo.projectManager"
+              >
+                <SelectUserTree
+                  ref="companyTree"
+                  size="large"
+                  :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+                  :url="`/system-server/sys/user/treeUserDataAllOffice?type=2`"
+                  :value="inputForm.programProjectListInfo.projectManager"
+                  :disabled="true"
+                  :clearable="true"
+                  :accordion="true"
+                  @getValue="(value) => {inputForm.programProjectListInfo.projectManager=value}"/>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="15">
+            <el-col :span="12">
+              <el-form-item label="选择项目审核人" prop="auditPeople"
+                            :rules="[{required: true, message: '审批人不能为空', trigger: 'blur'},{required: true, message: '审批人不能为空', trigger: 'change'}]"
+              >
+                <UserSelect :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'"
+							:readonly="true" :limit="1"
+							:modelValue="inputForm.auditPeople"
+							@update:modelValue='(value) => {inputForm.auditPeople = value}'>
+				</UserSelect>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-divider content-position="left">
+            <i class="el-icon-document"></i> 审核意见及回复
+            <el-link  v-if="commonJS.isEmpty(tabName) && (inputForm.auditLevel === '2' || inputForm.auditLevel === '3')"
+                      @click="openAuditDetail(inputForm.programId, '1')" type="primary" style="font-weight: bold;font-size: 15px;margin-left: 20px"><i class="el-icon-document"></i>
+              一级校审详情
+            </el-link>
+            <el-link v-if="commonJS.isEmpty(tabName) && inputForm.auditLevel === '3'"
+                     @click="openAuditDetail(inputForm.programId, '2')" type="primary" style="font-weight: bold;font-size: 15px;margin-left: 20px"><i class="el-icon-document"></i>
+              二级校审详情
+            </el-link>
+          </el-divider>
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="明细表" prop="detailOpinion"
+              >
+                <!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.detailOpinion" placeholder="请填写明细表"     ></el-input>-->
+                <WangEditor style="width: 100%"
+							ref="contents1Editor"
+							:modelValue="inputForm.detailOpinion"
+							@update:modelValue="(value) => {inputForm.detailOpinion = value}"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="评估报告" prop="reportOpinion"
+              >
+                <!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.reportOpinion" placeholder="请填写评估报告"     ></el-input>-->
+                <WangEditor style="width: 100%" ref="contents2Editor" :modelValue="inputForm.reportOpinion" @update:modelValue="(value) => {inputForm.reportOpinion = value}"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="技术说明" prop="remarksOpinion"
+              >
+                <!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.remarksOpinion" placeholder="请填写技术说明"     ></el-input>-->
+                <WangEditor style="width: 100%" ref="contents3Editor" :modelValue="inputForm.remarksOpinion" @update:modelValue="(value) => {inputForm.remarksOpinion = value}"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="工作底稿" prop="workOpinion"
+              >
+                <!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.workOpinion" placeholder="请填写工作底稿"     ></el-input>-->
+                <WangEditor style="width: 100%" ref="contents4Editor" :modelValue="inputForm.workOpinion" @update:modelValue="(value) => {inputForm.workOpinion = value}"/>
+              </el-form-item>
+            </el-col>
+			  <el-col :span="24">
+            <el-form size="large" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+                     label-width="125px" @submit.native.prevent >
+              <el-col :span="24">
+                <el-form-item label="执行人员保留意见" prop="retainOpinion"
+                              :rules="[
+                 ]">
+                  <el-input type="textarea" :disabled="status === 'taskFormDetail' || method === 'view'" :rows="5" maxlength="500" v-model="inputForm.retainOpinion" placeholder="请填写执行人员保留意见"     ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="审核人员审核未修改意见" prop="changeOpinion"
+                              :rules="[
+                 ]">
+                  <el-input type="textarea" :disabled="status === 'taskFormDetail' || method === 'view'" :rows="5"  maxlength="500" v-model="inputForm.changeOpinion" placeholder="请填写审核人员审核未修改意见"     ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-form>
+			  </el-col>
+		  </el-row>
+
+
+      </el-form>
+      <!--        附件-->
+      <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
+    </div>
+    <ProjectThreeAuditFormDialog ref="threeAuditDetail"></ProjectThreeAuditFormDialog>
+	  <ProjectForm  ref="projectFormView"></ProjectForm>
+  </div>
+</template>
+
+<script>
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import UserSelect from '@/components/userSelect'
+  import SelectUserTree from '@/views/utils/treeUserSelect'
+  import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
+  import WangEditor from '@/components/editor/WangEditorNoMenu'
+  import ProjectThreeAuditFormDialog from './ProjectThreeAuditFormDialog'
+
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          id: '',
+          remarks: '',
+          programId: '',
+          auditLevel: '',
+          auditPeople: '',
+          auditDate: '',
+          retainOpinion: '',
+          changeOpinion: '',
+          detailOpinion: '',
+          reportOpinion: '',
+          remarksOpinion: '',
+          workOpinion: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {},
+          programAuditAssessPeopleDtoList: [],
+          workAttachmentDtoList: [],
+          auditPeopleList: ''
+        },
+        programId: '',
+        supervisorList: [],
+        keyWatch: '',
+        tabName: ''
+      }
+    },
+    programProjectListInfoService: null,
+    created () {
+      this.programProjectListInfoService = new ProgramProjectListInfoService()
+    },
+    computed: {
+      bus: {
+        get () {
+          this.$refs.uploadComponent.setDividerName('附件')
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.bus) {
+            if (this.bus !== 'false') {
+              this.init('', this.bus)
+            }
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      },
+      'loading': {
+        handler (newVal) {
+          this.$emit('changeLoading', newVal)
+          this.$refs.uploadComponent.changeLoading(newVal)
+        }
+      }
+    },
+    components: {
+		ProjectForm: () => import('./ProjectForm.vue'),
+      UpLoadComponent,
+      UserSelect,
+      WangEditor,
+      SelectUserTree,
+      ProjectThreeAuditFormDialog
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id, tabName) {
+        this.tabName = tabName
+        this.method = method
+        this.inputForm = {
+          id: '',
+          remarks: '',
+          programId: '',
+          auditLevel: '',
+          auditPeople: '',
+          auditDate: '',
+          retainOpinion: '',
+          changeOpinion: '',
+          detailOpinion: '',
+          reportOpinion: '',
+          remarksOpinion: '',
+          workOpinion: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {
+            id: '',
+			  name: '',
+			  assessmentDate: '',
+			  projectManager: '',
+			  projectManagerName: ''
+          },
+          programAuditAssessPeopleDtoList: [],
+          workAttachmentDtoList: [],
+          auditPeopleList: ''
+        }
+        this.inputForm.id = id
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+			if (method === 'view' || this.status === 'taskFormDetail') {
+				// 禁用富文本
+				this.$refs.contents1Editor.disable()
+				this.$refs.contents2Editor.disable()
+				this.$refs.contents3Editor.disable()
+				this.$refs.contents4Editor.disable()
+			}
+          this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then((data) => {
+            this.inputForm = this.recover(this.inputForm, data)
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            this.$refs.contents1Editor.clear()
+            this.$refs.contents2Editor.clear()
+            this.$refs.contents3Editor.clear()
+            this.$refs.contents4Editor.clear()
+            this.$refs.uploadComponent.clearUpload()
+            if (this.commonJS.isNotEmpty(this.inputForm.detailOpinion)) {
+              this.$refs.contents1Editor.init(this.inputForm.detailOpinion)
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.reportOpinion)) {
+              this.$refs.contents2Editor.init(this.inputForm.reportOpinion)
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.remarksOpinion)) {
+              this.$refs.contents3Editor.init(this.inputForm.remarksOpinion)
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.workOpinion)) {
+              this.$refs.contents4Editor.init(this.inputForm.workOpinion)
+            }
+
+            if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
+              this.inputForm.workAttachmentDtoList = []
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.programAuditAssessPeopleDtoList)) {
+              let p = ''
+              this.inputForm.programAuditAssessPeopleDtoList.forEach((item, index) => {
+                if (this.inputForm.programAuditAssessPeopleDtoList.length === parseInt(parseInt(index) + parseInt(1))) {
+                  p = p + item.assessPeople
+                } else {
+                  p = p + item.assessPeople + ','
+                }
+              })
+              this.inputForm.auditPeopleList = p
+            } else {
+              this.inputForm.auditPeopleList = ''
+            }
+            if (this.status === 'taskFormDetail') {
+              this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit')
+            } else if (this.status === 'audit') {
+              this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit', null, null, true, this.$store.state.user.name)
+            } else if (this.method === 'view') {
+              this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit')
+            } else {
+              this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit', null, null, true, this.$store.state.user.name)
+            }
+            this.loading = false
+          })
+        })
+      },
+      reapplyForm (callback) {
+        this.loading = true
+        this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then((data) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.loading = false
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startFormTrue(callback)
+          }
+        })
+      },
+      saveForm (callback) {
+        this.doSubmit('save', callback)
+      },
+      startForm (callback) {
+        this.loading = true
+        if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+          this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then((data) => {
+            if (this.commonJS.isNotEmpty(data.status) && data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+              this.loading = false
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            } else {
+              this.startFormTrue(callback)
+            }
+          })
+        } else {
+          this.startFormTrue(callback)
+        }
+      },
+      startFormTrue (callback) {
+        this.doSubmit('start', callback)
+      },
+      async agreeForm (callback) {
+        this.loading = true
+        await this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then((data) => {
+          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.loading = false
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error()
+          } else {
+            this.doSubmit('agree', callback)
+          }
+        })
+      },
+      // 表单提交
+      async doSubmit (status, callback) {
+        this.loading = true
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (status === 'save') {
+          // 暂存
+          this.loading = true
+          this.inputForm.status = '1'
+          this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+          if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
+            this.inputForm.programAuditAssessPeopleDtoList = []
+            this.inputForm.auditPeopleList.split(',').forEach(item => {
+              let i = {assessPeople: item, auditId: this.inputForm.id}
+              this.inputForm.programAuditAssessPeopleDtoList.push(i)
+            })
+          } else {
+            this.inputForm.programAuditAssessPeopleDtoList = []
+          }
+          this.programProjectListInfoService.saveFormThree(this.inputForm).then((data) => {
+            this.inputForm.assignee = this.inputForm.auditPeople
+            callback(data.businessTable, data.businessId, this.inputForm)
+            this.loading = false
+          }).catch(() => {
+            this.loading = false
+          })
+          return
+        } else if (status === 'start') {
+          // 送审  待审核
+          this.inputForm.status = '2'
+        } else if (status === 'agree') {
+          // 审核同意
+          this.inputForm.status = '5'
+          this.inputForm.auditDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+        }
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
+              this.inputForm.programAuditAssessPeopleDtoList = []
+              this.inputForm.auditPeopleList.split(',').forEach(item => {
+                let i = {assessPeople: item, auditId: this.inputForm.id}
+                this.inputForm.programAuditAssessPeopleDtoList.push(i)
+              })
+            } else {
+              this.inputForm.programAuditAssessPeopleDtoList = []
+            }
+            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+            this.programProjectListInfoService.saveFormThree(this.inputForm).then((data) => {
+              this.inputForm.assignee = this.inputForm.auditPeople
+              this.inputForm.id = data.businessId
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          } else {
+            this.loading = false
+          }
+        })
+      },
+      async updateStatusById (type, callback) {
+        this.loading = true
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'reject' || type === 'reback') {
+            this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then((data) => {
+              if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.loading = false
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // if (type === 'agree') {
+                //   // 同意
+                //   this.inputForm.status = '5'
+                // }
+                if (type === 'reject') {
+                  // 驳回
+                  this.inputForm.status = '4'
+                  this.loading = true
+                  this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+                  if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
+                    this.inputForm.programAuditAssessPeopleDtoList = []
+                    this.inputForm.auditPeopleList.split(',').forEach(item => {
+                      let i = {assessPeople: item, auditId: this.inputForm.id}
+                      this.inputForm.programAuditAssessPeopleDtoList.push(i)
+                    })
+                  } else {
+                    this.inputForm.programAuditAssessPeopleDtoList = []
+                  }
+                  this.programProjectListInfoService.saveFormThree(this.inputForm).then((data) => {
+                    this.loading = false
+                  }).catch(() => {
+                    this.loading = false
+                  })
+                  // return
+                }
+                if (type === 'reback') {
+                  // 撤回
+                  this.inputForm.status = '3'
+                }
+                if (type === 'reject' || type === 'reback') {
+                  let param = {status: this.inputForm.status, id: this.inputForm.id}
+                  this.loading = true
+                  this.programProjectListInfoService.updateStatusByAuditId(param).then(() => {
+                    this.loading = false
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then((data) => {
+              if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.loading = false
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {status: '1', id: this.inputForm.id}
+                this.programProjectListInfoService.updateStatusByAuditId(param).then(() => {
+                  this.loading = false
+                  callback()
+                })
+              }
+            })
+          }
+        }
+      },
+      // async updateStatusById (type) {
+      //   if (await this.$refs.uploadComponent.checkProgress()) {
+      //     this.loading = false
+      //     throw new Error()
+      //   }
+      //   await this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then((data) => {
+      //     if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+      //       this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+      //       throw new Error()
+      //     } else {
+      //       // if (type === 'agree') {
+      //       //   // 同意
+      //       //   this.inputForm.status = '5'
+      //       // }
+      //       if (type === 'reject') {
+      //         // 驳回
+      //         this.inputForm.status = '4'
+      //         this.loading = true
+      //         this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+      //         if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
+      //           this.inputForm.programAuditAssessPeopleDtoList = []
+      //           this.inputForm.auditPeopleList.split(',').forEach(item => {
+      //             let i = {assessPeople: item, auditId: this.inputForm.id}
+      //             this.inputForm.programAuditAssessPeopleDtoList.push(i)
+      //           })
+      //         } else {
+      //           this.inputForm.programAuditAssessPeopleDtoList = []
+      //         }
+      //         this.programProjectListInfoService.saveFormThree(this.inputForm).then((data) => {
+      //           this.loading = false
+      //         }).catch(() => {
+      //           this.loading = false
+      //         })
+      //         return
+      //       }
+      //       if (type === 'reback') {
+      //         // 撤回
+      //         this.inputForm.status = '3'
+      //       }
+      //       if (type === 'reback') {
+      //         let param = {status: this.inputForm.status, id: this.inputForm.id}
+      //         this.programProjectListInfoService.updateStatusByAuditId(param)
+      //       }
+      //     }
+      //   })
+      // },
+      close () {
+        this.$refs.uploadComponent.clearUpload()
+        this.inputForm = {
+          id: '',
+          remarks: '',
+          programId: '',
+          auditLevel: '',
+          auditPeople: '',
+          auditDate: '',
+          retainOpinion: '',
+          changeOpinion: '',
+          detailOpinion: '',
+          reportOpinion: '',
+          remarksOpinion: '',
+          workOpinion: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {},
+          programAuditAssessPeopleDtoList: [],
+          workAttachmentDtoList: []
+        }
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      },
+      // 下载一级校审
+      downloadFirstAuditTpl () {
+        // this.$utils.downloadExcel('/sys/project/import/template')
+        this.loading = true
+        if (this.tabName === '一级校审') {
+          this.programProjectListInfoService.downloadFirstAuditTpl(this.inputForm.programProjectListInfo.id, this.inputForm.id).then((res) => {
+            // 将二进制流文件写入excel表,以下为重要步骤
+            this.$utils.downloadWord(res, this.tabName)
+            this.loading = false
+          }).catch(function (err) {
+            this.loading = false
+            if (err.response) {
+              console.log(err.response)
+            }
+          })
+        }
+        if (this.tabName === '二级校审') {
+          this.programProjectListInfoService.downloadSecondAuditTpl(this.inputForm.programProjectListInfo.id, this.inputForm.id).then((res) => {
+            // 将二进制流文件写入excel表,以下为重要步骤
+            this.$utils.downloadWord(res, this.tabName)
+            this.loading = false
+          }).catch(function (err) {
+            this.loading = false
+            if (err.response) {
+              console.log(err.response)
+            }
+          })
+        }
+        if (this.tabName === '三级校审') {
+          this.programProjectListInfoService.downloadThirdlyAuditTpl(this.inputForm.programProjectListInfo.id, this.inputForm.id).then((res) => {
+            // 将二进制流文件写入excel表,以下为重要步骤
+            this.$utils.downloadWord(res, this.tabName)
+            this.loading = false
+          }).catch(function (err) {
+            this.loading = false
+            if (err.response) {
+              console.log(err.response)
+            }
+          })
+        }
+      },
+      // 根据项目id以及校审级别查询校审详情
+      // 打开校审明细页面
+      openAuditDetail (programId, auditLevel) {
+        this.$refs.threeAuditDetail.init(programId, auditLevel)
+      },
+		// 查看
+		viewProjectInfo (projectId) {
+			this.$refs.projectFormView.init('view', projectId, 'auditId1', 'auditId2', 'auditId3', 'archiveId')
+		}
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .w-e-text-container {
+    z-index: 1 !important;
+  }
+  /deep/ .wtext {
+    height: 200px
+  }
+  /deep/  .el-divider__text {
+    font-size: 16px;
+    font-weight: bold;
+  }
+</style>

+ 18 - 16
src/views/sys/mould/SerialnumTplForm.vue

@@ -95,7 +95,7 @@
           <el-form-item style="margin-top: 20px" label="生成编号模板" prop="mouldList">
             <vxe-toolbar >
               <template #buttons>
-                <vxe-button status="primary" size="mini" @click="insertEvent">新增</vxe-button>
+                <vxe-button status="primary"  @click="insertEvent">新增</vxe-button>
               </template>
             </vxe-toolbar>
           </el-form-item>
@@ -130,7 +130,7 @@
           </vxe-table-column>
           <vxe-table-column title="操作" width="100">
             <template v-slot="scope">
-              <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex)">删除</el-button>
+              <el-button  type="danger" @click="removeEvent(scope.row,scope.$rowIndex)">删除</el-button>
             </template>
           </vxe-table-column>
         </vxe-table>
@@ -335,45 +335,47 @@
       },
       // 生成模板
       generateTemplate () {
+      	console.log('this.mouldList', this.mouldList)
         let list = this.mouldList
         let i = ''
         let j = ''
         list.forEach(obj => {
+        	console.log('obj', obj)
           // 公司简称
-          if (obj.type === '1') {
+          if (obj.row.type === '1') {
             i = i + '{spnm}'
           }
           // 分公司简称
-          if (obj.type === '2') {
+          if (obj.row.type === '2') {
             i = i + '{brspnm}'
           }
           // 固定字符、业务类型、业务类型代码、业务类型的字
-          if (obj.type === '3' || obj.type === '4' || obj.type === '5' || obj.type === '6') {
-            i = i + obj.value
-            j = j + obj.value
+          if (obj.row.type === '3' || obj.row.type === '4' || obj.row.type === '5' || obj.row.type === '6') {
+            i = i + obj.row.value
+            j = j + obj.row.value
           }
           // 年度
-          if (obj.type === '7') {
+          if (obj.row.type === '7') {
             i = i + '{year}'
-            j = j + obj.value
+            j = j + obj.row.value
           }
           // 流水号
-          if (obj.type === '8') {
+          if (obj.row.type === '8') {
             i = i + '{serialNum}'
-            j = j + obj.value
+            j = j + obj.row.value
           }
           // 月度
-          if (obj.type === '9') {
+          if (obj.row.type === '9') {
             i = i + '{month}'
-            j = j + obj.value
+            j = j + obj.row.value
           }
           // 日期
-          if (obj.type === '10') {
+          if (obj.row.type === '10') {
             i = i + '{day}'
-            j = j + obj.value
+            j = j + obj.row.value
           }
           // 公司简称
-          if (obj.type === '11') {
+          if (obj.row.type === '11') {
             i = i + '{replacement}'
           }
         })