Browse Source

修改

dev_kxc
xzt 1 year ago
parent
commit
14fc984060
  1. 490
      jwtech-admin-page/src/views/projectAndEnterpriseBindingMange/enterpriseBinding/index.vue
  2. 17
      jwtech-admin-page/src/views/projectAndEnterpriseBindingMange/projectBinding/index.vue

490
jwtech-admin-page/src/views/projectAndEnterpriseBindingMange/enterpriseBinding/index.vue

@ -1,3 +1,491 @@
<template>
<div>qiye</div>
<div class="app-container">
<!-- 面包屑 -->
<el-breadcrumb separator="/" style="margin-bottom: 20px">
<el-breadcrumb-item
v-for="(item, index) in routeList"
:key="item + index"
:to="{ path: item.path }"
>{{ item.routeName }}</el-breadcrumb-item
>
</el-breadcrumb>
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
>
<el-form-item label="项目名称" prop="projectName">
<el-input
v-model="queryParams.data.projectName"
placeholder="请输入项目名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item label="行政区划" prop="adcd">
<el-cascader
:options="areasOptions"
v-model="queryParams.data.adcd"
:props="areasOptionProps"
placeholder="请选择行政区划"
clearable
size="small"
style="width: 100%"
@change="handleQuery"
>
</el-cascader>
</el-form-item>
<el-form-item label="绑定状态" prop="bindStatus">
<el-select
v-model="queryParams.data.bindStatus"
placeholder="请选择绑定状态"
filterable
clearable
size="small"
style="width: 100%"
@change="handleQuery"
>
<el-option label="未绑定" value="0" />
<el-option label="已绑定" value="1" />
</el-select>
</el-form-item>
<el-form-item>
<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-popconfirm
icon="el-icon-info"
icon-color="green"
title="确定绑定吗"
@confirm="handleAdd"
>
<el-button
slot="reference"
type="primary"
icon="el-icon-plus"
size="mini"
:disabled="multiple"
>绑定新项目</el-button
>
</el-popconfirm>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['bind:project:remove']"
>解除绑定</el-button
>
</el-col> -->
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="infoList"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
fixed
:selectable="checkSelectable"
/>
<el-table-column
label="序号"
type="index"
width="50"
align="center"
fixed
/>
<el-table-column
label="项目名称"
align="center"
prop="projectName"
min-width="120"
/>
<el-table-column
label="项目编号"
align="center"
prop="proNo"
min-width="120"
/>
<el-table-column
label="行政区划"
align="center"
prop="adcd"
min-width="120"
:formatter="$formatAdcd"
/>
<el-table-column
label="绑定状态"
align="center"
prop="bindStatus"
min-width="120"
>
<template slot-scope="scope">
{{ scope.row.bindStatus === "1" ? "已绑定" : "未绑定" }}
</template>
</el-table-column>
<!-- <el-table-column
label="项目类型"
align="center"
prop="projectType"
:formatter="projectTypeFormat"
min-width="120"
/>
<el-table-column
label="建设性质"
align="center"
prop="constructionNature"
:formatter="constructionNatureFormat"
min-width="120"
/>
<el-table-column
label="总投资金额(万元)"
align="center"
prop="total"
min-width="150"
/> -->
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
min-width="180"
fixed="right"
>
<template slot-scope="scope">
<el-popconfirm
icon="el-icon-info"
icon-color="green"
title="确定绑定吗"
@confirm="handleAdd(scope.row)"
>
<el-button
slot="reference"
size="mini"
type="text"
icon="el-icon-connection"
v-if="scope.row.bindStatus === '0'"
>绑定</el-button
>
</el-popconfirm>
<el-button
size="mini"
type="text"
icon="el-icon-connection"
v-if="scope.row.bindStatus === '1'"
>已绑定</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"
/>
<!-- 添加或修改项目基本信息管理对话框 -->
<!-- <el-dialog
:title="title"
:visible.sync="open"
width="1200px"
append-to-body
:close-on-click-modal="false"
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="180px"
label-position="top"
>
<el-form-item label="项目名称" prop="projectName">
<el-select
v-model="form.projectName"
placeholder="请输入项目名称"
filterable
clearable
size="small"
style="width: 100%"
multiple
>
<el-option
v-for="dict in projectNameOptions"
:key="dict.projectName + dict.id"
:label="dict.projectName"
:value="dict.proNo"
/>
</el-select>
</el-form-item>
</el-form>
<div class="dialog-footer" slot="footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog> -->
</div>
</template>
<script>
import { legalLinkEnterprise, legalEnterpriseList } from "@/api/common";
import { getAreasData } from "@/api/areas/index";
export default {
data() {
return {
//
loading: true,
//
showSearch: true,
//
total: 0,
//
infoList: [],
//
routeList: [
{
path: "/projectAndEnterpriseBindingMange/projectBinding",
routeName: "项目绑定",
},
],
areasOptions: [],
areasOptionProps: {
emitPath: false,
checkStrictly: true, //
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
projectName: null,
adcd: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
proQueryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
projectName: null,
constructionNature: null,
constructionLocation: null,
projectUnitName: null,
briefIntroduction: null,
projectLandSituation: null,
designEstimateReport: null,
relatedAttachment: null,
projectCode: null,
proNo: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
owerDept: null,
},
cv: {},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
open: false,
title: "",
//
multiple: true,
//
proNos: [],
//
form: {},
rules: {
projectName: [
{ required: true, message: "请选择关联的项目", trigger: "blur" },
],
},
//
zd_projectTypeOptions: [],
//
ms_projectTypeOptions: [],
//
constructionNatureOptions: [],
//
projectNameOptions: [],
};
},
created() {
this.getList();
this.getDicts("CONSTRUCTION_NATURE").then((response) => {
this.constructionNatureOptions = response.data;
});
this.getDicts("major_project").then((response) => {
// console.log("4444444444444444", response.data);
this.zd_projectTypeOptions = response.data;
});
this.getDicts("general_project").then((response) => {
// console.log("5555555555555", response.data);
this.ms_projectTypeOptions = response.data;
});
this.getTreeData();
},
methods: {
checkSelectable(row) {
return row.bindStatus === "0";
},
getList() {
this.loading = true;
legalEnterpriseList(this.queryParams).then((res) => {
this.infoList = res.records;
this.total = res.total;
console.log("this.infoList", this.infoList);
this.loading = false;
});
},
//
constructionNatureFormat(row, column) {
return this.selectDictLabel(
this.constructionNatureOptions,
row.constructionNature
);
},
//
projectTypeFormat(row, column) {
if (row.isMajor == "zd") {
return this.selectDictLabel(
this.zd_projectTypeOptions,
row.projectType
);
} else if (row.isMajor == "ms") {
return this.selectDictLabel(
this.ms_projectTypeOptions,
row.projectType
);
}
},
//
cancel() {
this.open = false;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
this.handleQuery();
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {
projectName: null,
adcd: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
getTreeData() {
getAreasData().then((items) => {
let res = [];
let getChildren = (res, pid) => {
for (const i of items.data) {
if (i.parentid === pid) {
const newItem = {
label: i.name,
value: i.id,
};
if (i.layer != 3) newItem.children = [];
res.push(newItem);
getChildren(newItem.children, newItem.value);
}
}
};
getChildren(res, items.data[0].parentid);
this.areasOptions = res;
});
},
//
handleSelectionChange(selection) {
this.proNos = selection.map((item) => item.proNo);
this.multiple = !selection.length;
console.log(1111, this.proNos);
},
/** 新增按钮操作 */
handleAdd(row) {
// listProDesign(this.proQueryParams).then((response) => {
// this.projectNameOptions = response.records;
// });
// this.open = true;
// this.title = "";
let proNos = row.proNo ? [row.proNo] : this.proNos;
// this.form.proNo = proNos;
this.submitForm(proNos);
},
submitForm(proNos) {
// this.$refs["form"].validate((valid) => {
// if (valid) {
legalLinkEnterprise(proNos).then((res) => {
if (res.code === 200) {
this.msgSuccess("绑定成功");
// this.open = false;
this.getList();
}
});
// }
// });
},
},
};
</script>

17
jwtech-admin-page/src/views/projectAndEnterpriseBindingMange/projectBinding/index.vue

@ -46,6 +46,20 @@
>
</el-cascader>
</el-form-item>
<el-form-item label="绑定状态" prop="bindStatus">
<el-select
v-model="queryParams.data.bindStatus"
placeholder="请选择绑定状态"
filterable
clearable
size="small"
style="width: 100%"
@change="handleQuery"
>
<el-option label="未绑定" value="0" />
<el-option label="已绑定" value="1" />
</el-select>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
@ -67,7 +81,6 @@
icon="el-icon-plus"
size="mini"
:disabled="multiple"
v-hasPermi="['bind:project:add']"
>绑定新项目</el-button
>
</el-popconfirm>
@ -262,7 +275,7 @@ export default {
routeList: [
{
path: "/projectAndEnterpriseBindingMange/projectBinding",
routeName: "项目绑定",
routeName: "企业绑定",
},
],
areasOptions: [],

Loading…
Cancel
Save