|
|
@@ -9,18 +9,33 @@
|
|
|
<el-row :gutter="16">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="物务类型名称">
|
|
|
- <el-input v-model="form.name" />
|
|
|
+ <el-input v-model="form.name"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="排序">
|
|
|
+ <el-input-number v-model="form.sortNumber" :min="0"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="排序">
|
|
|
- <el-input-number v-model="form.sortNumber" :min="0" />
|
|
|
+ <el-form-item label="ICON图标">
|
|
|
+ <el-upload
|
|
|
+ :show-file-list="false"
|
|
|
+ action="#"
|
|
|
+ list-type="picture-card"
|
|
|
+ name="fileData"
|
|
|
+ :http-request="uploaderHandle"
|
|
|
+ :on-success="uploadSuccessIconImage"
|
|
|
+ :auto-upload="true"
|
|
|
+ >
|
|
|
+ <el-image v-if="iconImage" :src="iconImage" class="image"/>
|
|
|
+ <i v-else class="el-icon-plus avatar-uploader-icon"/>
|
|
|
+ </el-upload>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<el-form-item label="备注说明">
|
|
|
- <el-input v-model="form.remark" type="textarea" rows="5" />
|
|
|
+ <el-input v-model="form.remark" type="textarea" rows="5"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@@ -30,9 +45,17 @@
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
+<style type="text/css">
|
|
|
+.image {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ border-radius: 6px;
|
|
|
+}
|
|
|
+</style>
|
|
|
<script>
|
|
|
|
|
|
import { save, updateById } from '@/api/place/category'
|
|
|
+import { uploaderHandle } from '@/api/statistics/upload'
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
@@ -40,9 +63,7 @@ export default {
|
|
|
visible: false,
|
|
|
isLoading: false,
|
|
|
form: {},
|
|
|
- businessLicense: null,
|
|
|
- legalPersonIdCardA: null,
|
|
|
- legalPersonIdCardB: null,
|
|
|
+ iconImage: null,
|
|
|
lng: null,
|
|
|
lat: null
|
|
|
}
|
|
|
@@ -50,6 +71,10 @@ export default {
|
|
|
mounted() {
|
|
|
},
|
|
|
methods: {
|
|
|
+ uploaderHandle,
|
|
|
+ uploadSuccessIconImage(res) {
|
|
|
+ this.iconImage = res.url
|
|
|
+ },
|
|
|
open(data) {
|
|
|
this.visible = true
|
|
|
this.isLoading = false
|
|
|
@@ -58,9 +83,7 @@ export default {
|
|
|
if (data && data.id) {
|
|
|
this.lat = data.lat
|
|
|
this.lng = data.lng
|
|
|
- this.businessLicense = data.businessLicense
|
|
|
- this.legalPersonIdCardB = data.legalPersonIdCardB
|
|
|
- this.legalPersonIdCardA = data.legalPersonIdCardA
|
|
|
+ this.iconImage = data.iconImage
|
|
|
}
|
|
|
this.form = Object.assign({}, data)
|
|
|
},
|
|
|
@@ -75,9 +98,7 @@ export default {
|
|
|
...this.form,
|
|
|
'lng': this.lng,
|
|
|
'lat': this.lat,
|
|
|
- 'businessLicense': this.businessLicense,
|
|
|
- 'legalPersonIdCardB': this.legalPersonIdCardB,
|
|
|
- 'legalPersonIdCardA': this.legalPersonIdCardA
|
|
|
+ 'iconImage': this.iconImage
|
|
|
}
|
|
|
console.log(param)
|
|
|
if (this.form.id) {
|