Browse Source

新增网上办事模块

lcmxs 1 year ago
parent
commit
cd7dc33537
2 changed files with 98 additions and 79 deletions
  1. 6 6
      src/api/portal/ONLINE/ONLINE.js
  2. 92 73
      src/views/ONLINE/index.vue

+ 6 - 6
src/api/portal/ONLINE/ONLINE.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 查询网上办事列表
 export function listONLINE(query) {
   return request({
-    url: '/business/ONLINE/list',
+    url: '/portal/ONLINE/list',
     method: 'get',
     params: query
   })
@@ -12,7 +12,7 @@ export function listONLINE(query) {
 // 查询网上办事所有列表
 export function listAllONLINE(query) {
   return request({
-    url: '/business/ONLINE/listAll',
+    url: '/portal/ONLINE/listAll',
     method: 'get',
     params: query
   })
@@ -21,7 +21,7 @@ export function listAllONLINE(query) {
 // 查询网上办事详细
 export function getONLINE(id) {
   return request({
-    url: '/business/ONLINE/getInfo/' + id,
+    url: '/portal/ONLINE/getInfo/' + id,
     method: 'get'
   })
 }
@@ -29,7 +29,7 @@ export function getONLINE(id) {
 // 新增网上办事
 export function addONLINE(data) {
   return request({
-    url: '/business/ONLINE/add',
+    url: '/portal/ONLINE/add',
     method: 'post',
     data: data
   })
@@ -38,7 +38,7 @@ export function addONLINE(data) {
 // 修改网上办事
 export function updateONLINE(data) {
   return request({
-    url: '/business/ONLINE/edit',
+    url: '/portal/ONLINE/edit',
     method: 'post',
     data: data
   })
@@ -47,7 +47,7 @@ export function updateONLINE(data) {
 // 删除网上办事
 export function delONLINE(id) {
   return request({
-    url: '/business/ONLINE/remove/' + id,
+    url: '/portal/ONLINE/remove/' + id,
     method: 'get'
   })
 }

+ 92 - 73
src/views/ONLINE/index.vue

@@ -1,61 +1,59 @@
 <template>
-<!--  <div class="app-container">-->
-<!--    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">-->
-<!--      <el-form-item>-->
-<!--        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
-<!--        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
-<!--      </el-form-item>-->
-<!--    </el-form>-->
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="单位名称" prop="depName">
+        <el-input v-model="queryParams.depName" placeholder="请输入单位名称" clearable @keyup.enter.native="handleQuery"/>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
 
-<!--    <el-row :gutter="10" class="mb8">-->
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="primary"-->
-<!--          plain-->
-<!--          icon="el-icon-plus"-->
-<!--          size="mini"-->
-<!--          @click="handleAdd"-->
-<!--          v-hasPermi="['business:ONLINE:add']"-->
-<!--        >新增</el-button>-->
-<!--      </el-col>-->
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="success"-->
-<!--          plain-->
-<!--          icon="el-icon-edit"-->
-<!--          size="mini"-->
-<!--          :disabled="single"-->
-<!--          @click="handleUpdate"-->
-<!--          v-hasPermi="['business:ONLINE:edit']"-->
-<!--        >修改</el-button>-->
-<!--      </el-col>-->
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="danger"-->
-<!--          plain-->
-<!--          icon="el-icon-delete"-->
-<!--          size="mini"-->
-<!--          :disabled="multiple"-->
-<!--          @click="handleDelete"-->
-<!--          v-hasPermi="['business:ONLINE:remove']"-->
-<!--        >删除</el-button>-->
-<!--      </el-col>-->
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="warning"-->
-<!--          plain-->
-<!--          icon="el-icon-download"-->
-<!--          size="mini"-->
-<!--          @click="handleExport"-->
-<!--          v-hasPermi="['business:ONLINE:export']"-->
-<!--        >导出</el-button>-->
-<!--      </el-col>-->
-<!--      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
-<!--    </el-row>-->
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['business:ONLINE:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['business:ONLINE:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['business:ONLINE:remove']"
+        >删除</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
 
-<!--    <el-table v-loading="loading" :data="ONLINEList" @selection-change="handleSelectionChange">-->
-<!--      <el-table-column type="selection" width="55" align="center" />-->
-<!--      <el-table-column label="主键" align="center" prop="id">-->
+    <el-table v-loading="loading" :data="ONLINEList" @selection-change="handleSelectionChange" height="calc(100vh - 300px)">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="单位编码" align="center" prop="deptId"/>
+      <el-table-column label="单位名称" align="center" prop="depName" />
+      <el-table-column label="位置" align="center" prop="location" />
+      <el-table-column label="电话" align="center" prop="telphone" />
+      <el-table-column label="邮箱" align="center" prop="email" />
+      <!--      <el-table-column label="主键" align="center" prop="id">-->
 <!--        <template slot-scope="scope">-->
 <!--          <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.id"/>-->
 <!--        </template>-->
@@ -128,26 +126,47 @@
 <!--          >删除</el-button>-->
 <!--        </template>-->
 <!--      </el-table-column>-->
-<!--    </el-table>-->
+    </el-table>
 
-<!--    <pagination-->
-<!--      v-show="total>0"-->
-<!--      :total="total"-->
-<!--      :page.sync="queryParams.pageNum"-->
-<!--      :limit.sync="queryParams.pageSize"-->
-<!--      @pagination="getList"-->
-<!--    />-->
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
 
-<!--    &lt;!&ndash; 添加或修改网上办事对话框 &ndash;&gt;-->
-<!--    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>-->
-<!--      <el-form ref="form" :model="form" :rules="rules" label-width="80px">-->
-<!--      </el-form>-->
-<!--      <div slot="footer" class="dialog-footer">-->
-<!--        <el-button type="primary" @click="submitForm">确 定</el-button>-->
-<!--        <el-button @click="cancel">取 消</el-button>-->
-<!--      </div>-->
-<!--    </el-dialog>-->
-<!--  </div>-->
+    <!-- 添加或修改网上办事对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-row>
+          <el-col :span="12">
+              <el-form-item label="单位编码" prop="deptId"><el-input v-model="form.deptId" placeholder="请输入单位编码" /></el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="单位名称" prop="depName"><el-input v-model="form.depName" placeholder="请输入单位名称" /></el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="位置" prop="location"><el-input v-model="form.location" placeholder="请输入位置" /></el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="联系电话" prop="telphone"><el-input v-model="form.telphone" placeholder="请输入联系电话" maxlength="50" /></el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="邮箱" prop="email"><el-input v-model="form.email" placeholder="请输入联系邮箱" maxlength="20" /></el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>