parent
							
								
									4c0157d65a
								
							
						
					
					
						commit
						a23cf15888
					
				| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
    <div class="filter-container">
 | 
			
		||||
      <el-form inline>
 | 
			
		||||
        <el-form-item label="名称:" prop="NAME">
 | 
			
		||||
          <el-input v-model="NAME" placeholder="名称" class="filter-item" style="width: 200px;" />
 | 
			
		||||
          <el-input v-model="NAME" placeholder="名称" class="filter-item" style="width: 200px;"/>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item>
 | 
			
		||||
          <el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">查询</el-button>
 | 
			
		||||
| 
						 | 
				
			
			@ -11,18 +11,26 @@
 | 
			
		|||
        </el-form-item>
 | 
			
		||||
      </el-form>
 | 
			
		||||
    </div>
 | 
			
		||||
    <el-table ref="multipleTable" :data="varList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
 | 
			
		||||
      <el-table-column type="selection" width="55" align="center" />
 | 
			
		||||
      <el-table-column type="index" label="序号" width="50" align="center" />
 | 
			
		||||
      <el-table-column prop="NAME" label="名称" width="180" />
 | 
			
		||||
      <el-table-column prop="ADDRESS" label="地址" show-overflow-tooltip="true" />
 | 
			
		||||
      <el-table-column prop="CONTACT_PERSON" label="联系人" show-overflow-tooltip="true" />
 | 
			
		||||
      <el-table-column prop="CONTACT_PHONE" label="联系电话" show-overflow-tooltip="true" />
 | 
			
		||||
      <el-table-column prop="DESCRIPTION" label="描述" show-overflow-tooltip="true" />
 | 
			
		||||
    <el-table
 | 
			
		||||
      ref="multipleTable"
 | 
			
		||||
      :data="varList"
 | 
			
		||||
      :header-cell-style="{'font-weight': 'bold','color': '#000'}"
 | 
			
		||||
      tooltip-effect="dark"
 | 
			
		||||
      border
 | 
			
		||||
      fit
 | 
			
		||||
      highlight-current-row>
 | 
			
		||||
      <el-table-column type="selection" width="55" align="center"/>
 | 
			
		||||
      <el-table-column type="index" label="序号" width="50" align="center"/>
 | 
			
		||||
      <el-table-column prop="NAME" label="名称" width="180"/>
 | 
			
		||||
      <el-table-column :show-overflow-tooltip="true" prop="ADDRESS" label="地址"/>
 | 
			
		||||
      <el-table-column :show-overflow-tooltip="true" prop="CONTACT_PERSON" label="联系人"/>
 | 
			
		||||
      <el-table-column :show-overflow-tooltip="true" prop="CONTACT_PHONE" label="联系电话"/>
 | 
			
		||||
      <el-table-column :show-overflow-tooltip="true" prop="DESCRIPTION" label="描述"/>
 | 
			
		||||
      <el-table-column label="操作" align="center" width="300">
 | 
			
		||||
        <template slot-scope="{row}">
 | 
			
		||||
          <el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID)">编辑</el-button>
 | 
			
		||||
          <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID, row.NAME)">删除</el-button>
 | 
			
		||||
          <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID, row.NAME)">删除
 | 
			
		||||
          </el-button>
 | 
			
		||||
        </template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table>
 | 
			
		||||
| 
						 | 
				
			
			@ -33,36 +41,55 @@
 | 
			
		|||
          <el-button type="danger" icon="el-icon-delete" plain @click="makeAll('0')">删除</el-button>
 | 
			
		||||
        </template>
 | 
			
		||||
      </div>
 | 
			
		||||
      <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
 | 
			
		||||
      <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
 | 
			
		||||
    </div>
 | 
			
		||||
    <el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="1000px">
 | 
			
		||||
      <el-form ref="form" :rules="rules" :model="form" label-width="250px">
 | 
			
		||||
      <el-form ref="form" :rules="rules" :model="form" label-width="100px" style="margin-right: 50px">
 | 
			
		||||
        <el-row :gutter="20">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-form-item label="名称" prop="NAME">
 | 
			
		||||
              <el-input v-model="form.NAME" placeholder="请输入名称..." />
 | 
			
		||||
              <el-input v-model="form.NAME" placeholder="请输入名称..."/>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-form-item label="地址" prop="ADDRESS">
 | 
			
		||||
              <el-input v-model="form.ADDRESS" placeholder="请输入地址..." />
 | 
			
		||||
              <el-input v-model="form.ADDRESS" placeholder="请输入地址..."/>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
        <el-row :gutter="20">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-form-item label="联系人" prop="CONTACT_PERSON">
 | 
			
		||||
              <el-input v-model="form.CONTACT_PERSON" placeholder="请输入联系人..." />
 | 
			
		||||
              <el-input v-model="form.CONTACT_PERSON" placeholder="请输入联系人..."/>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-form-item label="联系电话" prop="CONTACT_PHONE">
 | 
			
		||||
              <el-input v-model="form.CONTACT_PHONE" placeholder="请输入联系电话..." />
 | 
			
		||||
              <el-input v-model="form.CONTACT_PHONE" placeholder="请输入联系电话..."/>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
        <el-row :gutter="20">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-form-item :key="form.LONGITUDE" label="经度" prop="LONGITUDE">
 | 
			
		||||
              <el-input v-model="form.LONGITUDE" placeholder="请输入内容" disabled @focus="handleMap" />
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-form-item :key="form.LATITUDE" label="纬度" prop="LATITUDE">
 | 
			
		||||
              <div style="display: flex">
 | 
			
		||||
                <el-input v-model="form.LATITUDE" placeholder="请输入内容" disabled style="width: 100%" @focus="handleMap"/>
 | 
			
		||||
                <el-button style="margin-left:10px" @click="handleMap">
 | 
			
		||||
                  <span class="svg-container">
 | 
			
		||||
                    <svg-icon icon-class="international" />
 | 
			
		||||
                  </span>
 | 
			
		||||
                </el-button>
 | 
			
		||||
              </div>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
        <el-form-item label="描述" prop="DESCRIPTION">
 | 
			
		||||
          <el-input v-model="form.DESCRIPTION" type="textarea" placeholder="请输入描述..." />
 | 
			
		||||
          <el-input v-model="form.DESCRIPTION" type="textarea" placeholder="请输入描述..."/>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-form>
 | 
			
		||||
      <div slot="footer" class="dialog-footer">
 | 
			
		||||
| 
						 | 
				
			
			@ -70,13 +97,16 @@
 | 
			
		|||
        <el-button type="primary" @click="confirm">确定</el-button>
 | 
			
		||||
      </div>
 | 
			
		||||
    </el-dialog>
 | 
			
		||||
    <get-point ref="getPoint" @getPosition = "getPosition"/>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import Pagination from '@/components/Pagination'
 | 
			
		||||
import { requestFN } from '@/utils/request'
 | 
			
		||||
import getPoint from '../../util/getPoint.vue'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  components: { Pagination },
 | 
			
		||||
  components: { getPoint, Pagination },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      listQuery: {
 | 
			
		||||
| 
						 | 
				
			
			@ -96,7 +126,9 @@ export default {
 | 
			
		|||
        ADDRESS: '',
 | 
			
		||||
        CONTACT_PERSON: '',
 | 
			
		||||
        CONTACT_PHONE: '',
 | 
			
		||||
        DESCRIPTION: ''
 | 
			
		||||
        DESCRIPTION: '',
 | 
			
		||||
        LONGITUDE: '',
 | 
			
		||||
        LATITUDE: ''
 | 
			
		||||
      },
 | 
			
		||||
      rules: {
 | 
			
		||||
        NAME: [
 | 
			
		||||
| 
						 | 
				
			
			@ -118,6 +150,12 @@ export default {
 | 
			
		|||
        DESCRIPTION: [
 | 
			
		||||
          { required: true, message: '描述不能为空', trigger: 'blur' },
 | 
			
		||||
          { min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' }
 | 
			
		||||
        ],
 | 
			
		||||
        LONGITUDE: [
 | 
			
		||||
          { required: true, message: '经度不能为空', trigger: 'blur' }
 | 
			
		||||
        ],
 | 
			
		||||
        LATITUDE: [
 | 
			
		||||
          { required: true, message: '纬度不能为空', trigger: 'blur' }
 | 
			
		||||
        ]
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -147,16 +185,18 @@ export default {
 | 
			
		|||
      this.getDetail(ID)
 | 
			
		||||
    },
 | 
			
		||||
    getDetail(ID) {
 | 
			
		||||
      const params = { Id: ID }
 | 
			
		||||
      const params = { ID: ID }
 | 
			
		||||
      requestFN('/major/checkpoint/detail', params).then((response) => {
 | 
			
		||||
        const data = response.msg
 | 
			
		||||
        this.form = {
 | 
			
		||||
          Id: data.ID,
 | 
			
		||||
          ID: data.ID,
 | 
			
		||||
          NAME: data.NAME,
 | 
			
		||||
          ADDRESS: data.ADDRESS,
 | 
			
		||||
          CONTACT_PERSON: data.CONTACT_PERSON,
 | 
			
		||||
          CONTACT_PHONE: data.CONTACT_PHONE,
 | 
			
		||||
          DESCRIPTION: data.DESCRIPTION
 | 
			
		||||
          DESCRIPTION: data.DESCRIPTION,
 | 
			
		||||
          LATITUDE: data.LATITUDE,
 | 
			
		||||
          LONGITUDE: data.LONGITUDE
 | 
			
		||||
        }
 | 
			
		||||
      }).catch((e) => {
 | 
			
		||||
        console.error('获取详情数据失败', e)
 | 
			
		||||
| 
						 | 
				
			
			@ -170,7 +210,9 @@ export default {
 | 
			
		|||
        ADDRESS: '',
 | 
			
		||||
        CONTACT_PERSON: '',
 | 
			
		||||
        CONTACT_PHONE: '',
 | 
			
		||||
        DESCRIPTION: ''
 | 
			
		||||
        DESCRIPTION: '',
 | 
			
		||||
        LATITUDE: '',
 | 
			
		||||
        LONGITUDE: ''
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    confirm() {
 | 
			
		||||
| 
						 | 
				
			
			@ -209,7 +251,8 @@ export default {
 | 
			
		|||
        }).catch((e) => {
 | 
			
		||||
          this.listLoading = false
 | 
			
		||||
        })
 | 
			
		||||
      }).catch(() => {})
 | 
			
		||||
      }).catch(() => {
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    makeAll() {
 | 
			
		||||
      const _selectData = this.$refs.multipleTable.selection
 | 
			
		||||
| 
						 | 
				
			
			@ -233,7 +276,8 @@ export default {
 | 
			
		|||
        }).catch((e) => {
 | 
			
		||||
          this.listLoading = false
 | 
			
		||||
        })
 | 
			
		||||
      }).catch(() => {})
 | 
			
		||||
      }).catch(() => {
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    resetQuery() {
 | 
			
		||||
      this.NAME = ''
 | 
			
		||||
| 
						 | 
				
			
			@ -242,6 +286,13 @@ export default {
 | 
			
		|||
    getQuery() {
 | 
			
		||||
      this.$refs.multipleTable.clearSelection()
 | 
			
		||||
      this.getList()
 | 
			
		||||
    },
 | 
			
		||||
    getPosition(e) {
 | 
			
		||||
      this.form.LATITUDE = e.LATITUDE
 | 
			
		||||
      this.form.LONGITUDE = e.LONGITUDE
 | 
			
		||||
    },
 | 
			
		||||
    handleMap() {
 | 
			
		||||
      this.$refs.getPoint.init({ LATITUDE: this.form.LATITUDE, LONGITUDE: this.form.LONGITUDE })
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -83,7 +83,7 @@
 | 
			
		|||
              <el-input v-model="form.CONTACT_PHONE" placeholder="请输入联系电话..." />
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
          <el-col v-if="false" :span="12">
 | 
			
		||||
            <el-form-item label="描述" prop="DESCRIPTION">
 | 
			
		||||
              <el-input v-model="form.DESCRIPTION" type="textarea" placeholder="请输入描述..." />
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,7 +13,7 @@
 | 
			
		|||
        </el-form-item>
 | 
			
		||||
        <el-form-item>
 | 
			
		||||
          <el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">查询</el-button>
 | 
			
		||||
          <el-button class="filter-item" type="default" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
 | 
			
		||||
          <el-button class="filter-item" type="info" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-form>
 | 
			
		||||
    </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -147,6 +147,7 @@ export default {
 | 
			
		|||
      dialogFormShow: false,
 | 
			
		||||
      dialogType: 'add',
 | 
			
		||||
      form: {
 | 
			
		||||
        ID: '',
 | 
			
		||||
        RESOURCE_LIBRARY_NAME: '',
 | 
			
		||||
        LOCATION: '',
 | 
			
		||||
        RESOURCE_CATEGORY: '',
 | 
			
		||||
| 
						 | 
				
			
			@ -231,7 +232,7 @@ export default {
 | 
			
		|||
      this.getDetail(ID)
 | 
			
		||||
    },
 | 
			
		||||
    getDetail(ID) {
 | 
			
		||||
      const params = { Id: ID }
 | 
			
		||||
      const params = { ID: ID }
 | 
			
		||||
      requestFN('/major/resource/detail', params).then((response) => {
 | 
			
		||||
        const data = response.msg
 | 
			
		||||
        this.form = {
 | 
			
		||||
| 
						 | 
				
			
			@ -268,7 +269,6 @@ export default {
 | 
			
		|||
      }
 | 
			
		||||
    },
 | 
			
		||||
    confirm() {
 | 
			
		||||
      /* this.dataSave()*/
 | 
			
		||||
      this.$refs.form.validate(valid => {
 | 
			
		||||
        if (valid) {
 | 
			
		||||
          this.dataSave()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -162,6 +162,8 @@ export default {
 | 
			
		|||
    setPosition() {
 | 
			
		||||
      this.visible = false
 | 
			
		||||
      this.$emit('getPosition', { LATITUDE: this.LATITUDE, LONGITUDE: this.LONGITUDE })
 | 
			
		||||
      this.LONGITUDE = ''
 | 
			
		||||
      this.LATITUDE = ''
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue