Commit 9dc6cf1e authored by huangjie's avatar huangjie

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys...

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司

# Conflicts:
#	dsk-operate-ui/src/views/projectCostLedger/index.vue
parents 50e813a9 290a27cd
......@@ -35,6 +35,7 @@
"clipboard": "2.0.8",
"core-js": "^3.32.2",
"dayjs": "^1.11.10",
"decimal.js": "^10.4.3",
"echarts": "^5.0.0",
"el-table-horizontal-scroll": "^1.2.5",
"element-resize-detector": "^1.2.4",
......
......@@ -132,3 +132,13 @@ export const removeFileFromOssApi = (ossId) => request({
method: "delete",
params: {}
});
/**
* 获取项目承接类型下拉框
* @returns
*/
export const getProjectUndertakingTypesApi = () => request({
url: "/advisory/body/getIsInvestProject",
method: "get",
params: {}
});
......@@ -29,17 +29,18 @@
</template>
<!-- 图片类型 -->
<dsk-photo-input v-model="comCustomItem.componentAttribute.value" v-if="comCustomItem.comType == 'photo'"
:limit="comCustomItem.formAttribute.limit" :disabled="!isModify"></dsk-photo-input>
:limit="comCustomItem.formAttribute.limit" :disabled="!isModify" @change="fileChange"></dsk-photo-input>
<!-- 文件类型 -->
<dsk-file-input v-model="comCustomItem.componentAttribute.value" v-if="comCustomItem.comType == 'file'"
:limit="comCustomItem.formAttribute.limit" :disabled="!isModify"></dsk-file-input>
:limit="comCustomItem.formAttribute.limit" :disabled="!isModify" @change="fileChange"></dsk-file-input>
<!-- 详情模式下 -->
<template v-if="!isModify && detailTypes.includes(comCustomItem.comType)">
<div class="dsk-cutom-form-render-detail-item">
<div class="render-detail-item-inner">
<dsk-text-over-flow-tip>
<span>{{detailRender(comCustomItem)}}</span>
<div v-if="comCustomItem.comType == 'textarea'" v-html="detailRender(comCustomItem)"></div>
<span v-else>{{detailRender(comCustomItem)}}</span>
<template slot="overflow">{{detailRender(comCustomItem)}}</template>
</dsk-text-over-flow-tip>
</div>
......@@ -54,6 +55,7 @@ import DskEmailInput from "@/components/DskEmailInput";
import DskPhotoInput from "@/components/DskPhotoInput";
import DskFileInput from "@/components/DskFileInput";
import DskTextOverFlowTip from "@/components/DskTextOverFlowTip";
import { cloneDeep } from 'lodash-es';
export default {
name: "dskCustomItemRender",
components: {
......@@ -112,7 +114,11 @@ export default {
comCustomRowIndex: this.customRowIndex,
comCustomItemIndex: this.customItemIndex,
comIsModify: this.isModify,
detailTypes: ["text", "textarea", "select", "date", "phone", "email"]
detailTypes: ["text", "textarea", "select", "date", "phone", "email"],
validatorMap: {
"email": [/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, "邮箱"],
"phone": [/^1[3-9]\d{9}$/, "电话号码"]
}
};
},
//可访问data属性
......@@ -130,14 +136,31 @@ export default {
methods: {
// 验证规则
validatorRules(item) {
let type = Object.prototype.toString.call(item.componentAttribute.value).split(" ")[1].replace("]", "").toLowerCase();
if (!item.formAttribute) return { required: false, type };
if (item.formAttribute.required) {
if (item.formAttribute.requiredRules) return item.formAttribute.requiredRules;
return { required: true, type, message: `${item.formAttribute.label}不能为空` };
}
if (Object.keys(item.formAttribute.rules).length) {
return item.formAttribute.rules;
const _item = cloneDeep(item);
const itemLabel = _item.formAttribute.label;
let type = Object.prototype.toString.call(_item.componentAttribute.value).split(" ")[1].replace("]", "").toLowerCase();
if (!_item.formAttribute) return { required: false, type };
if (_item.formAttribute.required) {
if (item.formAttribute.requiredRules) {
if (_item.formAttribute.requiredRules.validator) {
let validatorRule = cloneDeep(this.validatorMap[_item.comType]);
_item.formAttribute.requiredRules.validator = (rule, value, callback) => {
const reg = validatorRule[0];
if (!value && !value?.toString()?.trim()) {
return callback(new Error(itemLabel ? `请输入${itemLabel}` : `请输入${validatorRule[1]}`));
}
if (!reg.test(value)) {
return callback(new Error(itemLabel ? `请输入正确的${itemLabel}` : `请输入正确的${validatorRule[1]}`));
}
return callback();
};
}
return _item.formAttribute.requiredRules;
};
return { required: true, type, message: `${itemLabel}不能为空` };
}
if (Object.keys(_item.formAttribute.rules).length) {
return _item.formAttribute.rules;
} else {
return { required: false, type };
};
......@@ -146,13 +169,26 @@ export default {
const classParams = {
[`custom-render-item-${comType}`]: true
};
if (!this.comIsModify) classParams["is-detail-custom-render-item"] = true;
if (this.comIsModify) classParams["is-edit-custom-render-item"] = true;
return classParams;
},
detailRender(item) {
const value = item.componentAttribute.value;
let value = item.componentAttribute.value;
const valueType = Object.prototype.toString.call(value);
if (valueType === "[object String]") return value || value == "0" ? value : "-";
if (valueType === "[object String]") {
if (value || value == "0") {
value = value.replace(new RegExp("\\n", "gmi"), "<\/br>");
// 富文本框保留空格
if (item.comType == "textarea") value = value.replace(new RegExp("\\s", "gmi"), "&nbsp;");
return value;
}
return "-";
};
if (valueType === "[object Array]") return value?.length ? value.join(",") : "-";
},
fileChange(isRemove, fileList) {
this.$emit("fileChange", isRemove, fileList, this.comCustomItem);
}
},
}
......@@ -194,10 +230,28 @@ export default {
}
}
::v-deep &.custom-render-item-textarea {
.dsk-custom-form-render-item {
&.custom-render-item-textarea {
&.is-detail-custom-render-item {
.dsk-cutom-form-render-detail-item {
display: block;
height: 73px;
line-height: 22px;
padding: 9px 12px;
overflow: auto;
box-sizing: border-box;
.render-detail-item-inner {
overflow: unset;
::v-deep .dsk-text-over-flow-tip {
.text-over-flow-tip-inner {
overflow: unset;
}
}
}
}
}
/* 编辑模式 */
&.is-edit-custom-render-item {
}
}
}
......
......@@ -139,7 +139,7 @@ export default {
id: result.data.ossId,
fileName: result.data.fileName
});
this.$emit("update:fileList", this.comFileList);
this.eventChange();
this.$message.success("上传成功");
}
} catch (error) {
......@@ -155,7 +155,7 @@ export default {
id: `${new Date().getTime()}${generateRandomLowerCaseLetter()}`,
fileName: file.name
});
this.$emit("update:fileList", this.comFileList);
this.eventChange();
this.$message.success("上传成功");
} catch (error) {
console.log(error);
......@@ -188,7 +188,7 @@ export default {
const removeResult = await removeFileFromOssApi(row.id);
if (removeResult.code == 200) {
this.comFileList.splice(index, 1);
this.$emit("update:fileList", this.comFileList);
this.eventChange(true);
this.$message({
type: 'success',
message: '删除成功!'
......@@ -204,12 +204,16 @@ export default {
const url = this.comFileList[index].url;
URL.revokeObjectURL(url);
this.comFileList.splice(index, 1);
this.$emit("update:fileList", this.comFileList);
this.eventChange(true);
this.$message({
type: 'success',
message: '删除成功!'
});
}
},
eventChange(isRemove = false) {
this.$emit("update:fileList", this.comFileList);
this.$emit("change", isRemove, this.comFileList);
}
},
}
......
......@@ -148,7 +148,7 @@ export default {
id: result.data.ossId,
fileName: result.data.fileName
});
this.$emit("update:fileList", this.comFileList);
this.eventChange();
this.$message.success("上传成功");
}
} catch (error) {
......@@ -164,7 +164,7 @@ export default {
id: `${new Date().getTime()}${generateRandomLowerCaseLetter()}`,
fileName: file.name
});
this.$emit("update:fileList", this.comFileList);
this.eventChange();
this.$message.success("上传成功");
} catch (error) {
console.log(error);
......@@ -201,7 +201,7 @@ export default {
const removeResult = await removeFileFromOssApi(row.id);
if (removeResult.code == 200) {
this.comFileList.splice(index, 1);
this.$emit("update:fileList", this.comFileList);
this.eventChange(true);
this.$message({
type: 'success',
message: '删除成功!'
......@@ -217,12 +217,16 @@ export default {
const url = this.comFileList[index].url;
URL.revokeObjectURL(url);
this.comFileList.splice(index, 1);
this.$emit("update:fileList", this.comFileList);
this.eventChange(true);
this.$message({
type: 'success',
message: '删除成功!'
});
}
},
eventChange(isRemove = false) {
this.$emit("update:fileList", this.comFileList);
this.$emit("change", isRemove, this.comFileList);
}
},
}
......
......@@ -50,11 +50,12 @@
</template>
<script>
import draggable from 'vuedraggable'
import ScrollPane from './ScrollPane'
import path from 'path'
import draggable from 'vuedraggable';
import ScrollPane from './ScrollPane';
import path from 'path';
import { cloneDeep } from 'lodash-es';
export default {
export default {
components: { ScrollPane, draggable },
data() {
return {
......@@ -71,7 +72,7 @@
sort: true, // 是否启用排序功能
draggable: '.tags-view-item', // 可拖拽元素的选择器
},
havemore:false,
havemore: false,
};
},
computed: {
......@@ -107,7 +108,7 @@
this.addTags();
this.moveToCurrentTag();
this.getviews();
this.getviewswidth()
this.getviewswidth();
},
visible(value) {
if (value) {
......@@ -121,7 +122,7 @@
this.$nextTick(() => {
this.initTags();
this.addTags();
this.getviewswidth()
this.getviewswidth();
});
},
methods: {
......@@ -143,11 +144,11 @@
});
sessionStorage.setItem("views", JSON.stringify(viewlist));
},
getviewswidth(){
let fatherwidth = this.$refs.getviews.offsetWidth-6
let viewlength = this.$store.state.tagsView.visitedViews.length
getviewswidth() {
let fatherwidth = this.$refs.getviews.offsetWidth - 6;
let viewlength = this.$store.state.tagsView.visitedViews.length;
//是否超出了能展示最多的个数
this.havemore = fatherwidth/80<viewlength
this.havemore = fatherwidth / 80 < viewlength;
},
changetags() {
this.showall = false;
......@@ -358,8 +359,10 @@
padding-top: 20px;
}
.tags-view-wrapper {
::v-deep .el-scrollbar__view{
>div{display: flex;}
::v-deep .el-scrollbar__view {
> div {
display: flex;
}
}
.tags-view-item {
display: inline-block;
......@@ -399,7 +402,7 @@
/*&:first-of-type {*/
/*margin-left: 64px;*/
/*}*/
.hoverclass{
.hoverclass {
padding: 0 20px 0 8px;
height: 28px;
line-height: 28px;
......@@ -410,13 +413,12 @@
white-space: nowrap;
border-radius: 4px;
&:hover {
background: #F5F5F5;
background: #f5f5f5;
color: #232323;
}
}
.el-icon-close:hover {
background: #EEEEEE;;
background: #eeeeee;
color: #999999;
}
&.active {
......@@ -470,15 +472,15 @@
.imgs {
border-radius: 4px;
&:hover{
background: #EEEEEE;
&:hover {
background: #eeeeee;
}
> img {
width: 16px;
}
}
.showall{
background: #EEEEEE;
.showall {
background: #eeeeee;
}
.tagslist {
transition: all 0.2s;
......@@ -570,5 +572,4 @@
}
}
}
</style>
import store from '@/store';
import router from '@/router';
import { paramsToQuery } from "@/utils/";
import { paramsToQuery, getUrlSearchQuery } from "@/utils/";
export default {
// 刷新当前tab页签
// 刷新当前tab页签 刷新参数无变化时使用
refreshPage(obj) {
const { path, query, matched } = router.currentRoute;
if (obj === undefined) {
......@@ -30,6 +30,17 @@ export default {
return router.push(obj);
}
},
// 关闭当前tab页签并刷新 参数变动时用
async refershCurrent(title, url, params) {
// 删除当前页签
await store.dispatch("tagsView/delView", router.currentRoute);
const { tagRoutes, defaultRoutes } = this.createDifferentTabData(title, url, params);
await store.dispatch('tagsView/addView', tagRoutes);
router.push({
...defaultRoutes,
path: `/redirect${defaultRoutes.fullPath}`,
});
},
// 关闭指定tab页签
closePage(obj) {
if (obj === undefined) {
......@@ -60,13 +71,30 @@ export default {
return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
},
// 添加tab页签
async openPage(title, url, params) {
const obj = { path: url, fullPath: url, query: params, meta: { title: title } };
if (params && Object.keys(params).length) {
async openPage(title, url, params = {}) {
const { tagRoutes, defaultRoutes } = this.createDifferentTabData(title, url, params);
await store.dispatch('tagsView/addView', tagRoutes);
return router.push(defaultRoutes);
},
createDifferentTabData(title, url, params = {}) {
const origin = location.origin;
// 拼接完整路径
const integrityUrl = `${origin}${url}`;
const paramsResult = getUrlSearchQuery(integrityUrl);
// 链接上带有参数 合并到query对象
if (paramsResult && Object.keys(paramsResult).length) {
params ? null : params = {};
params = { ...JSON.parse(JSON.stringify(params)), ...paramsResult };
url = url.slice(0, url.indexOf("?"));
}
const obj = { path: url, meta: { title }, fullPath: url, query: params, };
const _obj = JSON.parse(JSON.stringify(obj));
if (params && Object?.keys(params)?.length) {
obj.fullPath = `${obj.path}${paramsToQuery(params) ? "?" + paramsToQuery(params) : ""}`;
// 用于匹配 router跳转的fullPath 默认会 encodeURIComponent
_obj.fullPath = `${_obj.path}${paramsToQuery(params, false) ? "?" + paramsToQuery(params, false) : ""}`;
}
await store.dispatch('tagsView/addView', obj);
return router.push({ path: url, query: params });
return { tagRoutes: _obj, defaultRoutes: obj };
},
// 修改tab页签
updatePage(obj) {
......
......@@ -18,7 +18,7 @@ const mutations = {
if (state.visitedViews.some(v => v.fullPath === view.fullPath)) return;
state.visitedViews.push(
Object.assign({}, view, {
title: view.meta.title || 'no-name'
title: view.meta.title || 'no-name',
})
);
},
......
......@@ -224,7 +224,6 @@ export const defaultComOptions = [
rules: {
trigger: ["blur"],
validator: (rule, value, callback) => {
// console.log("value", value);
const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if (value && !reg.test(value)) {
return callback(new Error(`请输入正确的电子邮箱`));
......@@ -237,10 +236,10 @@ export const defaultComOptions = [
validator: (rule, value, callback) => {
const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if (!value && !value?.toString()?.trim()) {
return callback(new Error(`请输入电子邮箱`));
return callback(new Error("请输入邮箱"));
}
if (!reg.test(value)) {
return callback(new Error(`请输入正确的电子邮箱`));
return callback(new Error("请输入正确的邮箱"));
}
return callback();
}
......
......@@ -423,14 +423,14 @@ export const getUrlSearchQuery = (originUrl = location.href, reg = new RegExp("\
* 对象转换为查询字符串
* @param {{[key:string] : any}} query
*/
export const paramsToQuery = (query) => {
export const paramsToQuery = (query, decode = true) => {
try {
if (Object.prototype.toString.call(query) !== "[object Object]") return "";
const params = new URLSearchParams(query);
let searchStrArray = [];
params.forEach((value, key) => {
if (params.has(key)) {
searchStrArray.push(`${key}=${decodeURIComponent(value)}`);
searchStrArray.push(`${key}=${decode ? decodeURIComponent(value) : encodeURIComponent(decodeURIComponent(value))}`);
}
});
return searchStrArray.join("&");
......
......@@ -216,7 +216,7 @@ export default {
});
} catch (error) {
if (error?.errors?.length) {
console.dir(error);
// console.dir(error);
const { errors, fields } = error;
this.errorHandle(errors);
}
......@@ -429,10 +429,10 @@ export default {
}
},
// 编辑模块名称结束
editFinish(module) {
editFinish(module, moduleName) {
const index = this.subfieldModuleForm.subfieldModuleList.findIndex(item => item.uid == module.uid);
if (index > -1) {
this.subfieldModuleForm.subfieldModuleList.splice(index, 1, { ...module, ...this.subfieldModuleForm.subfieldModuleList[index].children });
this.subfieldModuleForm.subfieldModuleList.splice(index, 1, { ...module, children: [...this.subfieldModuleForm.subfieldModuleList[index].children] });
}
},
// 命中的模块
......
......@@ -91,7 +91,7 @@ export default {
this.comModuleInfo.edit = false;
this.comModuleInfo.defaultSubfieldModuleName = this.comModuleInfo.subfieldModuleName;
this.oldComModuleName = this.comModuleInfo.subfieldModuleName;
this.$emit("editFinish", this.comModuleInfo);
this.$emit("editFinish", this.comModuleInfo, this.subfieldModuleComName);
}
},
}
......
......@@ -151,7 +151,7 @@
<!-- 组件容器 -->
<div class="custom-item-com-box">
<dsk-custom-item-render :custom-item="column" :custom-module-index="index" :custom-row-index="rowIndex"
:custom-item-index="columnIndex" :isModify="comIsModify"></dsk-custom-item-render>
:custom-item-index="columnIndex" :isModify="comIsModify" @fileChange="fileChange"></dsk-custom-item-render>
</div>
</div>
</div>
......@@ -168,6 +168,7 @@ import { elementMessageSingleton, jsonStrToObject, groupArray } from "@/utils";
import { cloneDeep } from "lodash-es";
import DskTextOverFlowTip from "@/components/DskTextOverFlowTip";
import DskCustomItemRender from "@/components/DskCustomItemRender";
import serialize from "serialize-javascript";
export default {
name: "consultingAgency",
components: {
......@@ -249,6 +250,20 @@ export default {
},
//方法集
methods: {
fileChange(isRemove, fileList, comCustomItem) {
const uid = comCustomItem.uid;
const pid = comCustomItem.pid;
const moduleIndex = this.form.subfieldModuleList.findIndex(item => item.uid == pid);
if (moduleIndex > -1) {
const _temp = cloneDeep(this.form.subfieldModuleList[moduleIndex]);
const index = _temp.children.findIndex(child => child.uid == uid);
if (index > -1) {
_temp.children[index].componentAttribute.value = cloneDeep(fileList);
this.form.subfieldModuleList.splice(moduleIndex, 1, _temp);
this.oldSubfieldModuleList = cloneDeep(this.form.subfieldModuleList);
}
}
},
itemStyles(item, index, selfIndex) {
const styles = {
width: `${item.formAttribute.width}%`
......@@ -297,7 +312,7 @@ export default {
// 缺失模板不渲染
if (!formTemplate || !formTemplate.jsonData) return;
const template = jsonStrToObject(formTemplate.jsonData);
const templateFormData = formData && formData.jsonData ? JSON.parse(formData.jsonData) : null;
const templateFormData = formData && formData.jsonData ? jsonStrToObject(formData.jsonData) : null;
if (template) {
// 模板
let subfieldModuleListTemplate = template.subfieldModuleList;
......@@ -394,10 +409,15 @@ export default {
}
},
cancelModify() {
this.comProjectDetailInfo = JSON.parse(JSON.stringify(this.oldComProjectDetailInfo));
async cancelModify() {
try {
await this.$nextTick();
this.$refs["customDesignFormTemplate"].clearValidate();
this.comProjectDetailInfo = cloneDeep(this.oldComProjectDetailInfo);
this.$set(this.form, "subfieldModuleList", cloneDeep(this.oldSubfieldModuleList));
} catch (error) {
}
},
async searchConsulting(keywords) {
try {
......@@ -508,7 +528,7 @@ export default {
const customFormParamsData = {
projectKey: this.projectKey,
templateId: this.formTemplate.templateId,
jsonData: JSON.stringify(customFormData)
jsonData: serialize(customFormData)
};
// 处理自定义表单数据
this.$emit("editComProjectDetailSuccess", paramsData, customFormParamsData);
......@@ -608,10 +628,9 @@ export default {
&.is-error {
.el-form-item__content {
.el-input {
.el-textarea__inner,
.el-input__inner {
border-color: #ff4949;
}
border-color: #ff4949 !important;
}
}
}
......@@ -769,6 +788,7 @@ export default {
display: flex;
border: 1px solid #e6eaf1;
box-sizing: border-box;
align-self: flex-end;
.custom-item-key {
width: 180px;
min-height: 40px;
......
......@@ -127,13 +127,10 @@ export default {
if (result.code == 200 && customFormResult.code == 200) {
this.$message.success("更新咨询机构结算信息成功");
this.isModify = false;
this.$tab.closeOpenPage({
path: `/redirect/${"consultingOrgManagement/projectDetail"}`,
query: {
this.$tab.refershCurrent(this.projectDetailInfo.projectName, `/consultingOrgManagement/projectDetail`, {
projectKey: this.projectKey,
advisoryBodyCid: this.advisoryBodyCid ? this.advisoryBodyCid : data.advisoryBodyCid,
currentKey: "consultingAgency"
}
});
}
} catch (error) {
......
......@@ -68,7 +68,7 @@
import TableListCom from "@/components/TableListCom";
import Skeleton from "@/components/Skeleton";
import { getConsultingOrgEenterpriseListWithSearchApi } from "@/api/consultingOrgManagement";
import { queryConditionFiltering } from "@/utils";
import { queryConditionFiltering, replaceDomTags } from "@/utils";
import { v4 } from 'uuid';
import { encodeStr } from "@/assets/js/common";
export default {
......@@ -139,7 +139,7 @@ export default {
},
toCooperateDetail(row) {
if (!row.advisoryBodyCid) return this.$message.warning("缺少咨询机构id");
this.$tab.openPage(`${row.advisoryBodyName}合作明细`, `/consultingOrgManagement/detailsOfCooperation/${row.advisoryBodyCid}`);
this.$tab.openPage(`${row.advisoryBodyName}合作明细`, `/enterprise/${encodeStr(row.advisoryBodyCid)}?path=cooperationRecord&companyName=${replaceDomTags(row.advisoryBodyName)}`);
},
// 跳转到企业详情
viewEnterprise(row) {
......
......@@ -127,7 +127,7 @@ import DskAmountRange from "@/components/DskAmountRange";
import DskTableHeaderSetting from "@/components/DskTableHeaderSetting";
import TableListCom from "@/components/TableListCom";
import Skeleton from "@/components/Skeleton";
import { getConsultingOrgProjectListWithSearchApi } from "@/api/consultingOrgManagement";
import { getConsultingOrgProjectListWithSearchApi, getProjectUndertakingTypesApi } from "@/api/consultingOrgManagement";
import { queryConditionFiltering } from "@/utils";
import { v4 } from 'uuid';
import { encodeStr } from "@/assets/js/common.js";
......@@ -199,16 +199,7 @@ export default {
rules: {
},
projectTypeOptions: [
{
value: "1",
label: "测试1"
},
{
value: "2",
label: "测试2"
}
],
projectTypeOptions: [],
engineeringCategoryOptions: [
{
value: "1",
......@@ -246,11 +237,22 @@ export default {
methods: {
async init() {
try {
await this.getProjectUndertakingTypes();
await this.getList(this.queryParams);
} catch (error) {
}
},
async getProjectUndertakingTypes() {
try {
const result = await getProjectUndertakingTypesApi();
if (result.code == 200 && result?.data?.length) {
this.projectTypeOptions = result.data.map(item => ({ value: item, label: item }));
}
} catch (error) {
}
},
// 创建最终查询条件
mergeCondition() {
const _queryParams = JSON.parse(JSON.stringify(this.queryParams));
......@@ -354,7 +356,7 @@ export default {
},
// 业主单位跳转企业详情
viewOwnerUnit(row) {
this.$tab.openPage(row.ownerName ? row.ownerName : "业主单位详情", `/enterprise/${encodeStr(row.ownerUnitCid)}?companyName=${row.ownerName}`);
}
},
}
......
......@@ -51,6 +51,8 @@ import mixin from '@/views/detail/party-a/mixins/mixin';
import { getCooperativeOwnerUnitsListApi, getCooperativeOwnerUnitsDetailApi, getCooperativeOwnerUnitsOptionsApi, getCooperativeOwnerUnitsCountAmountApi } from "@/api/consultingTransaction";
import DialogHeadFormNew from "../component/HeadFormNew";
import DialogTables from "../component/Tables";
import { replaceDomTags } from "@/utils";
import { encodeStr } from "@/assets/js/common";
export default {
name: "cooperativeConstructionUnit",
mixins: [mixin],
......@@ -240,7 +242,9 @@ export default {
}
},
viewEnterprise(row) {
this.$tab.openPage(`${replaceDomTags(row.companyName)}详情`, `/enterprise/${encodeStr(row.companyId)}`, {
companyName: replaceDomTags(row.companyName)
});
},
async sortChange({ column, order, prop }) {
let sort = null;
......
......@@ -93,6 +93,8 @@ import { getCooperativeOwnerUnitsListApi, getCooperativeOwnerUnitsDetailApi, get
import DialogHeadFormNew from "../component/HeadFormNew";
import DialogTables from "../component/Tables";
import DskTabToggle from "@/components/DskTabToggle";
import { replaceDomTags } from "@/utils";
import { encodeStr } from "@/assets/js/common";
export default {
name: "cooperativeGroup",
mixins: [mixin],
......@@ -217,7 +219,10 @@ export default {
const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]];
optionsKey.forEach(([key, value]) => {
this.$set(this.formData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]);
const _temp = this.formData.find(formItem => value == formItem.fieldName);
if (_temp) {
this.$set(_temp, "options", this.selectOptions[key]);
}
});
}
} catch (error) {
......@@ -305,7 +310,7 @@ export default {
}
},
viewEnterprise(row) {
// this.$router.push(`/enterprise/${encodeStr(row.companyId)}?companyName=${replaceDomTags(row.companyName)}`);
},
async sortChange({ column, order, prop }) {
let sort = null;
......
......@@ -51,6 +51,8 @@ import mixin from '@/views/detail/party-a/mixins/mixin';
import { getCooperativeOwnerUnitsListApi, getCooperativeOwnerUnitsDetailApi, getCooperativeOwnerUnitsOptionsApi, getCooperativeOwnerUnitsCountAmountApi } from "@/api/consultingTransaction";
import DialogHeadFormNew from "../component/HeadFormNew";
import DialogTables from "../component/Tables";
import { replaceDomTags } from "@/utils";
import { encodeStr } from "@/assets/js/common";
export default {
name: "cooperativeOwnerUnits",
mixins: [mixin],
......@@ -240,7 +242,10 @@ export default {
}
},
viewEnterprise(row) {
// this.$router.push(`/enterprise/${encodeStr(row.companyId)}?companyName=${replaceDomTags(row.companyName)}`);
this.$tab.openPage(`${replaceDomTags(row.companyName)}详情`, `/enterprise/${encodeStr(row.companyId)}`, {
companyName: replaceDomTags(row.companyName)
});
},
async sortChange({ column, order, prop }) {
let sort = null;
......
......@@ -64,7 +64,7 @@
<!-- 2、准入情况 -->
<access-condition v-if="currentPath.pathName=='accessCondition'" :company-id="companyId" :companyInfo="companyInfo"></access-condition>
<!-- 3、供应商合作记录 -->
<cooperation-record v-if="currentPath.pathName=='cooperationRecord'" :company-id="companyId"></cooperation-record>
<cooperation-record v-if="currentPath.pathName=='cooperationRecord'" :company-id="companyId" :company-name="companyName"></cooperation-record>
</template>
<template v-if="customerId && isCustomer">
<!-- 商务信息 -->
......@@ -277,8 +277,8 @@ export default {
if (this.$route.params.id) { // 获取companyId
let companyId = this.$route.params.id;
// 有企业名的情况下带上企业名称
let companyName = this.$route.query.companyName;
await this.getCompanyId(companyId, companyName);
this.companyName = this.$route.query.companyName ? this.$route.query.companyName : "";
await this.getCompanyId(companyId);
}
} catch (error) {
console.log(error);
......@@ -288,8 +288,7 @@ export default {
this.currentPath = e;
},
// 解密
async getCompanyId(companyId, companyName = "") {
if (companyName) this.companyName = companyName;
async getCompanyId(companyId) {
let { data } = await idRemark({ mark: companyId });
if (data) {
this.companyId = data;
......@@ -298,7 +297,6 @@ export default {
await this.getStatistic(this.companyName);
await this.handleQuery();
await this.association(this.$route.query.customerId);
console.log(this.$refs.sidebar,"sidebar");
this.$refs.sidebar.getFinancial(data);
}
},
......
......@@ -57,15 +57,15 @@ export default {
},
forData: [
{ label: '项目列表', prop: 'projectName', width: '222', slot: true, showOverflowTooltip: true },
{ label: '项目编码', prop: 'projectCode', width: '123' },
{ label: '省市', prop: 'provinceName', minWidth: '110', slot: true },
{ label: '项目承接类型', prop: 'isinvestproject', width: '102', showOverflowTooltip: true },
{ label: '工程基础大类', prop: 'projectType1', width: '98', showOverflowTooltip: true },
{ label: '工程类别明细', prop: 'projectType', width: '98', showOverflowTooltip: true },
{ label: '项目负责人姓名', prop: 'projectLeader', width: '110' },
{ label: '项目负责人专业', prop: 'projectLeaderMajor', width: "110" },
{ label: '项目负责人联系电话', prop: 'projectLeaderPhone', width: "135" },
{ label: '合同金额(元)', prop: 'contractOrigValue', width: "110", align: "right" },
{ label: '项目编码', prop: 'projectCode', width: '140' },
{ label: '省市', prop: 'provinceName', minWidth: '140', slot: true },
{ label: '项目承接类型', prop: 'isinvestproject', width: '120', showOverflowTooltip: true },
{ label: '工程基础大类', prop: 'projectType1', width: '120', showOverflowTooltip: true },
{ label: '工程类别明细', prop: 'projectType', width: '120', showOverflowTooltip: true },
{ label: '项目负责人姓名', prop: 'projectLeader', width: '120' },
{ label: '项目负责人专业', prop: 'projectLeaderMajor', width: "120" },
{ label: '项目负责人联系电话', prop: 'projectLeaderPhone', width: "160" },
{ label: '合同金额(元)', prop: 'contractOrigValue', width: "160", align: "right" },
{ label: '业主单位', prop: 'ownerName', slot: true, width: "185", showOverflowTooltip: true },
{ label: '项目承接单位', prop: 'contractOrgName', width: "196", slot: true },
{ label: '咨询机构名称', prop: 'advisoryBodyName', width: "172", slot: true },
......
......@@ -47,11 +47,12 @@ export default {
DialogHeadFormNew,
DialogTables
},
props: ['companyId'],
props: ['companyId', "companyName"],
data() {
return {
queryParams: {
customerId: this.companyId,
companyName: this.companyName,
pageNum: 1,
pageSize: 10,
},
......
<template>
<div class="project-cost-ledger-container">
<div class="project-cost-ledger-inner">
</div>
</div>
</template>
<script>
export default {
name: 'projectCostLedger'
}
</script>
export default {
name: "projectCostLedger",
data() {
return {
};
},
//可访问data属性
created() {
<style scoped>
},
//计算集
computed: {
},
//方法集
methods: {
},
}
</script>
<style lang="scss" scoped>
.project-cost-ledger-container {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 16px 24px;
.project-cost-ledger-inner {
width: 100%;
height: 100%;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment