Z 1 anno fa
parent
commit
3adc1fd8db

+ 33 - 18
hybrid/html/a.html

@@ -16,10 +16,11 @@
 			}
 		</style>
 		<div id="app">
-			<van-nav-bar  @click-left="onClickLeft" style="background-color: rgb(21, 122, 44);color: rgb(255, 255, 255);height:140rpx"
-				:title="title" left-arrow :safe-area-inset-top='true' :placeholder='true' :fixed='true'></van-nav-bar>
-			<fm-generate-vant-form v-if='isFlag' :data="jsonData" :value="form.valueJson" ref="generateForm"
-				:edit='isEdit'>
+			<van-nav-bar height='100rpx' @click-left="onClickLeft"
+				style="background-color: rgb(21, 122, 44);color: rgb(255, 255, 255);" :title="title" left-arrow
+				:safe-area-inset-top='true' :placeholder='true' :fixed='true'></van-nav-bar>
+			<fm-generate-vant-form style='height: 75vh !important;overflow: auto;' v-if='isFlag' :data="jsonData"
+				:value="form.valueJson" ref="generateForm" :edit='isEdit'>
 			</fm-generate-vant-form>
 			<div>
 				<!-- <van-form>
@@ -28,7 +29,7 @@
 							show-word-limit />
 					</van-cell-group>
 				</van-form> -->
-				<div
+				<div v-if='isEdit'
 					style="display: flex;justify-content: space-between; padding: 30px 30px; position: fixed; bottom: 0; width: 100%; height: 80px;">
 					<van-button style="width:48%" type="primary" @click="handleAudit(1)">提交
 					</van-button>
@@ -66,7 +67,9 @@
 				created() {
 					this.headers = this.getQueryParams('headers');
 					let params = this.getQueryParams('params');
-					this.APIUrl = this.headers.serverInfo
+					this.isEdit = params.isEdit || true
+					this.APIUrl = this.headers.serverInfo || 'http://192.168.1.105:80/api'
+					console.log(params)
 					axios({
 						method: 'get',
 						url: this.APIUrl + `/flowable/bpmcustomform/getById/${params.id}`,
@@ -74,6 +77,9 @@
 					}).then((res) => {
 						if (res.data.code != '-1') {
 							this.form = res.data.data
+							this.form.formId = res.data.data.id
+							this.form.id = ''
+							this.form.valueJson = {}
 							this.title = this.form.name
 							this.jsonData = JSON.parse(res.data.data.formJson.makingJson);
 							this.jsonData.list.forEach(item => {
@@ -88,9 +94,17 @@
 								}
 								if (item.type == "deptCascader") {
 									item.type = 'cascader'
+									if (item.options.isDefaultLoginUser) {
+										this.form.valueJson[item.model] = [params.userInfo.groupId];
+									}
+
 								}
 								if (item.type == "userSelect") {
 									item.type = 'select'
+									if (item.options.isDefaultLoginUser) {
+										this.form.valueJson[item.model] = params.userInfo.userId;
+									}
+
 								}
 							})
 							this.jsonData.config.dataSource && this.jsonData.config.dataSource.forEach(item => {
@@ -100,20 +114,21 @@
 								item.url = item.url && item.url.replace('/api', this.APIUrl)
 							})
 							this.isFlag = true
+
 						}
 					});
-					axios({
-						method: 'get',
-						url: this.APIUrl + `/bpm/task/list-by-process-instance-id?processInstanceId=${params.id}`,
-						headers: this.headers,
-					}).then((res) => {
-						console.log(res)
-						if (res.data.code != '-1') {
-						
-						}
-					});
-				
-				
+					// axios({
+					// 	method: 'get',
+					// 	url: this.APIUrl + `/bpm/task/list-by-process-instance-id?processInstanceId=${params.id}`,
+					// 	headers: this.headers,
+					// }).then((res) => {
+					// 	console.log(res)
+					// 	if (res.data.code != '-1') {
+
+					// 	}
+					// });
+
+
 				},
 				methods: {
 					getQueryParams(queryName) {

+ 21 - 10
hybrid/html/c.html

@@ -17,18 +17,18 @@
 		</style>
 		<div id="app">
 			<van-nav-bar height='100rpx' @click-left="onClickLeft" style="background-color: rgb(21, 122, 44);color: rgb(255, 255, 255);"
-				title="审核" left-arrow :safe-area-inset-top='true' :placeholder='true' :fixed='true'></van-nav-bar>
-			<fm-generate-vant-form v-if='isFlag' :data="jsonData" :value="form.formVariables" ref="generateForm" :edit='false'>
+				:title="title" left-arrow :safe-area-inset-top='true' :placeholder='true' :fixed='true'></van-nav-bar>
+			<fm-generate-vant-form style='height: 75vh !important;overflow: auto;' v-if='isFlag' :data="jsonData" :value="form.valueJson" ref="generateForm" :edit='false'>
 			</fm-generate-vant-form>
-			<div>
-				<van-form>
+			<div v-if="type!='view'" style='position: fixed; bottom: 0;background: #f9fafb;width:100%;height:20%'>
+				<van-form label-width='30px'>
 					<van-cell-group inset>
-						<van-field type="textarea" v-model="form.reason" label="意见" placeholder="" rows="2" autosize
+						<van-field style="background: #f9fafb;" type="textarea" v-model="form.reason" label="意见" placeholder="" rows="2" :autosize='{maxHeight: 50}'
 							show-word-limit />
 					</van-cell-group>
 				</van-form>
 				<div
-					style="display: flex;justify-content: space-between; padding: 30px 30px; position: fixed; bottom: 0; width: 100%; height: 80px;">
+					style="display: flex;justify-content: space-between; padding: 0px 30px;  width: 100%; height: 80px;">
 					<van-button style="width:48%" type="primary" @click="handleAudit(1)">通过
 					</van-button>
 					<van-button style="width:48%" type="danger" @click="handleAudit(0)">驳回
@@ -55,17 +55,21 @@
 					return {
 						isFlag:false,
 						isEdit:true,
+						type:'',
 						jsonData: {},
 						editData: {},
 						form: {},
 						headers: {},
 						APIUrl: '',
+						title: '',
 					}
 				},
 				created() {
 					this.headers = this.getQueryParams('headers');
 					let params = this.getQueryParams('params');
-					this.APIUrl = this.headers.serverInfo
+					this.APIUrl = this.headers.serverInfo || 'http://192.168.1.105:80/api'
+					this.title = params.type =='view'?'查看':'审核'
+					this.type = params.type 
 					axios({
 						method: 'get',
 						url: this.APIUrl + `/bpm/process-instance/get?id=${params.processInstanceId}`,
@@ -87,6 +91,15 @@
 								if(item.type=="userSelect"){
 									item.type = 'select'
 								}
+								if (item.type == "imgupload") {
+									this.form.valueJson[item.model].length && this.form.valueJson[item.model].forEach(
+									item => {
+										//item.objectUrl = this.APIUrl +'/kd-aiot' + item.storePath
+										item.objectUrl = item.url 
+									
+									})
+									
+								}
 							})
 							this.jsonData.config.dataSource && this.jsonData.config.dataSource.forEach(item => {
 								item.headers = {
@@ -94,9 +107,7 @@
 								}
 								item.url = item.url && item.url.replace('/api', this.APIUrl)
 							})
-							this.isFlag = true
-							console.log(this.jsonData)
-							
+							this.isFlag = true	
 						}
 					});
 				},

File diff suppressed because it is too large
+ 1 - 1
hybrid/html/vue-form-making/form-making-v3.umd.js


File diff suppressed because it is too large
+ 5 - 0
hybrid/html/vue-form-making/form-making-v3.umd2.js


File diff suppressed because it is too large
+ 0 - 0
hybrid/html/vue-form-making/index.css


+ 2 - 1
pages/home/wt/components/formParser/routerView.vue

@@ -22,11 +22,12 @@
 			    "zoomwin-token": value,
 			    Authorization: value,
 			    "zoomwin-sid": uni.getStorageSync("userInfo").sessionId,
-				serverInfo : apiInfo.protocal+ apiInfo.hostname+':'+apiInfo.port+'/api',
+				serverInfo : apiInfo.protocal? apiInfo.protocal+ apiInfo.hostname+':'+apiInfo.port+'/api' :'',
 			  };
 			  //http://192.168.1.105:18086
 		  setTimeout(()=>{
 			  const params =  JSON.parse(option.params)
+			  params.userInfo = uni.getStorageSync("userInfo")
 			  let html = params.type =='add'? 'a.html':'c.html'
 			  this.webViewUrl = `/hybrid/html/${html}?params=${JSON.stringify(params)}&headers=${JSON.stringify(headers)}`
 			  this.isShow = true

+ 43 - 14
pages/internalManagement/apply/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="blacklog-container">
-		<uni-nav-bar  height="100rpx" fixed="true" statusBar="true" left-icon="back" :title="title" @clickLeft="back"
+		<uni-nav-bar height="100rpx" fixed="true" statusBar="true" left-icon="back" :title="title" @clickLeft="back"
 			background-color="#157A2C" color="#fff"></uni-nav-bar>
 		<!-- <div>
 			<u-search placeholder="搜索模板名称" shape="square" v-model="keyword"></u-search>
@@ -30,7 +30,7 @@
 			</u-list>
 			<u-list v-show='value1==1' @scrolltolower="scrolltolower">
 				<view v-show="list.length === 0" class="no_data">
-						  	<u-empty mode="data" textSize="30"></u-empty>
+					<u-empty mode="data" textSize="30"></u-empty>
 				</view>
 				<u-list-item v-for="(item, index) in list" :key="index">
 					<view class="kd-card-1">
@@ -46,7 +46,7 @@
 								</view>
 							</view>
 							<view class="card-footer-1">
-								<u-button type="success" @click="handleDetail(item, 'view')">处理</u-button>
+								<u-button type="success" @click="handleDetail(item, 'approve')">处理</u-button>
 
 								<u-button type="info" @click="handleDetailView(item, 'detail')">流程详情</u-button>
 							</view>
@@ -56,9 +56,10 @@
 			</u-list>
 			<u-list v-show='value1==2' @scrolltolower="scrolltolowerDone">
 				<view v-show="doneList.length === 0" class="no_data">
-						  	<u-empty mode="data" textSize="30"></u-empty>
+					<u-empty mode="data" textSize="30"></u-empty>
 				</view>
-				<u-list-item v-for="(item, index) in doneList" :key="index" @click.native="handleDetailView(item)">
+				<!-- @click.native="handleDetailView(item)" -->
+				<u-list-item v-for="(item, index) in doneList" :key="index" >
 					<view class="kd-card-2">
 						<view class="card-title-1">
 							<text>{{ item.name }}</text>
@@ -74,16 +75,20 @@
 									<text class="label-1">处理时间</text>
 									<text class="content-1">{{ item.endTime }}</text>
 								</view>
-                                <view class="card-col-1">
-									<text class="label-1">处理时间</text>
-									<text class="content-1">{{ item.endTime }}</text>
+								<view class="card-col-1">
+									<!-- <text class="label-1" @click.stop="handleDetail(item,'view','false')">提交记录</text> -->
 								</view>
+							
+							</view>
+							<view class="card-footer-1">
+								<u-button type="success" @click="handleDetailRecode(item, 'view')">提交记录</u-button>
+								<u-button type="info" @click="handleDetailView(item, 'detail')">流程详情</u-button>
 							</view>
 						</view>
 					</view>
 				</u-list-item>
 			</u-list>
-		   
+
 		</view>
 		<u-tabbar class="tabbarBox" :value="value1" @change="change1" :fixed="true" :placeholder='false'
 			:safeAreaInsetBottom="true">
@@ -185,13 +190,28 @@
 				this.defaultList = await getBpmCustomFormList()
 				this.baseList = await getByCode('collaborative_type')
 			},
-			handleDetail(item, type) {
+			handleDetail(item, type, isEdit = true) {
 				//'pages/home' + this.listData.miniHandleRouter
 				///wt/components/feeApplication/taskSubmit
 				let params = JSON.stringify({
 					id: item.id,
-					processInstanceId: item.processInstance?.id|| '',
-					type: type
+					processInstanceId: item.processInstance?.id || item.processDefinitionId || '',
+					type: type,
+					isEdit: isEdit
+				})
+				let queryParams = `params=${params}`
+				let url = '/pages/home/wt/components/formParser/routerView'
+				uni.navigateTo({
+					url: `${url}?${queryParams}`
+				})
+			},
+			handleDetailRecode(item, type, isEdit = false) {
+				//'pages/home' + this.listData.miniHandleRouter
+				///wt/components/feeApplication/taskSubmit
+				let params = JSON.stringify({
+					processInstanceId: item.id,
+					type: type,
+					isEdit: isEdit
 				})
 				let queryParams = `params=${params}`
 				let url = '/pages/home/wt/components/formParser/routerView'
@@ -200,7 +220,6 @@
 				})
 			},
 			handleDetailView(item) {
-				console.log(item)
 				uni.navigateTo({
 					url: `/pages/home/wt/components/detail?processInstanceId=${item.processInstance?.id||item.id}`
 				})
@@ -468,7 +487,17 @@
 			min-height: 150rpx;
 		}
 
-
+		.card-body-1:after {
+			content: '';
+			position: absolute;
+			left: auto;
+			top: auto;
+			bottom: 10rpx;
+			right: auto;
+			height: 1rpx;
+			width: 91%;
+			background-color: #f1f1f1;
+		}
 
 		.card-col-1 {
 			padding: 8rpx 0;

Some files were not shown because too many files changed in this diff