Bläddra i källkod

前端页面更新

sr 4 år sedan
förälder
incheckning
1a22a89e12
2 ändrade filer med 276 tillägg och 303 borttagningar
  1. 1 1
      ruoyi-ui/src/api/projectInfo/info.js
  2. 275 302
      ruoyi-ui/src/views/management/info/index.vue

+ 1 - 1
ruoyi-ui/src/api/projectInfo/info.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 查询项目-线索信息列表
 export function listInfo(query) {
   return request({
-    url: '/projectInfo/info/list',
+    url: '/bmProject/project/list',
     method: 'get',
     params: query
   })

+ 275 - 302
ruoyi-ui/src/views/management/info/index.vue

@@ -1,39 +1,22 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="填报单位" prop="deptName">
-        <el-input
-          v-model="queryParams.deptName"
-          placeholder="请输入填报单位"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="项目名称" prop="name">
-        <el-input
-          v-model="queryParams.name"
-          placeholder="请输入项目名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="填报日期" prop="addtime">
-        <el-date-picker value-format="yyyy-MM-dd" @change="tiemsChange" v-model="times" type="daterange"
-          range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="状态" prop="projectStatus">
-       <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
-         <el-option
-           v-for="dict in statusOptions"
-           :key="dict.dictValue"
-           :label="dict.dictLabel"
-           :value="dict.dictValue"
-         />
-       </el-select>
-      </el-form-item>
+        <el-input v-model="queryParams.deptName" placeholder="请输入填报单位" clearable size="small" @keyup.enter.native="handleQuery" />
+      </el-form-item>
+      <el-form-item label="项目名称" prop="name">
+        <el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable size="small" @keyup.enter.native="handleQuery" />
+      </el-form-item>
+      <el-form-item label="填报日期" prop="addtime">
+        <el-date-picker value-format="yyyy-MM-dd" @change="tiemsChange" v-model="times" type="daterange"
+          range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="状态" prop="projectStatus">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
+        </el-select>
+      </el-form-item>
 
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -43,38 +26,18 @@
 
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          style="background-color: #1C84C6;color: #fff;border: none;"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['projectInfo:info:add']"
-        >添加线索</el-button>
+        <el-button type="primary" plain style="background-color: #1C84C6;color: #fff;border: none;" size="mini" @click="handleAdd"
+          v-hasPermi="['projectInfo:info: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="['projectInfo:info:edit']"
-        >修改</el-button>
+        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
+          v-hasPermi="['projectInfo:info: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="['projectInfo:info:remove']"
-        >销号</el-button>
+        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
+          v-hasPermi="['projectInfo:info:remove']">销号</el-button>
       </el-col>
-     <!-- <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="warning"
           plain
@@ -91,53 +54,51 @@
       <el-table-column label="项目名称" align="center" prop="name" />
       <el-table-column label="总投资金额(万)" align="center" prop="totAmt" />
       <el-table-column label="填报单位" align="center" prop="deptName" />
-      <el-table-column label="审核情况" align="center" prop="remark"/>
-      <el-table-column label="状态" align="center" prop="projectStatus">
-      <template slot-scope="scope">
-            {{scope.row.projectStatus | dictStatus}}
-          </template>
-      </el-table-column>
-      <el-table-column label="填报日期" align="center" prop="createTime" />
+      <el-table-column label="审核情况" align="center" prop="remark" />
+      <el-table-column label="状态" align="center" prop="dictLabel"/>
+      <el-table-column label="填报日期"  width="180" align="center" prop="createTime" />
       <el-table-column label="操作" width="280" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            style="background: #0669B2;color: #FFF;padding: 7px;"
-            v-hasPermi="['projectInfo:info:edit']"
-          >查看/审核</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            style="background: #3FBCEF;color: #FFF;padding: 7px;"
-            v-hasPermi="['projectInfo:info:edit']"
-          >提交审核</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            style="background: #F5A40C;color: #FFF;padding: 7px;"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['projectInfo:info:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            style="background: #DE1939;color: #FFF;padding: 7px;"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['projectInfo:info:remove']"
-          >销号</el-button>
+        <template slot-scope="scope">
+          <el-button size="mini" type="text" style="background: #0669B2;color: #FFF;padding: 7px;" v-hasPermi="['projectInfo:info:edit']">查看/审核</el-button>
+          <el-button size="mini" type="text" style="background: #3FBCEF;color: #FFF;padding: 7px;" v-hasPermi="['projectInfo:info:edit']">提交审核</el-button>
+          <el-button size="mini" type="text" style="background: #F5A40C;color: #FFF;padding: 7px;" @click="handleUpdate(scope.row)"
+            v-hasPermi="['projectInfo:info:edit']">修改</el-button>
+          <el-button size="mini" type="text" style="background: #DE1939;color: #FFF;padding: 7px;" @click="handleDelete(scope.row)"
+            v-hasPermi="['projectInfo:info:remove']">销号</el-button>
         </template>
       </el-table-column>
     </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" />
+    <el-dialog title="添加线索"  :visible.sync="flags" append-to-body>
+      <el-form ref="forms" :model="xs_form" :rules="xs_rules" label-width="80px">
+        <el-form-item label="名称:" prop="name">
+          <el-input v-model="xs_form.name" placeholder="请输入项目名称" />
+        </el-form-item>
+        <el-form-item label="产品类别:" prop="industryCategory">
+          <el-checkbox-group v-model="xs_form.industryCategory">
+            <el-checkbox label="首位产业" name="type"></el-checkbox>
+            <el-checkbox label="战略新兴" name="type"></el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
+        <el-form-item label="所属行业:" prop="industry">
+              <el-radio-group v-model="xs_form.industry">
+                <el-radio :label="item.dictLabel" :value="item.dictValue" v-for="item in industryOptions"></el-radio>
+              </el-radio-group>
+        </el-form-item>
+        <el-form-item label="名称:" prop="name">
+          <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+            <el-option label="是" value="Y" />
+            <el-option label="否" value="N" />
+          </el-select>
+        </el-form-item>
+      </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>
     <!-- 添加或修改项目-线索信息对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@@ -220,206 +181,218 @@
 </template>
 
 <script>
-import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo } from "@/api/projectInfo/info";
-let vm = ''
+  import {
+    listInfo,
+    getInfo,
+    delInfo,
+    addInfo,
+    updateInfo,
+    exportInfo
+  } from "@/api/projectInfo/info";
+  let vm = ''
 
-export default {
-  name: "Info",
-  components: {
-  },
-  data() {
-    vm = this
-    return {
-      times: '',
-      statusOptions: [],
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 项目-线索信息表格数据
-      infoList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        bmProjectId: null,
-        name: null,
-        isDel: null,
-        contactor: null,
-        phone: null,
-        needAmt: null,
-        fixedAssets: null,
-        productName: null,
-        productQty: null,
-        productPrice: null,
-        productTax: null,
-        productEmp: null,
-        plannedLand: null,
-        independentLand: null,
-        circulationLan: null,
-        needRoom: null,
-        needFactoryRoom: null,
-        needBusRoom: null,
-        other: null,
-        address: null,
-        isFrameorder: null,
-        attachment: null,
-        description: null
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-      }
-    };
-  },
-  created() {
-    this.getDicts('project_status').then(res => {
-      this.statusOptions = res.data
-    })
-    this.getList();
-  },
-  filters:{
-    dictStatus(e){
-      console.log(e)
-      let is = ''
-      for(let item of vm.statusOptions){
-        console.log(item.dictValue)
-        if(e == item.dictValue){
-          is = item.dictLabel
-        }
-      }
-      return is
-    }
-  },
-  methods: {
-    tiemsChange(e) {
-      console.log(e,this.times)
-      if(this.times){
-        this.queryParams.beginTime = this.times[0]
-        this.queryParams.endTime = this.times[1]
-      }else{
-        this.queryParams.beginTime = ''
-        this.queryParams.endTime = ''
-      }
-
-    },
-    /** 查询项目-线索信息列表 */
-    getList() {
-      this.loading = true;
-      listInfo(this.queryParams).then(response => {
-        this.infoList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        bmProjectId: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-        name: null,
-        isDel: null,
-        contactor: null,
-        phone: null,
-        needAmt: null,
-        fixedAssets: null,
-        productName: null,
-        productQty: null,
-        productPrice: null,
-        productTax: null,
-        productEmp: null,
-        plannedLand: null,
-        independentLand: null,
-        circulationLan: null,
-        needRoom: null,
-        needFactoryRoom: null,
-        needBusRoom: null,
-        other: null,
-        address: null,
-        isFrameorder: null,
-        attachment: null,
-        description: null
+  export default {
+    name: "Info",
+    components: {},
+    data() {
+      vm = this
+      return {
+        xs_form: {
+          industryCategory: []
+        },
+        flags: false,
+        xs_rules: {},
+        times: '',
+        industryOptions: [],
+        statusOptions: [],
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 项目-线索信息表格数据
+        infoList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          bmProjectId: null,
+          name: null,
+          isDel: null,
+          contactor: null,
+          phone: null,
+          needAmt: null,
+          fixedAssets: null,
+          productName: null,
+          productQty: null,
+          productPrice: null,
+          productTax: null,
+          productEmp: null,
+          plannedLand: null,
+          independentLand: null,
+          circulationLan: null,
+          needRoom: null,
+          needFactoryRoom: null,
+          needBusRoom: null,
+          other: null,
+          address: null,
+          isFrameorder: null,
+          attachment: null,
+          description: null
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {}
       };
-      this.resetForm("form");
     },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
+    created() {
+      this.getDicts('project_status').then(res => {
+        this.statusOptions = res.data
+      })
+      this.getDicts('project_industry').then(res => {
+        this.industryOptions = res.data
+      })
       this.getList();
     },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加项目-线索信息";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getInfo(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改项目-线索信息";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateInfo(this.form).then(response => {
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addInfo(this.form).then(response => {
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+    filters: {
+      dictStatus(e) {
+        let is = ''
+        for (let item of vm.statusOptions) {
+          if (e == item.dictValue) {
+            is = item.dictLabel
           }
         }
-      });
+        return is
+      }
     },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('是否确认删除项目-线索信息编号为"' + ids + '"的数据项?', "警告", {
+    methods: {
+      tiemsChange(e) {
+        console.log(e, this.times)
+        if (this.times) {
+          this.queryParams.beginTime = this.times[0]
+          this.queryParams.endTime = this.times[1]
+        } else {
+          this.queryParams.beginTime = ''
+          this.queryParams.endTime = ''
+        }
+
+      },
+      /** 查询项目-线索信息列表 */
+      getList() {
+        this.loading = true;
+        listInfo(this.queryParams).then(response => {
+          this.infoList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          id: null,
+          bmProjectId: null,
+          createBy: null,
+          createTime: null,
+          updateBy: null,
+          updateTime: null,
+          name: null,
+          isDel: null,
+          contactor: null,
+          phone: null,
+          needAmt: null,
+          fixedAssets: null,
+          productName: null,
+          productQty: null,
+          productPrice: null,
+          productTax: null,
+          productEmp: null,
+          plannedLand: null,
+          independentLand: null,
+          circulationLan: null,
+          needRoom: null,
+          needFactoryRoom: null,
+          needBusRoom: null,
+          other: null,
+          address: null,
+          isFrameorder: null,
+          attachment: null,
+          description: null
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.id)
+        this.single = selection.length !== 1
+        this.multiple = !selection.length
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
+        this.open = true;
+        this.title = "添加项目-线索信息";
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+        const id = row.id || this.ids
+        getInfo(id).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改项目-线索信息";
+        });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.id != null) {
+              updateInfo(this.form).then(response => {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              addInfo(this.form).then(response => {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        });
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const ids = row.id || this.ids;
+        this.$confirm('是否确认删除项目-线索信息编号为"' + ids + '"的数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -429,11 +402,11 @@ export default {
           this.getList();
           this.msgSuccess("删除成功");
         })
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有项目-线索信息数据项?', "警告", {
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        const queryParams = this.queryParams;
+        this.$confirm('是否确认导出所有项目-线索信息数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -442,7 +415,7 @@ export default {
         }).then(response => {
           this.download(response.msg);
         })
+      }
     }
-  }
-};
-</script>
+  };
+</script>