|
|
@@ -13,16 +13,17 @@ export default history
|
|
|
|
|
|
// -------------------所有藏品详情 全部新页面打开-------------------
|
|
|
export const openGoodsInfoFu = (id: number, src?: string) => {
|
|
|
- window.open(src ? src : `/#/goodsLook/${id}`, '_blank')
|
|
|
+ const urlArr = window.location
|
|
|
+ const urlQian = urlArr.origin + urlArr.pathname
|
|
|
+
|
|
|
+ window.open(src ? urlQian + src + id : `${urlQian}#/goodsLook/${id}`, '_blank')
|
|
|
}
|
|
|
|
|
|
// -------------------级联回显-------------------
|
|
|
let dictAll: TypeZ1dict[] = []
|
|
|
export const resJiLianFu = (idTemp: string, isNull?: string) => {
|
|
|
if (idTemp) {
|
|
|
- if (dictAll && dictAll.length === 0) {
|
|
|
- dictAll = store.getState().Z1dict.dictAll
|
|
|
- }
|
|
|
+ dictAll = store.getState().Z1dict.dictAll
|
|
|
|
|
|
const idArr = idTemp.split(',')
|
|
|
const id = idArr[idArr.length - 1]
|
|
|
@@ -88,9 +89,7 @@ export const filterTreeByName = (tree: TypeZ1dict[], searchTemp: string): TypeZ1
|
|
|
// -------------------处理所属部门数据-------------------
|
|
|
let buMenTree: TypeZ4Tree[] = []
|
|
|
export const buMenRes = (list: any[]) => {
|
|
|
- if (buMenTree && buMenTree.length === 0) {
|
|
|
- buMenTree = store.getState().Z4organization.treeData
|
|
|
- }
|
|
|
+ buMenTree = store.getState().Z4organization.treeData
|
|
|
let arr = list.map((v: any) => ({
|
|
|
...v,
|
|
|
deptNameRes: v.deptId
|
|
|
@@ -339,9 +338,7 @@ export const ruTransformDataFu = (data: any[]): any[] => {
|
|
|
|
|
|
// ---------------所有级联的数据平铺-------------------
|
|
|
export const cascaderObjFu = (): any => {
|
|
|
- if (dictAll && dictAll.length === 0) {
|
|
|
- dictAll = store.getState().Z1dict.dictAll
|
|
|
- }
|
|
|
+ dictAll = store.getState().Z1dict.dictAll
|
|
|
|
|
|
let obj: any = {}
|
|
|
if (dictAll && dictAll.length) {
|