|
@@ -13,7 +13,8 @@
|
|
<div v-for="(item,index) in tItem['opinions']" :key="tIndex-index" :class="{'flowOpinionItem': true, 'disabled': !item['isEditor']}">
|
|
<div v-for="(item,index) in tItem['opinions']" :key="tIndex-index" :class="{'flowOpinionItem': true, 'disabled': !item['isEditor']}">
|
|
<h4>{{ tItem['opinionName'] }}</h4>
|
|
<h4>{{ tItem['opinionName'] }}</h4>
|
|
<div class="content">
|
|
<div class="content">
|
|
- <van-field
|
|
|
|
|
|
+ <template v-if="item['isEditor']">
|
|
|
|
+ <van-field
|
|
v-model="currentOpinion.opinionContent"
|
|
v-model="currentOpinion.opinionContent"
|
|
rows="3"
|
|
rows="3"
|
|
autosize
|
|
autosize
|
|
@@ -23,6 +24,19 @@
|
|
maxlength="50"
|
|
maxlength="50"
|
|
placeholder="请输入留言"
|
|
placeholder="请输入留言"
|
|
/>
|
|
/>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <van-field
|
|
|
|
+ v-model="item.opinionContent"
|
|
|
|
+ rows="3"
|
|
|
|
+ autosize
|
|
|
|
+ label=""
|
|
|
|
+ type="textarea"
|
|
|
|
+ :disabled="!item['isEditor']"
|
|
|
|
+ maxlength="50"
|
|
|
|
+ placeholder="请输入留言"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<div class="footer">
|
|
<p>
|
|
<p>
|
|
@@ -115,10 +129,16 @@ getTemplateOpinionListByFlowInstanceId(flowInstanceId).then((tResult) => {
|
|
getOpinionListByFlowInstanceId(flowInstanceId).then((oResult) => {
|
|
getOpinionListByFlowInstanceId(flowInstanceId).then((oResult) => {
|
|
const oList = oResult.data ?? []
|
|
const oList = oResult.data ?? []
|
|
if (oList.length > 0) {
|
|
if (oList.length > 0) {
|
|
- tList.forEach((tItem: any) => {
|
|
|
|
|
|
+ for (let i = 0; i < tList.length; i++) {
|
|
|
|
+ const tItem = tList[i];
|
|
|
|
+ if (tItem['iDisplayOpinion'] === 0) {
|
|
|
|
+ tList.splice(i, 1)
|
|
|
|
+ i--;
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
tItem['opinions'] = []
|
|
tItem['opinions'] = []
|
|
- for (let i = 0; i < oList.length; i++) {
|
|
|
|
- const oItem = oList[i]
|
|
|
|
|
|
+ for (let j = 0; j < oList.length; j++) {
|
|
|
|
+ const oItem = oList[j]
|
|
if (tItem['id'] === oItem['flowOpinionId']) {
|
|
if (tItem['id'] === oItem['flowOpinionId']) {
|
|
if (oItem['activityInstanceId'] === activityInstanceId) {
|
|
if (oItem['activityInstanceId'] === activityInstanceId) {
|
|
oItem['isEditor'] = true;
|
|
oItem['isEditor'] = true;
|
|
@@ -128,13 +148,19 @@ getTemplateOpinionListByFlowInstanceId(flowInstanceId).then((tResult) => {
|
|
if (oItem['sign']) {
|
|
if (oItem['sign']) {
|
|
currentOpinion.value.sign = oItem['sign']
|
|
currentOpinion.value.sign = oItem['sign']
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ if (!oItem['opinionContent'] && tItem['iHideNonFilledComment'] === 1) {
|
|
|
|
+ tList.splice(i, 1)
|
|
|
|
+ i--;
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
tItem['opinions'].push(oItem);
|
|
tItem['opinions'].push(oItem);
|
|
- oList.splice(i, 1)
|
|
|
|
- i--;
|
|
|
|
|
|
+ oList.splice(j, 1)
|
|
|
|
+ j--;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
templateOpinions.value = tList
|
|
templateOpinions.value = tList
|
|
})
|
|
})
|
|
@@ -165,6 +191,17 @@ const submitHandle = () => {
|
|
margin-bottom: 15px;
|
|
margin-bottom: 15px;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
padding: 10px 0px;
|
|
padding: 10px 0px;
|
|
|
|
+ &.disabled {
|
|
|
|
+ >h4 {
|
|
|
|
+ color: #999;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ >.footer {
|
|
|
|
+ > p {
|
|
|
|
+ color: #999;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
>h4 {
|
|
>h4 {
|
|
font-size: 17px;
|
|
font-size: 17px;
|
|
margin: 0px;
|
|
margin: 0px;
|
|
@@ -184,8 +221,8 @@ const submitHandle = () => {
|
|
margin: 0px;
|
|
margin: 0px;
|
|
flex: 1;
|
|
flex: 1;
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
|
+ color: #333;
|
|
>span {
|
|
>span {
|
|
- color: #333;
|
|
|
|
&:first-child {
|
|
&:first-child {
|
|
display: inline-block;
|
|
display: inline-block;
|
|
margin-right: 5px;
|
|
margin-right: 5px;
|