修改:房屋多幢明细可进行编辑
Showing
2 changed files
with
99 additions
and
26 deletions
| ... | @@ -28,44 +28,107 @@ | ... | @@ -28,44 +28,107 @@ |
| 28 | </el-table-column> | 28 | </el-table-column> |
| 29 | <el-table-column prop="xmmc" label="项目名称" min-width="100"> | 29 | <el-table-column prop="xmmc" label="项目名称" min-width="100"> |
| 30 | <template slot-scope="scope"> | 30 | <template slot-scope="scope"> |
| 31 | <div style="text-align: center">{{ scope.row.xmmc }}</div> | 31 | <el-input |
| 32 | class="item" | ||
| 33 | :disabled="!ableOperation" | ||
| 34 | v-model="scope.row.xmmc" | ||
| 35 | placeholder="请输入内容" | ||
| 36 | @input="updaterow(scope.row)" | ||
| 37 | > | ||
| 38 | </el-input> | ||
| 32 | </template> | 39 | </template> |
| 33 | </el-table-column> | 40 | </el-table-column> |
| 34 | <el-table-column prop="zcs" label="总层数" min-width="100"> | 41 | |
| 42 | <el-table-column prop="ghyt" label="房屋用途" min-width="100"> | ||
| 35 | <template slot-scope="scope"> | 43 | <template slot-scope="scope"> |
| 36 | <div style="text-align: center">{{ scope.row.zcs }}</div> | 44 | <treeselect |
| 45 | v-model="scope.row.ghyt" | ||
| 46 | :disabled="!ableOperation" | ||
| 47 | noOptionsText="暂无数据" | ||
| 48 | placeholder="" | ||
| 49 | :show-count="true" | ||
| 50 | :options="dictData['A17']" | ||
| 51 | :normalizer="normalizer" | ||
| 52 | :appendToBody="true" | ||
| 53 | z-index="9999" | ||
| 54 | @input="updaterow(scope.row)" | ||
| 55 | /> | ||
| 37 | </template> | 56 | </template> |
| 38 | </el-table-column> | 57 | </el-table-column> |
| 39 | <el-table-column prop="ytmc" label="房屋用途" min-width="100"> | 58 | <el-table-column prop="fwjg" label="房屋结构" min-width="100"> |
| 40 | <template slot-scope="scope"> | 59 | <template slot-scope="scope"> |
| 41 | <div style="text-align: center">{{ scope.row.ytmc }}</div> | 60 | <treeselect |
| 61 | v-model="scope.row.fwjg" | ||
| 62 | :disabled="!ableOperation" | ||
| 63 | noOptionsText="暂无数据" | ||
| 64 | placeholder="" | ||
| 65 | :show-count="true" | ||
| 66 | :options="dictData['A46']" | ||
| 67 | :normalizer="normalizer" | ||
| 68 | :appendToBody="true" | ||
| 69 | z-index="9999" | ||
| 70 | @input="updaterow(scope.row)" | ||
| 71 | /> | ||
| 42 | </template> | 72 | </template> |
| 43 | </el-table-column> | 73 | </el-table-column> |
| 44 | <el-table-column prop="fwjgmc" label="房屋结构" min-width="100"> | 74 | <el-table-column prop="jzmj" label="建筑面积" min-width="100"> |
| 45 | <template slot-scope="scope"> | 75 | <template slot-scope="scope"> |
| 46 | <div style="text-align: center">{{ scope.row.fwjgmc }}</div> | 76 | <el-input |
| 77 | class="item" | ||
| 78 | :disabled="!ableOperation" | ||
| 79 | oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null" | ||
| 80 | v-model="scope.row.jzmj" | ||
| 81 | placeholder="请输入内容" | ||
| 82 | @input="updaterow(scope.row)" | ||
| 83 | > | ||
| 84 | </el-input> | ||
| 47 | </template> | 85 | </template> |
| 48 | </el-table-column> | 86 | </el-table-column> |
| 49 | <el-table-column prop="jzmj" label="建筑面积" min-width="100"> | 87 | <el-table-column prop="jgsj" label="竣工时间" min-width="100"> |
| 50 | <template slot-scope="scope"> | 88 | <template slot-scope="scope"> |
| 51 | <div style="text-align: center">{{ scope.row.jzmj }}</div> | 89 | <el-date-picker |
| 90 | v-model="scope.row.jgsj" | ||
| 91 | type="date" | ||
| 92 | :disabled="!ableOperation" | ||
| 93 | placeholder="选择日期" | ||
| 94 | value-format="yyyy-MM-dd HH:mm:ss" | ||
| 95 | format="yyyy-MM-dd" | ||
| 96 | @input="updaterow(scope.row)" | ||
| 97 | > | ||
| 98 | </el-date-picker> | ||
| 52 | </template> | 99 | </template> |
| 53 | </el-table-column> | 100 | </el-table-column> |
| 54 | <el-table-column prop="jgsj" label="竣工时间" min-width="100"> | 101 | <el-table-column prop="zcs" label="总层数" min-width="100"> |
| 55 | <template slot-scope="scope"> | 102 | <template slot-scope="scope"> |
| 56 | <div style="text-align: center">{{ scope.row.jgsj }}</div> | 103 | <el-input |
| 104 | class="item" | ||
| 105 | :disabled="!ableOperation" | ||
| 106 | oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null" | ||
| 107 | v-model="scope.row.zcs" | ||
| 108 | placeholder="请输入内容" | ||
| 109 | @input="updaterow(scope.row)" | ||
| 110 | > | ||
| 111 | </el-input> | ||
| 57 | </template> | 112 | </template> |
| 58 | </el-table-column> | 113 | </el-table-column> |
| 59 | <el-table-column prop="zts" label="总套数" min-width="100"> | 114 | <el-table-column prop="zts" label="总套数" min-width="100"> |
| 60 | <template slot-scope="scope"> | 115 | <template slot-scope="scope"> |
| 61 | <div style="text-align: center">{{ scope.row.zts }}</div> | 116 | <el-input |
| 117 | class="item" | ||
| 118 | :disabled="!ableOperation" | ||
| 119 | oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null" | ||
| 120 | v-model="scope.row.zts" | ||
| 121 | placeholder="请输入内容" | ||
| 122 | @input="updaterow(scope.row)" | ||
| 123 | > | ||
| 124 | </el-input> | ||
| 62 | </template> | 125 | </template> |
| 63 | </el-table-column> | 126 | </el-table-column> |
| 64 | </el-table> | 127 | </el-table> |
| 65 | </div> | 128 | </div> |
| 66 | </template> | 129 | </template> |
| 67 | <script> | 130 | <script> |
| 68 | import { mapGetters } from "vuex"; | 131 | import {mapGetters} from "vuex"; |
| 69 | 132 | ||
| 70 | export default { | 133 | export default { |
| 71 | computed: { | 134 | computed: { |
| ... | @@ -82,15 +145,27 @@ export default { | ... | @@ -82,15 +145,27 @@ export default { |
| 82 | type: Boolean, | 145 | type: Boolean, |
| 83 | default: false, | 146 | default: false, |
| 84 | }, | 147 | }, |
| 148 | |||
| 85 | }, | 149 | }, |
| 86 | data() { | 150 | data() { |
| 87 | return { | 151 | return { |
| 88 | // 键名转换,方法默认是label和children进行树状渲染 | 152 | // 键名转换,方法默认是label和children进行树状渲染 |
| 89 | key: 0, | 153 | key: 0, |
| 90 | tableDataList: [], | 154 | tableDataList: [], |
| 155 | normalizer(node) { | ||
| 156 | if (node.children == null || node.children == "null") { | ||
| 157 | delete node.children; | ||
| 158 | } | ||
| 159 | return { | ||
| 160 | id: node.dcode, | ||
| 161 | label: node.dname, | ||
| 162 | children: node.children, | ||
| 163 | }; | ||
| 164 | }, | ||
| 91 | }; | 165 | }; |
| 92 | }, | 166 | }, |
| 93 | mounted() {}, | 167 | mounted() { |
| 168 | }, | ||
| 94 | watch: { | 169 | watch: { |
| 95 | tableData: { | 170 | tableData: { |
| 96 | handler: function (val, oldVal) { | 171 | handler: function (val, oldVal) { |
| ... | @@ -122,20 +197,14 @@ export default { | ... | @@ -122,20 +197,14 @@ export default { |
| 122 | renderHeader() { | 197 | renderHeader() { |
| 123 | return ( | 198 | return ( |
| 124 | <div> | 199 | <div> |
| 125 | {" "} | 200 | {"序号"} |
| 126 | {!this.ableOperation ? ( | ||
| 127 | "序号" | ||
| 128 | ) : ( | ||
| 129 | <i | ||
| 130 | class="el-icon-plus pointer" | ||
| 131 | onClick={() => { | ||
| 132 | this.addClick(); | ||
| 133 | }} | ||
| 134 | ></i> | ||
| 135 | )} | ||
| 136 | </div> | 201 | </div> |
| 137 | ); | 202 | ); |
| 138 | }, | 203 | }, |
| 204 | updaterow(a) { | ||
| 205 | console.log("updaterow:"+JSON.stringify(a)); | ||
| 206 | this.$emit("updateFdcwxmList", this.tableDataList); | ||
| 207 | } | ||
| 139 | }, | 208 | }, |
| 140 | }; | 209 | }; |
| 141 | </script> | 210 | </script> | ... | ... |
| ... | @@ -141,7 +141,7 @@ | ... | @@ -141,7 +141,7 @@ |
| 141 | <fdcqxmTable | 141 | <fdcqxmTable |
| 142 | :ableOperation="viewEdit" | 142 | :ableOperation="viewEdit" |
| 143 | :tableData="ruleForm.fdcqxm" | 143 | :tableData="ruleForm.fdcqxm" |
| 144 | @upDateTdytxxList="upDateTdytxxList" /> | 144 | @updateFdcwxmList="updateFdcwxmList" /> |
| 145 | <div class="slxx_title title-block"> | 145 | <div class="slxx_title title-block"> |
| 146 | 土地用途 | 146 | 土地用途 |
| 147 | <div class="triangle"></div> | 147 | <div class="triangle"></div> |
| ... | @@ -299,6 +299,10 @@ | ... | @@ -299,6 +299,10 @@ |
| 299 | }; | 299 | }; |
| 300 | }, | 300 | }, |
| 301 | methods: { | 301 | methods: { |
| 302 | updateFdcwxmList (val) { | ||
| 303 | this.ruleForm.fdcqxm && (this.ruleForm.fdcqxm = _.cloneDeep(val)); | ||
| 304 | this.key++; | ||
| 305 | }, | ||
| 302 | /** | 306 | /** |
| 303 | * @description: 更新土地用途信息 | 307 | * @description: 更新土地用途信息 |
| 304 | * @param {*} val | 308 | * @param {*} val | ... | ... |
-
Please register or sign in to post a comment