| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <div>
- <!-- 逐题提交 -->
- <Progressive
- @close="close"
- v-if="commitType == 1"
- :form='form'
- />
- <!-- 常规 -->
- <Continuous
- @close='close'
- v-else
- :form='form'
- />
- </div>
- </template>
- <script>
- import Vue from "vue";
- import Continuous from "./component/Continuous";
- import Progressive from "./component/Progressive";
- import {
- Button,
- Popup,
- Cell,
- CellGroup,
- Field,
- Image,
- Loading,
- RadioGroup,
- Radio,
- CheckboxGroup,
- Checkbox,
- Dialog,
- ImagePreview,
- Slider,
- Form,
- GoodsActionButton,
- GoodsAction,
- Tag,
- Uploader
- } from "vant";
- Vue.use(Button)
- .use(Popup)
- .use(Slider)
- .use(Dialog)
- .use(Form)
- .use(Cell)
- .use(CellGroup)
- .use(Field)
- .use(Image)
- .use(Loading)
- .use(RadioGroup)
- .use(Radio)
- .use(CheckboxGroup)
- .use(Checkbox)
- .use(ImagePreview).use(GoodsActionButton).use(GoodsAction).use(Tag).use(Uploader);
- import 'vant/lib/index.css'
- export default {
- props:['form'],
- components: {
- Continuous,
- Progressive,
- },
- data() {
- return {
- loginFlag: true,
- commitType: 0, // 1是逐题提交 0.一起提交
- preView: false,
- };
- },
- mounted() {
- this.commitType = this.form.commitType;
- // window.addEventListener("message", this.handleMessage);
- // this.$emit("load");
- },
- methods: {
- // handleMessage(e) {
- // var data = e.data;
- // if (data.cmd == "getFormJson") {
- // this.loginFlag = data.data.loginFlag;
- // this.commitType = data.data.commitType;
- // this.preView = true;
- // this.questionList = data.data.questionnaireQuestionList;
- // console.log(this.questionList, data.data);
- // }
- // },
- close(){
- this.$emit('close')
- }
- },
- };
- </script>
- <style lang="scss" scoped>
- /deep/.icon-weigouxuan {
- border: 1px solid #ccc;
- border-radius: 50%;
- }
- </style>
|