style:弹框修改
Showing
8 changed files
with
35 additions
and
50 deletions
| ... | @@ -122,7 +122,7 @@ export default { | ... | @@ -122,7 +122,7 @@ export default { |
| 122 | }, | 122 | }, |
| 123 | methods: { | 123 | methods: { |
| 124 | closeDialog () { | 124 | closeDialog () { |
| 125 | this.$emit("input", false); | 125 | this.$popupCacel() |
| 126 | this.form = { | 126 | this.form = { |
| 127 | djSqcxDO: { ycqrgx: "1", cxyt: "" }, | 127 | djSqcxDO: { ycqrgx: "1", cxyt: "" }, |
| 128 | sqrList: [], | 128 | sqrList: [], | ... | ... |
| ... | @@ -258,10 +258,8 @@ export default { | ... | @@ -258,10 +258,8 @@ export default { |
| 258 | message: '修改成功', | 258 | message: '修改成功', |
| 259 | type: 'success' | 259 | type: 'success' |
| 260 | }) | 260 | }) |
| 261 | this.$emit('input', false) | 261 | this.$popupCacel() |
| 262 | } | 262 | } |
| 263 | }).catch((error) => { | ||
| 264 | this.$endLoading(); | ||
| 265 | }) | 263 | }) |
| 266 | }, | 264 | }, |
| 267 | // 增加下级 | 265 | // 增加下级 | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <dialogBox title="其他及附记模板" @submitForm="submitForm" width="60%" class="loadingtext" @closeDialog="closeDialog" | 2 | <div> |
| 3 | v-model="myValue"> | ||
| 4 | <div class="qtjfjmb-edit-title"> | 3 | <div class="qtjfjmb-edit-title"> |
| 5 | <b>权利信息</b> | 4 | <b>权利信息</b> |
| 6 | </div> | 5 | </div> |
| ... | @@ -107,39 +106,37 @@ | ... | @@ -107,39 +106,37 @@ |
| 107 | </el-form-item> | 106 | </el-form-item> |
| 108 | </el-col> | 107 | </el-col> |
| 109 | </el-row> | 108 | </el-row> |
| 109 | |||
| 110 | <el-form-item class="text-center"> | ||
| 111 | <el-button @click="$popupCacel">取消</el-button> | ||
| 112 | <el-button type="primary" @click="submitForm" plain>确定</el-button> | ||
| 113 | </el-form-item> | ||
| 114 | |||
| 110 | </el-form> | 115 | </el-form> |
| 111 | </dialogBox> | 116 | </div> |
| 112 | </template> | 117 | </template> |
| 113 | 118 | ||
| 114 | <script> | 119 | <script> |
| 115 | import { updateSysSqywmbsz, getSysSqywmbszDetailById } from '@/api/system' | 120 | import { updateSysSqywmbsz, getSysSqywmbszDetailById } from '@/api/system' |
| 116 | export default { | 121 | export default { |
| 117 | props: { | 122 | props: { |
| 118 | value: { type: Boolean, default: false }, | 123 | formData: { |
| 119 | bsmMb: { | 124 | type: Object, |
| 120 | type: String, | 125 | default: () => { } |
| 121 | default: '' | ||
| 122 | } | 126 | } |
| 123 | }, | 127 | }, |
| 124 | watch: { | 128 | mounted () { |
| 125 | value (val) { | 129 | if (this.formData.bsmMb) { |
| 126 | this.myValue = val | 130 | this.$startLoading() |
| 127 | }, | 131 | getSysSqywmbszDetailById(this.formData.bsmMb).then(res => { |
| 128 | bsmMb: { | 132 | this.$endLoading() |
| 129 | handler (newValue) { | 133 | let { result } = res |
| 130 | this.$startLoading() | 134 | this.ruleForm = result ? result : {} |
| 131 | getSysSqywmbszDetailById(newValue).then(res => { | 135 | }) |
| 132 | this.$endLoading() | ||
| 133 | let { result } = res | ||
| 134 | this.ruleForm = result ? result : {} | ||
| 135 | }) | ||
| 136 | }, | ||
| 137 | immediate: true | ||
| 138 | } | 136 | } |
| 139 | }, | 137 | }, |
| 140 | data () { | 138 | data () { |
| 141 | return { | 139 | return { |
| 142 | myValue: this.value, | ||
| 143 | n: 0, | 140 | n: 0, |
| 144 | ruleForm: { | 141 | ruleForm: { |
| 145 | qllx: '', | 142 | qllx: '', |
| ... | @@ -210,17 +207,13 @@ export default { | ... | @@ -210,17 +207,13 @@ export default { |
| 210 | let that = this | 207 | let that = this |
| 211 | updateSysSqywmbsz(this.ruleForm).then(res => { | 208 | updateSysSqywmbsz(this.ruleForm).then(res => { |
| 212 | if (res.code === 200) { | 209 | if (res.code === 200) { |
| 210 | this.$popupCacel() | ||
| 213 | that.$message({ | 211 | that.$message({ |
| 214 | message: '修改成功', | 212 | message: '修改成功', |
| 215 | type: 'success' | 213 | type: 'success' |
| 216 | }) | 214 | }) |
| 217 | that.$emit('input', false) | ||
| 218 | that.$parent.queryClick(); | ||
| 219 | } | 215 | } |
| 220 | }) | 216 | }) |
| 221 | }, | ||
| 222 | closeDialog () { | ||
| 223 | this.$emit('input', false) | ||
| 224 | } | 217 | } |
| 225 | } | 218 | } |
| 226 | } | 219 | } |
| ... | @@ -228,6 +221,7 @@ export default { | ... | @@ -228,6 +221,7 @@ export default { |
| 228 | <style scoped lang="scss"> | 221 | <style scoped lang="scss"> |
| 229 | @import "~@/styles/mixin.scss"; | 222 | @import "~@/styles/mixin.scss"; |
| 230 | @import "~@/styles/dialogBoxheader.scss"; | 223 | @import "~@/styles/dialogBoxheader.scss"; |
| 224 | |||
| 231 | .qtjfjmb-edit-title { | 225 | .qtjfjmb-edit-title { |
| 232 | padding-bottom: 10px; | 226 | padding-bottom: 10px; |
| 233 | border-bottom: 1px solid $borderColor; | 227 | border-bottom: 1px solid $borderColor; | ... | ... |
| ... | @@ -6,8 +6,7 @@ | ... | @@ -6,8 +6,7 @@ |
| 6 | <el-row :gutter="20"> | 6 | <el-row :gutter="20"> |
| 7 | <el-col :span="6"> | 7 | <el-col :span="6"> |
| 8 | <el-form-item label="权利类型"> | 8 | <el-form-item label="权利类型"> |
| 9 | <el-select v-model="queryForm.qllx" class="width100" filterable clearable | 9 | <el-select v-model="queryForm.qllx" class="width100" filterable clearable placeholder="请选择权利类型"> |
| 10 | placeholder="请选择权利类型"> | ||
| 11 | <el-option v-for="item in dictData['A8']" :key="item.dcode" :label="item.dname" :value="item.dcode"> | 10 | <el-option v-for="item in dictData['A8']" :key="item.dcode" :label="item.dname" :value="item.dcode"> |
| 12 | </el-option> | 11 | </el-option> |
| 13 | </el-select> | 12 | </el-select> |
| ... | @@ -29,7 +28,6 @@ | ... | @@ -29,7 +28,6 @@ |
| 29 | :column="tableData.columns" :data="tableData.data"> | 28 | :column="tableData.columns" :data="tableData.data"> |
| 30 | </lb-table> | 29 | </lb-table> |
| 31 | </div> | 30 | </div> |
| 32 | <editDialog v-model="isDialog" :bsmMb="bsmMb" /> | ||
| 33 | </div> | 31 | </div> |
| 34 | </template> | 32 | </template> |
| 35 | <script> | 33 | <script> |
| ... | @@ -37,12 +35,8 @@ import { mapGetters } from 'vuex' | ... | @@ -37,12 +35,8 @@ import { mapGetters } from 'vuex' |
| 37 | import { sysSqywmbszSearch } from '@/api/system' | 35 | import { sysSqywmbszSearch } from '@/api/system' |
| 38 | import table from "@/utils/mixin/table" | 36 | import table from "@/utils/mixin/table" |
| 39 | import { datas, sendThis } from "./qtjfjmb" | 37 | import { datas, sendThis } from "./qtjfjmb" |
| 40 | import editDialog from "./components/editDialog.vue" | ||
| 41 | export default { | 38 | export default { |
| 42 | name: "djbcx", | 39 | name: "qtjfjmb", |
| 43 | components: { | ||
| 44 | editDialog | ||
| 45 | }, | ||
| 46 | mixins: [table], | 40 | mixins: [table], |
| 47 | mounted () { | 41 | mounted () { |
| 48 | sendThis(this); | 42 | sendThis(this); |
| ... | @@ -53,7 +47,6 @@ export default { | ... | @@ -53,7 +47,6 @@ export default { |
| 53 | }, | 47 | }, |
| 54 | data () { | 48 | data () { |
| 55 | return { | 49 | return { |
| 56 | isDialog: false, | ||
| 57 | queryForm: { | 50 | queryForm: { |
| 58 | qllx: "" | 51 | qllx: "" |
| 59 | }, | 52 | }, |
| ... | @@ -77,8 +70,7 @@ export default { | ... | @@ -77,8 +70,7 @@ export default { |
| 77 | }) | 70 | }) |
| 78 | }, | 71 | }, |
| 79 | editClick (row) { | 72 | editClick (row) { |
| 80 | this.bsmMb = row.bsmMb | 73 | this.$popupDialog("其他及附记模板", "system/qtjfjmb/components/editDialog", row, '60%') |
| 81 | this.isDialog = true | ||
| 82 | } | 74 | } |
| 83 | } | 75 | } |
| 84 | } | 76 | } | ... | ... |
| ... | @@ -122,7 +122,7 @@ | ... | @@ -122,7 +122,7 @@ |
| 122 | </el-collapse> | 122 | </el-collapse> |
| 123 | </div> | 123 | </div> |
| 124 | <div slot="footer" class="dialog_footer text-center"> | 124 | <div slot="footer" class="dialog_footer text-center"> |
| 125 | <el-button @click="cancelDialog">取 消</el-button> | 125 | <el-button @click="$popupCacel()">取 消</el-button> |
| 126 | <el-button type="primary" @click="submit" plain>提 交</el-button> | 126 | <el-button type="primary" @click="submit" plain>提 交</el-button> |
| 127 | </div> | 127 | </div> |
| 128 | </div> | 128 | </div> |
| ... | @@ -199,14 +199,10 @@ export default { | ... | @@ -199,14 +199,10 @@ export default { |
| 199 | message: "修改成功", | 199 | message: "修改成功", |
| 200 | type: "success", | 200 | type: "success", |
| 201 | }); | 201 | }); |
| 202 | // that.$emit('input', false) | 202 | this.$popupCacel() |
| 203 | } | 203 | } |
| 204 | }); | 204 | }); |
| 205 | }, | 205 | }, |
| 206 | //修改父组件传过来的值 | ||
| 207 | cancelDialog () { | ||
| 208 | this.$emit("update:dialogVisible", false); | ||
| 209 | }, | ||
| 210 | // 上移下移 | 206 | // 上移下移 |
| 211 | moveUpward (index, row, type) { | 207 | moveUpward (index, row, type) { |
| 212 | if (type == "clxx") { | 208 | if (type == "clxx") { | ... | ... |
| ... | @@ -230,7 +230,7 @@ export default { | ... | @@ -230,7 +230,7 @@ export default { |
| 230 | ] | 230 | ] |
| 231 | }, | 231 | }, |
| 232 | closeDialog () { | 232 | closeDialog () { |
| 233 | this.$emit("input", false); | 233 | this.$popupCacel() |
| 234 | this.$refs['ruleForm'].resetFields(); | 234 | this.$refs['ruleForm'].resetFields(); |
| 235 | this.resetTableFields(); | 235 | this.resetTableFields(); |
| 236 | } | 236 | } | ... | ... |
| ... | @@ -238,7 +238,7 @@ export default { | ... | @@ -238,7 +238,7 @@ export default { |
| 238 | ] | 238 | ] |
| 239 | }, | 239 | }, |
| 240 | closeDialog () { | 240 | closeDialog () { |
| 241 | this.$emit("input", false); | 241 | this.$popupCacel() |
| 242 | this.$refs['ruleForm'].resetFields(); | 242 | this.$refs['ruleForm'].resetFields(); |
| 243 | this.resetTableFields(); | 243 | this.resetTableFields(); |
| 244 | } | 244 | } | ... | ... |
-
Please register or sign in to post a comment