|
@@ -10,9 +10,9 @@
|
|
|
<text class="dx">({{ item.input }})</text>
|
|
|
</view>
|
|
|
<view class="mts">
|
|
|
- <input v-if="item.input == '填空'" v-model="item.s_value" placeholder="请输入" />
|
|
|
- <input v-if="item.input == '数字'" type="number" v-model="item.s_value" placeholder="请输入" :disabled="look ? true : false" />
|
|
|
- <textarea v-if="item.input == '多行文本'" v-model="item.s_value" placeholder="请输入" />
|
|
|
+ <input v-if="item.input == '填空'" v-model="item.s_value" placeholder="请输入" :disabled="item.state != 0" />
|
|
|
+ <input v-if="item.input == '数字'" type="number" v-model="item.s_value" placeholder="请输入" :disabled="item.state != 0" />
|
|
|
+ <textarea v-if="item.input == '多行文本'" v-model="item.s_value" placeholder="请输入" :disabled="item.state != 0" />
|
|
|
<view class="ops" v-if="item.input == '单选' || item.input == '多选' || item.input == '判断'">
|
|
|
<view v-for="(op, i) in item.selects" :key="op.name">
|
|
|
<view class="op" :class="{ active: op.check }" @click="check(item, op)">{{ op.name }}</view>
|
|
@@ -21,7 +21,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<u-divider text="结束"></u-divider>
|
|
|
- <button class="btn">立即提交</button>
|
|
|
+ <button class="btn" @click="add()" v-if="item.state == 0">立即提交</button>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -45,7 +45,7 @@ export default {
|
|
|
methods: {
|
|
|
//单选或多选
|
|
|
check(item, op) {
|
|
|
- if (this.look) {
|
|
|
+ if (this.item.state != 0) {
|
|
|
return;
|
|
|
}
|
|
|
if (item.input == '单选' || item.input == '判断') {
|
|
@@ -54,6 +54,7 @@ export default {
|
|
|
} else {
|
|
|
op.check = !op.check;
|
|
|
}
|
|
|
+ item.s_value = op.check; //选中项
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
add() {
|
|
@@ -69,6 +70,24 @@ export default {
|
|
|
uni.showModal({ content: this.verify.error, showCancel: false });
|
|
|
return;
|
|
|
}
|
|
|
+ let data = JSON.parse(JSON.stringify(this.item));
|
|
|
+ data.op = JSON.stringify(data.op);
|
|
|
+ this.http.request({
|
|
|
+ url: '/app/follow/push',
|
|
|
+ data: data,
|
|
|
+ method: 'POST',
|
|
|
+ success: (res) => {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '感谢您的回访',
|
|
|
+ showCancel: false,
|
|
|
+ success: (res) => {
|
|
|
+ uni.$emit('follow');
|
|
|
+ uni.navigateBack();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -81,6 +100,7 @@ page {
|
|
|
.title {
|
|
|
text-align: center;
|
|
|
font-weight: bold;
|
|
|
+ padding-bottom: 10px;
|
|
|
}
|
|
|
.item {
|
|
|
.mtt {
|