| | |
| | | <template> |
| | | |
| | | <el-dialog title="" append-to-body :visible.sync="infoVisible" top="10vh" width="70%"> |
| | | <el-dialog title="" append-to-body :visible.sync="infoVisible" top="10vh" width="70%" :before-close="handleClose"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <!-- <el-tab-pane label="物业信息" name="first"></el-tab-pane> --> |
| | | <el-tab-pane label="基础信息" name="info1"></el-tab-pane> |
| | |
| | | <div> |
| | | {{index+1}} .{{ item.subjectName }} |
| | | </div> |
| | | <div v-for="(item1, index1) in item.subjectOptionList" :key="index1"> |
| | | <!-- <div v-for="(item1, index1) in item.subjectOptionList" :key="index1"> --> |
| | | <!-- <div> |
| | | {{ item1.optionName }} |
| | | </div> --> |
| | | <el-radio-group v-model="item1.ids" v-if="item.choicesType == 0"> |
| | | <el-radio :label="item1.id">{{item1.optionName}}</el-radio> |
| | | </el-radio-group> |
| | | <!-- <el-radio-group v-model="item.ids" v-if="item.choicesType == 0"> --> |
| | | |
| | | <div v-if="item.choicesType == 0"> |
| | | <div v-for="(item1, index1) in item.subjectOptionList" :key="index1"> |
| | | <el-radio v-model="item1.ids" :label="item1.id">{{item1.optionName}}-----------{{item1.score}}</el-radio> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- </el-radio-group> --> |
| | | |
| | | <div v-if="item.choicesType == 3"> |
| | | <div>{{item1.optionName}}</div> |
| | | <!-- <div>{{item1.optionName}}</div> --> |
| | | <div v-for="(item1, index1) in item.subjectOptionList" :key="index1"> |
| | | <el-input-number v-model="item1.numbers" @change="handleChange" :min="0" :max="25" |
| | | :label="item1.optionName"></el-input-number> |
| | | </div> |
| | | |
| | | <!-- <el-input v-model="item1.numbers" type="number" :placeholder="item1.optionName"></el-input> --> |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- </div> --> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="payInfoVisible = false">取 消</el-button> |
| | | <el-button @click="infoVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="submit">提 交</el-button> |
| | | </div> |
| | | |
| | |
| | | getList, |
| | | remove |
| | | } from "@/api/subjectChoices/subjectChoices"; |
| | | |
| | | import { |
| | | save |
| | | } from "@/api/answerRecord/answerRecord"; |
| | | import { |
| | | add |
| | | } from "@/api/property/propertyCompany" |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | property: {}, |
| | | activeName: 'info1', |
| | | infoVisible: false, |
| | | page: { |
| | |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | }, |
| | | methods: { |
| | | |
| | | handleClose() { |
| | | this.infoVisible = false |
| | | // this.$refs.DisCussFrom && this.$refs.DisCussFrom.resetForm() |
| | | }, |
| | | |
| | | submit() { |
| | | console.log("============>", this.questionBankData) |
| | | save(this.questionBankData).then( |
| | | () => { |
| | | // this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | handleChange(value) { |
| | | console.log(value); |
| | | }, |
| | |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.questionBankData = data.records; |
| | | // this.questionBankLoading = false; |
| | | this.questionBankData.forEach(item => { |
| | | item.propertyId = this.property.id |
| | | }) |
| | | }); |
| | | }, |
| | | |
| | |
| | | let param = { |
| | | subclassName: '基础信息' |
| | | } |
| | | this.property = row |
| | | this.questionBankOnLoad(this.page, param) |
| | | }, |
| | | |
| | | handleClick(tab, event) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | // this.$confirm("确定将选择数据删除?", { |
| | | // confirmButtonText: "确定", |
| | | // cancelButtonText: "取消", |
| | | // type: "warning", |
| | | // }) |
| | | // .then(() => { |
| | | // return remove(row.id) |
| | | // }) |
| | | // .then(() => { |
| | | // this.onLoad(this.page) |
| | | // this.$message({ |
| | | // type: "success", |
| | | // message: "操作成功!", |
| | | // }) |
| | | // }) |
| | | // console.log(tab, event); |
| | | console.log('============>', JSON.stringify(this.questionBankData)) |
| | | let param = { |