a2ed46ba by lxs

Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop

2 parents b65aa437 d109e7f6
...@@ -428,6 +428,15 @@ export const getApiDetail = (params) => request({ ...@@ -428,6 +428,15 @@ export const getApiDetail = (params) => request({
428 method: 'get', 428 method: 'get',
429 }) 429 })
430 430
431 // 跨服务调加工交付接口 获取API调用次数
432 export const getApiInvokeCount = (data) => request({
433 // url: `http://localhost:9000/delivery/ms-daop-jgjf-data-open-service/home-page/dam/call-api-stat`,
434 url: `http://192.168.6.22:29900/delivery/ms-daop-jgjf-data-open-service/home-page/dam/call-api-stat`,
435 method: 'post',
436 data
437 })
438
439
431 // export const getTenantInfo = (params) => request({ 440 // export const getTenantInfo = (params) => request({
432 // // url: `${import.meta.env.VITE_APP_PERSONAL_URL}/tenant/getByGuid/${params}`, 441 // // url: `${import.meta.env.VITE_APP_PERSONAL_URL}/tenant/getByGuid/${params}`,
433 // // url: `http://localhost:9000/circulation/ms-data-circulation-portal-service/enterprise/detail-by-name`, 442 // // url: `http://localhost:9000/circulation/ms-data-circulation-portal-service/enterprise/detail-by-name`,
......
...@@ -12,7 +12,6 @@ export const getEntryList = (params) => request({ ...@@ -12,7 +12,6 @@ export const getEntryList = (params) => request({
12 export const deleteEntryAll = (params) => request({ 12 export const deleteEntryAll = (params) => request({
13 url: `${import.meta.env.VITE_API_NEW_PORTAL}/da-intable/delete?guid=${params}`, 13 url: `${import.meta.env.VITE_API_NEW_PORTAL}/da-intable/delete?guid=${params}`,
14 method: 'delete', 14 method: 'delete',
15 data: params
16 }) 15 })
17 /** 获取资产入表信息新增 */ 16 /** 获取资产入表信息新增 */
18 export const createEntry = (params) => request({ 17 export const createEntry = (params) => request({
...@@ -34,6 +33,12 @@ export const getDocumentList = (params) => request({ ...@@ -34,6 +33,12 @@ export const getDocumentList = (params) => request({
34 method: 'post', 33 method: 'post',
35 data: params 34 data: params
36 }) 35 })
36 /**资产详情 */
37 export const getAssetDetail = (data) => request({
38 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/intable/get-table-select`,
39 method: 'post',
40 data
41 })
37 42
38 /** 资产融资管理 */ 43 /** 资产融资管理 */
39 /** 获取资产融资信息列表 */ 44 /** 获取资产融资信息列表 */
......
1 <script lang="ts" setup> 1 <script lang="ts" setup>
2 import { ref} from "vue"; 2 import { ref } from "vue";
3 import {ElMessage} from "element-plus" 3 import { ElMessage } from "element-plus"
4 import PageNav from "@/components/PageNav/index.vue"; 4 import PageNav from "@/components/PageNav/index.vue";
5 import dayjs from "dayjs"; 5 import dayjs from "dayjs";
6 const props = defineProps({ 6 const props = defineProps({
7 tableInfo:{ 7 tableInfo: {
8 type:Object, 8 type: Object,
9 default:{} as any, 9 default: {} as any,
10 }, 10 },
11 colums:{ 11 colums: {
12 type:Array<any>, 12 type: Array<any>,
13 default:[], 13 default: [],
14 }, 14 },
15 columnInfo:{ 15 columnInfo: {
16 type:Object, 16 type: Object,
17 default:{} as any, 17 default: {} as any,
18 }, 18 },
19 page:{ 19 page: {
20 type:Object, 20 type: Object,
21 default:{} as any, 21 default: {} as any,
22 }, 22 },
23 }) 23 })
24 24
25 const colums = computed(() => { 25 const colums = computed(() => {
26 return props.colums 26 return props.colums
27 }) 27 })
28 const tableDataLoading = computed(() => { 28 const tableDataLoading = computed(() => {
29 return props?.tableInfo?.loading; 29 return props?.tableInfo?.loading;
30 }); 30 });
31 const data = computed(() => props?.tableInfo?.data) 31 const data = computed(() => props?.tableInfo?.data)
32 const tableInfo = computed(() => props?.tableInfo || {}) 32 const tableInfo = computed(() => props?.tableInfo || {})
33 const columnInfo = ref({...props?.columnInfo?.value}) 33 const columnInfo = ref({ ...props?.columnInfo?.value })
34 const isEdit = computed(()=>props?.tableInfo?.isEdit) 34 const isEdit = computed(() => props?.tableInfo?.isEdit)
35 const flag = computed(()=>props?.tableInfo?.flag) 35 const flag = computed(() => props?.tableInfo?.flag)
36 const page = computed(()=> props?.page) 36 const page = computed(() => props?.page)
37 const emits = defineEmits(["pageChange","columnSave","columnCancel","columnDel","columnEdit","handelSelect","handelInput","searchSelect","selectScroll"]) 37 const emits = defineEmits(["pageChange", "columnSave", "columnCancel", "columnDel", "columnEdit", "handelSelect", "handelInput", "searchSelect", "selectScroll"])
38 38
39 const selectRef = ref() 39 const selectRef = ref()
40 const columnEdit = (row) => { 40 const columnEdit = (row) => {
41 if(!tableInfo.value.isEdit){ 41 if (!tableInfo.value.isEdit) {
42 columnInfo.value = {...row} 42 columnInfo.value = { ...row }
43 43
44 emits("columnEdit",{...row}) 44 emits("columnEdit", { ...row })
45 } 45 }
46 46
47 } 47 }
48 const columnDel = (row) => { 48 const columnDel = (row) => {
49 if(!tableInfo.value.isEdit){ 49 if (!tableInfo.value.isEdit) {
50 columnInfo.value = {...row} 50 columnInfo.value = { ...row }
51 emits("columnDel",{...row}) 51 emits("columnDel", { ...row })
52 } 52 }
53 53
54 } 54 }
55 const columnDel1 = (row) => { 55 const columnDel1 = (row) => {
56 //columnInfo.value = {} 56 //columnInfo.value = {}
57 columnInfo.value = {...row} 57 columnInfo.value = { ...row }
58 emits("columnDel",{...row}) 58 emits("columnDel", { ...row })
59 59
60 } 60 }
61 const columnSave = (row) => { 61 const columnSave = (row) => {
62 emits("columnSave",{...columnInfo.value}) 62 emits("columnSave", { ...columnInfo.value })
63 } 63 }
64 const columnCancel = (row) => { 64 const columnCancel = (row) => {
65 columnInfo.value = {} 65 columnInfo.value = {}
...@@ -67,150 +67,121 @@ const columnCancel = (row) => { ...@@ -67,150 +67,121 @@ const columnCancel = (row) => {
67 } 67 }
68 const pageChange = (page) => { 68 const pageChange = (page) => {
69 let info = { ...page }; 69 let info = { ...page };
70 emits("pageChange",info) 70 emits("pageChange", info)
71 } 71 }
72 const handelSelect = (value,item,row) => { 72 const handelSelect = (value, item, row) => {
73 const selectOption = item.selectOption() 73 const selectOption = item.selectOption()
74 const optionItem = selectOption.find(option=> option[item.selectKey]===value ) 74 const optionItem = selectOption.find(option => option[item.selectKey] === value)
75 console.log(optionItem) 75 console.log(optionItem)
76 emits("handelSelect",{...optionItem},item.prop,row) 76 emits("handelSelect", { ...optionItem }, item.prop, row)
77 } 77 }
78 const searchSelect = (value) => { 78 const searchSelect = (value) => {
79 emits("searchSelect",value) 79 emits("searchSelect", value)
80 } 80 }
81 const secectClick = (value) => { 81 const secectClick = (value) => {
82 emits("handelSelect",value) 82 emits("handelSelect", value)
83 } 83 }
84 const selectInput = (value) => { 84 const selectInput = (value) => {
85 emits("searchSelect",value) 85 emits("searchSelect", value)
86 } 86 }
87 const selectScroll = () => { 87 const selectScroll = () => {
88 emits("selectScroll") 88 emits("selectScroll")
89 } 89 }
90 const numberChange = (value,key,fn) => { 90 const numberChange = (value, key, fn) => {
91 //console.log(value,key,fn) 91 //console.log(value,key,fn)
92 const value1 = fn(value,key) 92 const value1 = fn(value, key)
93 //console.log(value1) 93 //console.log(value1)
94 //columnInfo.value[key] = columnInfo.value[key].toString().slice(0,12) 94 //columnInfo.value[key] = columnInfo.value[key].toString().slice(0,12)
95 //const string = columnInfo.value[key] 95 //const string = columnInfo.value[key]
96 // console.log(columnInfo.value[key]) 96 // console.log(columnInfo.value[key])
97 } 97 }
98 const numberChange1 = (value,key,fn) => { 98 const numberChange1 = (value, key, fn) => {
99 const value1 = fn && fn(value,key) 99 const value1 = fn && fn(value, key)
100 } 100 }
101 const numberWidthCommas = (num) => { 101 const numberWidthCommas = (num) => {
102 if (num == null) { 102 if (num == null) {
103 return '--' 103 return '--'
104 } 104 }
105 let parts = num.toFixed(2).split(".") 105 let parts = num.toFixed(2).split(".")
106 parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g,",") 106 parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",")
107 return parts.join(".") 107 return parts.join(".")
108 } 108 }
109 defineExpose({ 109 defineExpose({
110 columnInfo, 110 columnInfo,
111 selectRef 111 selectRef
112 }) 112 })
113 </script> 113 </script>
114 114
115 <template> 115 <template>
116 <div class="table_panel" style="height: 100%;"> 116 <div class="table_panel" style="height: 100%;">
117 <el-table 117 <el-table :data="data" v-loading="tableDataLoading" height="100%" tooltip-effect="light"
118 :data="data" 118 max-height="calc(100% - 44px)" :style="{ 'min-height': 'calc(100% - 44px)', }" border>
119 v-loading="tableDataLoading" 119 <el-table-column v-for="item in colums" :prop="item?.prop" :type="item?.type" :align="item.align || 'left'"
120 height="100%" 120 :label="item.label" :width="item.width" :show-overflow-tooltip="true" :key="item.prop">
121 tooltip-effect="light" 121 <template #default="{ row }">
122 max-height="calc(100% - 44px)" 122 <template v-if="item.componentType === 'dateTime' && row.guid === tableInfo.currentId && !item.type">
123 :style="{ 'min-height':'calc(100% - 44px)', }" 123 <el-date-picker v-model="columnInfo[item.prop]" type="date" placeholder="选择日期"
124 border 124 :disabled="item.componentDisabled === false ? item.componentDisabled : true" size="small">
125 > 125 </el-date-picker>
126 <el-table-column 126 </template>
127 v-for="item in colums" 127 <template v-else-if="item.componentType === 'dateTime' && row.guid != tableInfo.currentId && !item.type">
128 :prop="item?.prop" 128 {{ !row[item.prop] ? '--' : dayjs(row[item.prop]).format("YYYY-MM-DD") }}
129 :type="item?.type" 129 </template>
130 :align="item.align || 'left' " 130 <template v-else-if="item.componentType === 'number' && row.guid === tableInfo.currentId && !item.type">
131 :label="item.label" 131 <div class="price">
132 :width="item.width" 132 <el-input size="small" style="width: 100%;" v-model="columnInfo[item.prop]"
133 :show-overflow-tooltip="true" 133 @input="numberChange($event, item.prop, item.input)"
134 :key="item.prop"> 134 @change="numberChange1($event, item.prop, item.change)" v-bind="item.config || {}"
135 <template #default="{ row }"> 135 :placeholder="item.placeholder">
136 <template v-if="item.componentType==='dateTime' && row.guid===tableInfo.currentId && !item.type"> 136 </el-input>
137 <el-date-picker 137 <span>{{ item.propType }}</span>
138 v-model="columnInfo[item.prop]" 138 </div>
139 type="date" 139 </template>
140 placeholder="选择日期" 140 <template
141 :disabled="item.componentDisabled===false ? item.componentDisabled : true" 141 v-else-if="item.componentType === 'number' && row.guid != tableInfo.currentId && !item.type && item.toFixed">
142 size="small" 142 {{ numberWidthCommas(row[item.prop]) }} {{ item.propType }}
143 >
144 </el-date-picker>
145 </template>
146 <template v-else-if="item.componentType==='dateTime' && row.guid!=tableInfo.currentId && !item.type">
147 {{ !row[item.prop] ? '--' : dayjs(row[item.prop]).format("YYYY-MM-DD")}}
148 </template>
149 <template v-else-if="item.componentType==='number' && row.guid===tableInfo.currentId && !item.type">
150 <div class="price">
151 <el-input size="small" style="width: 100%;"
152 v-model="columnInfo[item.prop]"
153 @input="numberChange($event,item.prop,item.input)"
154 @change="numberChange1($event,item.prop,item.change)"
155 v-bind="item.config || {}" :placeholder="item.placeholder">
156 </el-input>
157 <span>{{ item.propType }}</span>
158 </div>
159 </template>
160 <template v-else-if="item.componentType==='number' && row.guid!=tableInfo.currentId && !item.type &&item.toFixed">
161 {{ numberWidthCommas(row[item.prop]) }} {{ item.propType }}
162 </template>
163 <template v-else-if="item.componentType==='number'&&row.guid!=tableInfo.currentId && !item.type && !item.toFixed">
164 {{ row[item.prop] }}
165 </template>
166 <template v-else-if="item.componentType==='select' && row.guid===tableInfo.currentId && !item.type">
167 <el-select
168 v-model="columnInfo[item.prop]"
169 filterable
170 :disabled="item?.editDisabled ? item?.editDisabled() : false"
171 @change="handelSelect($event,item,row)"
172 size="small"
173 placeholder="请选择"
174 >
175 <el-option
176 v-for="option in item.selectOption()"
177 :key="option"
178 :label="option[item.selectKey]"
179 :value="option[item.selectKey]">
180 </el-option>
181 </el-select>
182 </template>
183 <template v-else-if="item.componentType !=='dateTime' && item.componentType !=='number' && row.guid===tableInfo.currentId && !item.type">
184 <el-input
185 v-model="columnInfo[item.prop]"
186 style="width: 100%;"
187 placeholder="请输入内容"
188 size="small"
189 :disabled="item.componentDisabled===false ? item.componentDisabled : true"
190 ></el-input>
191 </template>
192 </template>
193
194 </el-table-column>
195 <el-table-column label="操作" width="160px" fixed="right">
196 <template #default="{ row }">
197 <template v-if="row.guid === tableInfo.currentId">
198 <span class=" operate_btn active" @click="columnSave(row)">保存</span>
199 <span class="operate_btn active" @click="columnCancel(row)" >取消</span>
200 <span class="operate_btn active" v-if="flag==='edit'" @click="columnDel1(row)" >删除</span>
201 </template>
202 <template v-else>
203 <span class=" operate_btn active" :class="[isEdit ? 'disabled':'' ]" @click="columnEdit(row)">编辑</span>
204 <span class="operate_btn active" :class="[isEdit ? 'disabled':'' ]" @click="columnDel(row)" >删除</span>
205 </template>
206 </template> 143 </template>
207 </el-table-column> 144 <template
208 </el-table> 145 v-else-if="item.componentType === 'number' && row.guid != tableInfo.currentId && !item.type && !item.toFixed">
209 <PageNav 146 {{ row[item.prop] }}
210 :pageInfo="page" 147 </template>
211 @pageChange="pageChange" 148 <template v-else-if="item.componentType === 'select' && row.guid === tableInfo.currentId && !item.type">
212 /> 149 <el-select v-model="columnInfo[item.prop]" filterable
213 </div> 150 :disabled="item?.editDisabled ? item?.editDisabled() : false" @change="handelSelect($event, item, row)"
151 size="small" placeholder="请选择">
152 <el-option v-for="option in item.selectOption()" :key="option" :label="option[item.selectKey]"
153 :value="option[item.selectKey]">
154 </el-option>
155 </el-select>
156 </template>
157 <template
158 v-else-if="item.componentType !== 'dateTime' && item.componentType !== 'number' && row.guid === tableInfo.currentId && !item.type">
159 <el-input v-model="columnInfo[item.prop]" style="width: 100%;" placeholder="请输入内容" size="small"
160 :disabled="item.componentDisabled === false ? item.componentDisabled : true"></el-input>
161 </template>
162 <template
163 v-else-if="item.componentType !== 'dateTime' && item.componentType !== 'number' && row.guid != tableInfo.currentId && !item.type">
164 {{ row[item.prop] ? row[item.prop] : '--' }}
165 </template>
166 </template>
167
168 </el-table-column>
169 <el-table-column label="操作" width="160px" fixed="right">
170 <template #default="{ row }">
171 <template v-if="row.guid === tableInfo.currentId">
172 <span class=" operate_btn active" @click="columnSave(row)">保存</span>
173 <span class="operate_btn active" @click="columnCancel(row)">取消</span>
174 <span class="operate_btn active" v-if="flag === 'edit'" @click="columnDel1(row)">删除</span>
175 </template>
176 <template v-else>
177 <span class=" operate_btn active" :class="[isEdit ? 'disabled' : '']" @click="columnEdit(row)">编辑</span>
178 <span class="operate_btn active" :class="[isEdit ? 'disabled' : '']" @click="columnDel(row)">删除</span>
179 </template>
180 </template>
181 </el-table-column>
182 </el-table>
183 <PageNav :pageInfo="page" @pageChange="pageChange" />
184 </div>
214 </template> 185 </template>
215 186
216 187
...@@ -243,16 +214,16 @@ defineExpose({ ...@@ -243,16 +214,16 @@ defineExpose({
243 } 214 }
244 215
245 .input_comb { 216 .input_comb {
246 > span:not(:last-child) { 217 >span:not(:last-child) {
247 margin-right: 12px; 218 margin-right: 12px;
248 219
249 > span { 220 >span {
250 margin-right: 4px; 221 margin-right: 4px;
251 } 222 }
252 } 223 }
253 224
254 > span:last-child { 225 >span:last-child {
255 > span { 226 >span {
256 margin-right: 4px; 227 margin-right: 4px;
257 } 228 }
258 } 229 }
...@@ -266,7 +237,7 @@ defineExpose({ ...@@ -266,7 +237,7 @@ defineExpose({
266 padding-right: 4px; 237 padding-right: 4px;
267 position: relative; 238 position: relative;
268 239
269 & ~ .active { 240 &~.active {
270 padding-left: 4px; 241 padding-left: 4px;
271 margin-left: 1px; 242 margin-left: 1px;
272 243
...@@ -288,13 +259,15 @@ defineExpose({ ...@@ -288,13 +259,15 @@ defineExpose({
288 } 259 }
289 } 260 }
290 } 261 }
291 .disabled {
292 color: #BDBDBD !important;
293 cursor: not-allowed;
294 }
295 .price {
296 display: flex;
297 align-items: center;
298 justify-content: space-between;
299 }
300 </style>
...\ No newline at end of file ...\ No newline at end of file
262
263 .disabled {
264 color: #BDBDBD !important;
265 cursor: not-allowed;
266 }
267
268 .price {
269 display: flex;
270 align-items: center;
271 justify-content: space-between;
272 }
273 </style>
......
...@@ -11,7 +11,8 @@ import { ...@@ -11,7 +11,8 @@ import {
11 deleteEntryAll, 11 deleteEntryAll,
12 createEntry, 12 createEntry,
13 intableUpdate, 13 intableUpdate,
14 getDocumentList 14 getDocumentList,
15 getAssetDetail
15 } from "@/api/modules/dataTransaction"; 16 } from "@/api/modules/dataTransaction";
16 import { getDamCatalogTable } from '@/api/modules/dataAsset'; 17 import { getDamCatalogTable } from '@/api/modules/dataAsset';
17 const route = useRoute() 18 const route = useRoute()
...@@ -68,7 +69,8 @@ const columnInfo = ref({ ...@@ -68,7 +69,8 @@ const columnInfo = ref({
68 issuingEntityName: "", 69 issuingEntityName: "",
69 issuingEntityGuid: "", 70 issuingEntityGuid: "",
70 companyGuid: "", 71 companyGuid: "",
71 registerGuid: "" 72 registerGuid: "",
73 damGuid: ""
72 }) 74 })
73 const companyOption = ref<any>([ 75 const companyOption = ref<any>([
74 { 76 {
...@@ -95,6 +97,16 @@ const colums = [ ...@@ -95,6 +97,16 @@ const colums = [
95 selectOption: () => companyOption.value 97 selectOption: () => companyOption.value
96 }, 98 },
97 { 99 {
100 prop: "daName",
101 label: "资产名称",
102 width: "180",
103 componentType: "select",
104 componentDisabled: false,
105 //editDisabled:()=> tableInfo.value.flag==="edit" ? true :false,
106 selectOption: () => assetsOption.value,
107 selectKey: "daName",
108 },
109 {
98 prop: "intableTime", 110 prop: "intableTime",
99 label: "入表时间", 111 label: "入表时间",
100 width: "130", 112 width: "130",
...@@ -134,16 +146,7 @@ const colums = [ ...@@ -134,16 +146,7 @@ const colums = [
134 146
135 } 147 }
136 }, 148 },
137 { 149
138 prop: "daName",
139 label: "资产名称",
140 width: "180",
141 componentType: "select",
142 componentDisabled: false,
143 //editDisabled:()=> tableInfo.value.flag==="edit" ? true :false,
144 selectOption: () => assetsOption.value,
145 selectKey: "damName",
146 },
147 { 150 {
148 prop: "daCode", 151 prop: "daCode",
149 label: "资产编号", 152 label: "资产编号",
...@@ -190,13 +193,29 @@ const documentList = async () => { ...@@ -190,13 +193,29 @@ const documentList = async () => {
190 193
191 return Promise.resolve() 194 return Promise.resolve()
192 } 195 }
196 // const params = {
197 // daName: row.damName,
198 // type: 1,
199 // companyGuid: row.tenantGuid,
200 // isCompany: true
201 // }
202 // getAssetDetail(params).then((res: any) => {
203 // if (res?.code === proxy.$passCode) {
204 // console.log(res.data, '--123-')
205
206 // }
207 // })
193 // 查资产 208 // 查资产
194 const getAssetsList = async () => { 209 const getAssetsList = async (values, row,) => {
195 const res = await getDamCatalogTable({ 210 console.log(values, row, '--查资产-')
196 pageSize: -1, 211 const params = {
197 pageIndex: 1, 212 daName: '',
198 }) 213 type: 1,
199 assetsOption.value = res.data.records || [] 214 companyGuid: values?.tenantGuid || row.companyGuid,
215 isCompany: true
216 }
217 const res = await getAssetDetail(params)
218 assetsOption.value = res.data || []
200 console.log(assetsOption.value, '---') 219 console.log(assetsOption.value, '---')
201 return Promise.resolve() 220 return Promise.resolve()
202 } 221 }
...@@ -236,7 +255,8 @@ const createOneData = () => { ...@@ -236,7 +255,8 @@ const createOneData = () => {
236 intableMoney: 0, 255 intableMoney: 0,
237 issuingEntityName: "", 256 issuingEntityName: "",
238 companyGuid: "", 257 companyGuid: "",
239 registerGuid: "" 258 registerGuid: "",
259 damGuid: ""
240 }) 260 })
241 //tableInfo.value.data = arr 261 //tableInfo.value.data = arr
242 tableInfo.value.currentId = BASE_ID 262 tableInfo.value.currentId = BASE_ID
...@@ -302,7 +322,7 @@ const columnSave = async (row) => { ...@@ -302,7 +322,7 @@ const columnSave = async (row) => {
302 ElMessage.success(`${tableInfo.value.flag === 'create' ? '新增' : '修改'}成功`); 322 ElMessage.success(`${tableInfo.value.flag === 'create' ? '新增' : '修改'}成功`);
303 getTableData() 323 getTableData()
304 columnInfoReset() 324 columnInfoReset()
305 documentList() 325 // documentList()
306 findTab(false) 326 findTab(false)
307 tableRef.value.columnInfo = {} 327 tableRef.value.columnInfo = {}
308 } else { 328 } else {
...@@ -326,7 +346,8 @@ const columnInfoReset = () => { ...@@ -326,7 +346,8 @@ const columnInfoReset = () => {
326 issuingEntityName: "", 346 issuingEntityName: "",
327 issuingEntityGuid: "", 347 issuingEntityGuid: "",
328 companyGuid: "", 348 companyGuid: "",
329 registerGuid: "" 349 registerGuid: "",
350 damGuid: ""
330 } 351 }
331 } 352 }
332 const columnEdit = (row) => { 353 const columnEdit = (row) => {
...@@ -376,12 +397,24 @@ const handelSelect = (row, key, row1) => { ...@@ -376,12 +397,24 @@ const handelSelect = (row, key, row1) => {
376 tableRef.value.columnInfo.effectiveDate = "" 397 tableRef.value.columnInfo.effectiveDate = ""
377 } else { 398 } else {
378 if (tableInfo.value.flag === "create") { 399 if (tableInfo.value.flag === "create") {
379 console.log(row, '-----') 400 console.log(row, '--create---')
401 // const params = {
402 // daName: row.damName,
403 // type: 1,
404 // companyGuid: row.tenantGuid,
405 // isCompany: true
406 // }
407 // getAssetDetail(params).then((res: any) => {
408 // if (res?.code === proxy.$passCode) {
409 // console.log(res.data, '--123-')
410
411 // }
412 // })
380 const currentDate = dayjs().format('YYYY-MM-DD'); 413 const currentDate = dayjs().format('YYYY-MM-DD');
381 columnInfo.value = { 414 columnInfo.value = {
382 guid: row.guid, 415 guid: row.guid,
383 companyName: row.rightMainName, 416 companyName: row.tenantName,
384 daName: row.damName, 417 daName: row.daName,
385 registerTime: row.registerTime, 418 registerTime: row.registerTime,
386 daCode: row.daCode, 419 daCode: row.daCode,
387 effectiveDate: row.effectiveDate, 420 effectiveDate: row.effectiveDate,
...@@ -390,7 +423,8 @@ const handelSelect = (row, key, row1) => { ...@@ -390,7 +423,8 @@ const handelSelect = (row, key, row1) => {
390 issuingEntityName: row.issuingEntityName, 423 issuingEntityName: row.issuingEntityName,
391 issuingEntityGuid: row.issuingEntityGuid, 424 issuingEntityGuid: row.issuingEntityGuid,
392 companyGuid: row.tenantGuid, 425 companyGuid: row.tenantGuid,
393 registerGuid: row.registerGuid 426 registerGuid: row.registerGuid,
427 damGuid: row.damGuid
394 } 428 }
395 const { guid, ...obj } = columnInfo.value 429 const { guid, ...obj } = columnInfo.value
396 tableRef.value.columnInfo = obj 430 tableRef.value.columnInfo = obj
...@@ -401,6 +435,7 @@ const handelSelect = (row, key, row1) => { ...@@ -401,6 +435,7 @@ const handelSelect = (row, key, row1) => {
401 columnInfo.value.effectiveDate = row.effectiveDate 435 columnInfo.value.effectiveDate = row.effectiveDate
402 columnInfo.value.issuingEntityName = row.issuingEntityName 436 columnInfo.value.issuingEntityName = row.issuingEntityName
403 columnInfo.value.registerGuid = row.registerGuid; 437 columnInfo.value.registerGuid = row.registerGuid;
438 columnInfo.value.damGuid = row.damGuid;
404 tableRef.value.columnInfo = { ...columnInfo.value } 439 tableRef.value.columnInfo = { ...columnInfo.value }
405 } 440 }
406 441
...@@ -415,7 +450,8 @@ const findTab = (flag) => { ...@@ -415,7 +450,8 @@ const findTab = (flag) => {
415 tab.meta.editPage = flag 450 tab.meta.editPage = flag
416 } 451 }
417 const addAssetsOption = (values, row, flag = false) => { 452 const addAssetsOption = (values, row, flag = false) => {
418 getAssetsList().then(() => { 453 console.log(values, row, flag, '--新增-')
454 getAssetsList(values, row).then(() => {
419 const obj = { 455 const obj = {
420 costAccessmentGuid: null, 456 costAccessmentGuid: null,
421 daCode: row.daCode, 457 daCode: row.daCode,
...@@ -432,6 +468,7 @@ const addAssetsOption = (values, row, flag = false) => { ...@@ -432,6 +468,7 @@ const addAssetsOption = (values, row, flag = false) => {
432 state: row.state, 468 state: row.state,
433 tenantGuid: row.companyGuid, 469 tenantGuid: row.companyGuid,
434 tenantName: row.companyName, 470 tenantName: row.companyName,
471 damGuid: row.damGuid
435 } 472 }
436 const arr = assetsOption.value 473 const arr = assetsOption.value
437 if (values && values.tenantGuid === row.companyGuid) { 474 if (values && values.tenantGuid === row.companyGuid) {
......
...@@ -19,6 +19,7 @@ import useUserStore from "@/store/modules/user"; ...@@ -19,6 +19,7 @@ import useUserStore from "@/store/modules/user";
19 import Moment from "moment"; 19 import Moment from "moment";
20 import platformIndexNewBigScreen from "./platformIndexNewBigScreen.vue"; 20 import platformIndexNewBigScreen from "./platformIndexNewBigScreen.vue";
21 import { getDownFileSignByUrl, obsDownloadRequest, parseAndDecodeUrl } from "@/api/modules/obsService"; 21 import { getDownFileSignByUrl, obsDownloadRequest, parseAndDecodeUrl } from "@/api/modules/obsService";
22 import { getApiInvokeCount } from "@/api/modules/dataAsset";
22 // import platformIndex from "./data_asset/platformIndex.vue"; 23 // import platformIndex from "./data_asset/platformIndex.vue";
23 24
24 const router = useRouter(); 25 const router = useRouter();
...@@ -333,8 +334,8 @@ const financingTableInfo = ref({ ...@@ -333,8 +334,8 @@ const financingTableInfo = ref({
333 minHeight: '60px', 334 minHeight: '60px',
334 fields: [ 335 fields: [
335 { 336 {
336 label: "资产名称", 337 label: "产品名称",
337 field: "daName", 338 field: "apiName",
338 width: 140, 339 width: 140,
339 // type: "text_btn", 340 // type: "text_btn",
340 // columClass: 'text_btn', 341 // columClass: 'text_btn',
...@@ -342,24 +343,24 @@ const financingTableInfo = ref({ ...@@ -342,24 +343,24 @@ const financingTableInfo = ref({
342 }, 343 },
343 // { label: "授信日期", field: "creditGrantingTime", width: 110 }, 344 // { label: "授信日期", field: "creditGrantingTime", width: 110 },
344 { 345 {
345 label: "授信金额(万元)", 346 label: "调用次数",
346 field: "creditGrantingMoney", 347 field: "callApiCount",
347 width: 140, 348 width: 140,
348 align: "right", 349 align: "right",
349 getName: (scope) => { 350 // getName: (scope) => {
350 return changeNum(scope.row.creditGrantingMoney ?? 0, 2, true) + '万元'; 351 // return changeNum(scope.row.creditGrantingMoney ?? 0, 2, true) + '万元';
351 }, 352 // },
352 },
353 {
354 label: "授信期限(月)",
355 field: "creditGrantingTerm",
356 width: 90,
357 align: "right",
358 getName: (scope) => {
359 return changeNum(scope.row.creditGrantingTerm ?? 0) + '月';
360 },
361 }, 353 },
362 { label: "授信主体", field: "creditGrantingGenerality", minWidth: 100 }, 354 // {
355 // label: "授信期限(月)",
356 // field: "creditGrantingTerm",
357 // width: 90,
358 // align: "right",
359 // getName: (scope) => {
360 // return changeNum(scope.row.creditGrantingTerm ?? 0) + '月';
361 // },
362 // },
363 { label: "最近调用时间", field: "invokeStartTime", minWidth: 100 },
363 ], 364 ],
364 data: [], 365 data: [],
365 showPage: false, 366 showPage: false,
...@@ -369,18 +370,25 @@ const financingTableInfo = ref({ ...@@ -369,18 +370,25 @@ const financingTableInfo = ref({
369 loading1: false, 370 loading1: false,
370 }); 371 });
371 372
373 // 数据产品调用情况
374 // const getDataInfo = async () => {
375 // const params = {
376 // startTime: startTime.value || '',
377 // endTime: endTime.value || '',
378 // }
379 // const res: any = await getApiInvokeCount(params);
380 // }
372 const getFinancingTableData = () => { 381 const getFinancingTableData = () => {
373 financingTableInfo.value.loading1 = true; 382 financingTableInfo.value.loading1 = true;
374 getFinanceInfo({ 383 const params = {
375 pageSize: 200,
376 pageIndex: 1,
377 startTime: startTime.value || '', 384 startTime: startTime.value || '',
378 endTime: endTime.value || '', 385 endTime: endTime.value || '',
379 }).then((res: any) => { 386 }
387 getApiInvokeCount(params).then((res: any) => {
380 financingTableInfo.value.loading1 = false; 388 financingTableInfo.value.loading1 = false;
381 if (res.code == proxy.$passCode) { 389 if (res.code == proxy.$passCode) {
382 let data = res.data || {}; 390 let data = res.data || {};
383 financingTableInfo.value.data = data.records || []; 391 financingTableInfo.value.data = data || [];
384 } else { 392 } else {
385 ElMessage.error(res.msg); 393 ElMessage.error(res.msg);
386 } 394 }
...@@ -670,6 +678,9 @@ watch( ...@@ -670,6 +678,9 @@ watch(
670 handleChangeTime(daterange.value); 678 handleChangeTime(daterange.value);
671 }, 679 },
672 ); 680 );
681
682
683
673 const handleDatePickerChange = (val) => { 684 const handleDatePickerChange = (val) => {
674 // 更新开始时间和结束时间 685 // 更新开始时间和结束时间
675 startTime.value = val[0]; 686 startTime.value = val[0];
...@@ -695,6 +706,7 @@ const handleDatePickerChange = (val) => { ...@@ -695,6 +706,7 @@ const handleDatePickerChange = (val) => {
695 filterDate.value = ''; 706 filterDate.value = '';
696 }; 707 };
697 708
709
698 const startTime = ref() 710 const startTime = ref()
699 const endTime = ref() 711 const endTime = ref()
700 const handleChangeTime = (val) => { 712 const handleChangeTime = (val) => {
......
...@@ -35,7 +35,7 @@ const tableInfo = ref({ ...@@ -35,7 +35,7 @@ const tableInfo = ref({
35 fixedSelection: true, 35 fixedSelection: true,
36 fields: [ 36 fields: [
37 { label: "序号", type: "index", width: 56, align: "center" }, 37 { label: "序号", type: "index", width: 56, align: "center" },
38 { label: "数据产品编号", field: "label", width: 120, }, 38 // { label: "数据产品编号", field: "label", width: 120, },
39 { 39 {
40 label: "数据产品名称", field: "damName", width: 140, 40 label: "数据产品名称", field: "damName", width: 140,
41 }, 41 },
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!