jtoms 4 年之前
父節點
當前提交
ed25b6abed

+ 9 - 9
src/api/place/base_info.js

@@ -40,18 +40,18 @@ export function findAllDataType() {
   })
 }
 
-export function findDataTypeExtendColumn(dataTypeId) {
-  return request({
-    url: '/bz/data/info/findDataTypeExtendColumn',
-    method: 'post',
-    params: { dataTypeId }
-  })
-}
+// export function findDataTypeExtendColumn(categoryId) {
+//   return request({
+//     url: '/bz/data/info/findDataTypeExtendColumn',
+//     method: 'post',
+//     params: { categoryId }
+//   })
+// }
 
-export function findDataBaseInfoExtends(baseInfoId, dataTypeId) {
+export function findDataBaseInfoExtends(baseInfoId, categoryId) {
   return request({
     url: '/bz/data/info/findDataBaseInfoExtends',
     method: 'post',
-    params: { baseInfoId, dataTypeId }
+    params: { baseInfoId, categoryId }
   })
 }

+ 3 - 3
src/router/index.js

@@ -89,7 +89,7 @@ export const asyncRoutes = [
     meta: {
       title: '文旅场所管理',
       icon: 'el-icon-receiving',
-      authorities: ['bz.data.type.find']
+      authorities: ['place.category.find', 'place.base.info.find']
     },
     redirect: '/place/baseInfo',
     children: [
@@ -97,13 +97,13 @@ export const asyncRoutes = [
         path: 'baseInfo',
         name: 'PlaceBaseInfo',
         component: () => import('@/views/place/baseInfo'),
-        meta: { title: '文旅场所管理', authorities: ['bz.data.info.find'] }
+        meta: { title: '文旅场所管理', authorities: ['place.category.find'] }
       },
       {
         path: 'category',
         name: 'PlaceCategory',
         component: () => import('@/views/place/category'),
-        meta: { title: '文旅场所分类管理', authorities: ['bz.data.type.find'] }
+        meta: { title: '文旅场所分类管理', authorities: ['place.base.info.find'] }
       }
       // {
       //   path: 'venue',

+ 12 - 5
src/views/place/baseInfo/DialogForm.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog
     v-if="visible"
-    :title="form.id?'编辑场馆':'新建场馆'"
+    :title="form.id?'编辑文旅场所':'新建文旅场所'"
     :visible.sync="visible"
   >
     <el-form v-loading="isLoading" :model="form" label-width="100px" label-position="top">
@@ -10,7 +10,7 @@
           <el-row :gutter="16">
             <el-col :span="12">
               <el-form-item label="场所类型">
-                <el-select v-model="form.dataTypeId" placeholder="请选择场所类型" clearable @change="changeDataType">
+                <el-select v-model="form.categoryId" placeholder="请选择场所类型" clearable @change="changeDataType">
                   <el-option v-for="item in listDataType" :key="item.id" :label="item.name" :value="item.id"/>
                 </el-select>
               </el-form-item>
@@ -106,8 +106,15 @@ export default {
       file.url = res.url
       this.fileList = fileList
     },
-    changeDataType(dataTypeId) {
-      findDataTypeExtendColumn(dataTypeId).then(listExtendColumn => {
+    changeDataType(categoryId) {
+      // findDataTypeExtendColumn(categoryId).then(listExtendColumn => {
+      //   listExtendColumn.forEach(v => {
+      //     v.fieldType = v.fieldType.name
+      //     v.extendColumnId = v.id
+      //   })
+      //   this.listExtendColumn = listExtendColumn
+      // })
+      findDataBaseInfoExtends(null, categoryId).then(listExtendColumn => {
         listExtendColumn.forEach(v => {
           v.fieldType = v.fieldType.name
           v.extendColumnId = v.id
@@ -142,7 +149,7 @@ export default {
 
         this.form = Object.assign({}, data)
 
-        findDataBaseInfoExtends(data.id, data.dataTypeId).then(listExtendColumn => {
+        findDataBaseInfoExtends(data.id, data.categoryId).then(listExtendColumn => {
           listExtendColumn.forEach(v => {
             v.fieldType = v.fieldType.name
             v.extendColumnId = v.id

+ 3 - 3
src/views/place/baseInfo/index.vue

@@ -8,10 +8,10 @@
     <el-row class="action-bar-container" type="flex" justify="end">
       <el-button type="primary" size="small" @click.native="fetchData">查询</el-button>
       <el-button-group>
-        <el-button v-permission="['bz.data.info.add']" size="small" @click.native="$refs.dialogForm.open({})">
+        <el-button v-permission="['place.base.info.add']" size="small" @click.native="$refs.dialogForm.open({})">
           新建
         </el-button>
-        <el-button v-permission="['bz.data.info.delete']" size="small" @click.native="deleteByIds(multipleSelection)">
+        <el-button v-permission="['place.base.info.delete']" size="small" @click.native="deleteByIds(multipleSelection)">
           删除
         </el-button>
       </el-button-group>
@@ -42,7 +42,7 @@
       </el-table-column>
       <el-table-column label="操作" width="70" fixed="right">
         <template slot-scope="scope">
-          <el-button v-permission="['bz.data.info.edit']" type="text" @click.native="$refs.dialogForm.open(scope.row)">编辑</el-button>
+          <el-button v-permission="['place.base.info.edit']" type="text" @click.native="$refs.dialogForm.open(scope.row)">编辑</el-button>
         </template>
       </el-table-column>
     </el-table>

+ 1 - 1
src/views/place/category/DialogForm.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog
     v-if="visible"
-    :title="form.id?'编辑基础数据分类':'新建基础数据分类'"
+    :title="form.id?'编辑文旅场所分类':'新建文旅场所分类'"
     :visible.sync="visible"
     width="600px"
   >

+ 6 - 6
src/views/place/category/ExtendColumnDialogForm.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog
     v-if="visible"
-    :title="form.id?'编辑物务资源目录':'新建物务资源目录'"
+    :title="form.id?'编辑文旅场所扩展字段':'新建文旅场所扩展字段'"
     :visible.sync="visible"
     width="600px"
     append-to-body
@@ -56,27 +56,27 @@ export default {
       visible: false,
       isLoading: false,
       form: {},
-      dataTypeId: null
+      categoryId: null
     }
   },
   mounted() {
   },
   methods: {
-    open(data, dataTypeId) {
+    open(data, categoryId) {
       this.visible = true
       this.isLoading = false
       this.form = {}
-      console.log(data, dataTypeId)
+      console.log(data, categoryId)
       this.form = Object.assign({}, data)
       if (this.form.fieldType) {
         this.form.fieldType = this.form.fieldType.name
       }
-      this.dataTypeId = dataTypeId
+      this.categoryId = categoryId
     },
     handleSubmit() {
       const param = {
         ...this.form,
-        'dataTypeId': this.dataTypeId
+        'categoryId': this.categoryId
       }
       if ((!param.defaultValue || param.defaultValue === '') && (param.fieldType === 'radio' || param.fieldType === 'checkbox' || param.fieldType === 'select')) {
         Message({

+ 3 - 3
src/views/place/category/ExtendColumnIndex.vue

@@ -17,10 +17,10 @@
     <el-row class="action-bar-container" type="flex" justify="end">
       <el-button type="primary" size="small" @click.native="fetchData">查询</el-button>
       <el-button-group>
-        <el-button v-permission="['bz.data.type.extend.column']" size="small" @click.native="$refs.extendColumnDialogForm.open({},baseInfo.id)">
+        <el-button v-permission="['place.category.extend.column.add']" size="small" @click.native="$refs.extendColumnDialogForm.open({},baseInfo.id)">
           新建
         </el-button>
-        <el-button v-permission="['bz.data.type.extend.column']" size="small" @click.native="deleteByIds(multipleSelection)">
+        <el-button v-permission="['place.category.extend.column.delete']" size="small" @click.native="deleteByIds(multipleSelection)">
           删除
         </el-button>
       </el-button-group>
@@ -40,7 +40,7 @@
       <el-table-column label="默认值" prop="defaultValue" min-width="300" />
       <el-table-column label="操作" width="80" fixed="right">
         <template slot-scope="scope">
-          <el-button v-permission="['bz.data.type.extend.column']" type="text" @click.native="$refs.extendColumnDialogForm.open(scope.row)">编辑</el-button>
+          <el-button v-permission="['place.category.extend.column.edit']" type="text" @click.native="$refs.extendColumnDialogForm.open(scope.row)">编辑</el-button>
         </template>
       </el-table-column>
     </el-table>

+ 4 - 4
src/views/place/category/index.vue

@@ -9,10 +9,10 @@
     <el-row class="action-bar-container" type="flex" justify="end">
       <el-button type="primary" size="small" @click.native="fetchData">查询</el-button>
       <el-button-group>
-        <el-button v-permission="['bz.data.type.add']" size="small" @click.native="$refs.dialogForm.open({})">
+        <el-button v-permission="['place.category.add']" size="small" @click.native="$refs.dialogForm.open({})">
           新建
         </el-button>
-        <el-button v-permission="['bz.data.type.delete']" size="small" @click.native="deleteByIds(multipleSelection)">
+        <el-button v-permission="['place.category.delete']" size="small" @click.native="deleteByIds(multipleSelection)">
           删除
         </el-button>
       </el-button-group>
@@ -33,8 +33,8 @@
       <el-table-column label="创建时间" prop="createdTime" :formatter="dateTimeFormatter" width="180" />
       <el-table-column label="操作" width="150" fixed="right">
         <template slot-scope="scope">
-          <el-button v-permission="['bz.data.type.edit']" type="text" @click.native="$refs.dialogForm.open(scope.row)">编辑</el-button>
-          <el-button v-permission="['bz.data.type.extend.column']" type="text" @click.native="$refs.extendColumnIndex.open(scope.row)">扩展字段</el-button>
+          <el-button v-permission="['place.category.edit']" type="text" @click.native="$refs.dialogForm.open(scope.row)">编辑</el-button>
+          <el-button v-permission="['place.category.extend.column.find']" type="text" @click.native="$refs.extendColumnIndex.open(scope.row)">扩展字段</el-button>
         </template>
       </el-table-column>
     </el-table>