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