', props)
+ const changeAdd = () => {
+ console.log('子组件方法触发~')
+ }
const data = ref({
list: [],
})
@@ -409,6 +469,25 @@
}
data.value.list.push(item)
})
+ } else if (item.name === '归属部门') {
+ getDeptAll().then((res) => {
+ const dataList = []
+ res.data.data.forEach((element) => {
+ dataList.push({
+ value: element.id,
+ label: element.name,
+ })
+ })
+ item.options = dataList
+ if (!item.note1) {
+ getUserInfo().then(({ data: res1 }) => {
+ console.log(res1.data)
+ item.note1 = res1.data.deptId
+ console.log('默认部门=========>', item, res1.data)
+ data.value.list.push(item)
+ })
+ }
+ })
} else {
data.value.list.push(item)
}
@@ -521,56 +600,106 @@
const mockData = ref([])
const titles = ref(['未关联的应用名称', '已关联的应用名称'])
const titleName = ref('关联应用')
+ const targetKeys = ref([])
+ // 上一步关联数据
+ const targetKeysBack = ref([])
const sourceClick = () => {
+ mockData.value = []
visibleAssociatedApplication.value = true
- queryApplicationRelByResourceId({
- referenceId: 0,
- }).then((res) => {
- // console.log(res.data.data.notLinked)
- res.data.data.notLinked.forEach((val, index) => {
- // console.log(val, index)
- mockData.value.push({
- key: val.id,
- title: val.name,
- description: val.id,
+ props.dataFrom.infoList.forEach((val) => {
+ if (val.attrType === '来源应用' && val.attrValue != '') {
+ queryApplicationRelByResourceId({
+ referenceId: 0,
+ }).then((res) => {
+ // console.log(res.data.data.notLinked)
+ res.data.data.notLinked.forEach((val, index) => {
+ mockData.value.push({
+ key: val.id,
+ title: val.name,
+ description: val.id,
+ })
+ })
})
- })
+ targetKeys.value = []
+ val.attrValue.split(',').forEach((item) => {
+ targetKeys.value.push(item)
+ })
+ console.log(targetKeys.value)
+ // console.log('wowowo')
+ } else if (val.attrType === '来源应用' && val.attrValue == '') {
+ queryApplicationRelByResourceId({
+ referenceId: 0,
+ }).then((res) => {
+ // console.log(res.data.data.notLinked)
+ res.data.data.notLinked.forEach((val, index) => {
+ mockData.value.push({
+ key: val.id,
+ title: val.name,
+ description: val.id,
+ })
+ })
+ })
+ }
})
}
// 关联组件
const componentsClick = () => {
titles.value = ['未关联的组件名称', '已关联的组件名称']
titleName.value = '关联组件'
-
+ mockData.value = []
visibleAssociatedApplication.value = true
- queryResourceRelByKeyId({
- keyId: 0,
- type: '组件服务',
- referenceName: '',
- }).then((res) => {
- // console.log(res.data.data.notLinked)
- res.data.data.notLinked.forEach((val, index) => {
- // console.log(val, index)
- mockData.value.push({
- key: val.id,
- title: val.name,
- description: val.id,
+ props.dataFrom.infoList.forEach((val) => {
+ if (val.attrType === '关联组件信息' && val.attrValue != '') {
+ queryResourceRelByKeyId({
+ keyId: 0,
+ type: '组件服务',
+ referenceName: '',
+ }).then((res) => {
+ // console.log(res.data.data.notLinked)
+ res.data.data.notLinked.forEach((val, index) => {
+ mockData.value.push({
+ key: val.id,
+ title: val.name,
+ description: val.id,
+ })
+ })
})
- })
+ targetKeys.value = []
+ val.attrValue.split(',').forEach((item) => {
+ targetKeys.value.push(item)
+ })
+ console.log(targetKeys.value)
+ // console.log('wowowo')
+ } else if (val.attrType === '关联组件信息' && val.attrValue == '') {
+ queryResourceRelByKeyId({
+ keyId: 0,
+ type: '组件服务',
+ referenceName: '',
+ }).then((res) => {
+ // console.log(res.data.data.notLinked)
+ res.data.data.notLinked.forEach((val, index) => {
+ mockData.value.push({
+ key: val.id,
+ title: val.name,
+ description: val.id,
+ })
+ })
+ })
+ }
})
}
- const targetKeys = ref([])
const selectedKeys = ref([])
const handleChange = (nextTargetKeys, direction, moveKeys) => {
console.log('targetKeys: ', nextTargetKeys)
console.log('direction: ', direction)
console.log('moveKeys: ', moveKeys)
+ targetKeys.value = moveKeys
}
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {
- console.log('targetSelectedKeys: ', targetSelectedKeys)
+ console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys)
}
const handleOk = (e) => {
@@ -588,6 +717,13 @@
visibleAssociatedApplication.value = false
}
+ const showType = ref('')
+ const showTypeClick = (e) => {
+ showType.value = e
+ console.log(e, 'showType', showType.value)
+ }
+ showTypeClick('调用接口')
+
watch(data.value.list, (newProps, oldProps) => {
// console.log(newProps, oldProps)
newProps.forEach((val) => {
@@ -621,6 +757,21 @@
}
})
})
+ const handleChange2 = (value) => {
+ console.log(`selected ${value}`)
+ }
+
+ const handleBlur = () => {
+ console.log('blur')
+ }
+
+ const handleFocus = () => {
+ console.log('focus')
+ }
+
+ const filterOption = (input, option) => {
+ return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
+ }
diff --git a/front/src/views/components/upload/index.vue b/front/src/views/components/upload/index.vue
index c04a1c26..5987c99d 100644
--- a/front/src/views/components/upload/index.vue
+++ b/front/src/views/components/upload/index.vue
@@ -76,6 +76,8 @@
file.type === 'application/msword' ||
file.type ===
'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
+ } else if (props.type === '压缩包') {
+ flag = file.type === 'application/x-zip-compressed'
}
console.log(flag)
if (!flag) {
@@ -115,6 +117,8 @@
} else {
mybus.emit('chageFileList', fileList.value)
}
+ } else if (props.type === '压缩包') {
+ mybus.emit('chagePackageList', fileList.value)
} else if (props.type === '视频') {
mybus.emit('chageVideoList', fileList.value)
}
@@ -129,16 +133,16 @@
}
diff --git a/front/src/views/detailsAll/components/Algorithm/AlgorithmAdvantage.vue b/front/src/views/detailsAll/components/Algorithm/AlgorithmAdvantage.vue
index a6703a1b..7f35d9e9 100644
--- a/front/src/views/detailsAll/components/Algorithm/AlgorithmAdvantage.vue
+++ b/front/src/views/detailsAll/components/Algorithm/AlgorithmAdvantage.vue
@@ -12,7 +12,10 @@
-
{{ val.title }}
+
+ {{ val.title }}
+ {{ val.title }}
+
{{ val.text }}
{{ val.text }}
@@ -119,7 +122,11 @@
.title {
font-size: 22px;
margin-top: 25px;
+ width: 2.6rem;
text-align: center;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
.text {
height: 78px;
diff --git a/front/src/views/detailsAll/components/Algorithm/AlgorithmChargingStandard.vue b/front/src/views/detailsAll/components/Algorithm/AlgorithmChargingStandard.vue
index 2768387e..0ebc73a1 100644
--- a/front/src/views/detailsAll/components/Algorithm/AlgorithmChargingStandard.vue
+++ b/front/src/views/detailsAll/components/Algorithm/AlgorithmChargingStandard.vue
@@ -12,9 +12,7 @@
{{ item.content }}
@@ -40,44 +38,10 @@
// dataFrom.value = obj
obj.attrValue.map((item) => {
let params = {}
- switch (item.type) {
- case '一次性买断':
- params = {
- title: item.type,
- content: item.desc,
- value: item.price,
- time: '元',
- unit: '¥',
- }
- break
- case '按调用次数':
- params = {
- title: item.type,
- content: item.desc,
- value: item.price,
- time: '/次',
- unit: '¥',
- }
- break
-
- case '按并发路数':
- params = {
- title: item.type,
- content: item.desc,
- value: item.price,
- time: '/路',
- unit: '¥',
- }
- break
- case '按年计费':
- params = {
- title: item.type,
- content: item.desc,
- value: item.price,
- time: '/年',
- unit: '¥',
- }
- break
+ params = {
+ title: item.type,
+ content: item.desc,
+ value: item.price,
}
dataFrom.value.push(params)
})
@@ -97,44 +61,10 @@
// dataFrom.value = obj
obj.attrValue.map((item) => {
let params = {}
- switch (item.type) {
- case '一次性买断':
- params = {
- title: item.type,
- content: item.desc,
- value: item.price,
- time: '元',
- unit: '¥',
- }
- break
- case '按调用次数':
- params = {
- title: item.type,
- content: item.desc,
- value: item.price,
- time: '/次',
- unit: '¥',
- }
- break
-
- case '按并发路数':
- params = {
- title: item.type,
- content: item.desc,
- value: item.price,
- time: '/路',
- unit: '¥',
- }
- break
- case '按年计费':
- params = {
- title: item.type,
- content: item.desc,
- value: item.price,
- time: '/年',
- unit: '¥',
- }
- break
+ params = {
+ title: item.type,
+ content: item.desc,
+ value: item.price,
}
dataFrom.value.push(params)
})
@@ -189,14 +119,6 @@
font-size: 22px;
color: #ff8b55;
}
- span:nth-child(2) {
- font-size: 32px;
- color: #ff8b55;
- }
- span:last-child {
- font-size: 22px;
- color: #999999;
- }
}
}
.content-card:hover {
diff --git a/front/src/views/detailsAll/components/Algorithm/AlgorithmNavigation.vue b/front/src/views/detailsAll/components/Algorithm/AlgorithmNavigation.vue
index fea7e325..7c1de008 100644
--- a/front/src/views/detailsAll/components/Algorithm/AlgorithmNavigation.vue
+++ b/front/src/views/detailsAll/components/Algorithm/AlgorithmNavigation.vue
@@ -126,10 +126,12 @@
'props.dataList.infoList==============>',
navList.value.filter((item) => item.name === list.value[0])
)
- if (navList.value.filter((item) => item.name === list.value[0])[0]) {
- select.value = navList.value.filter(
- (item) => (item.name === '关联应用') | (item.name === list.value[0])
- )[0].key
+ if (list.value.length > 0) {
+ if (navList.value.filter((item) => item.name === list.value[0])[0]) {
+ select.value = navList.value.filter(
+ (item) => (item.name === '关联应用') | (item.name === list.value[0])
+ )[0].key
+ }
}
console.log('11111111111111111111111111', list.value, navList.value)
}
diff --git a/front/src/views/detailsAll/components/Algorithm/AlgorithmTopDetails.vue b/front/src/views/detailsAll/components/Algorithm/AlgorithmTopDetails.vue
index 24869e6f..1aee9726 100644
--- a/front/src/views/detailsAll/components/Algorithm/AlgorithmTopDetails.vue
+++ b/front/src/views/detailsAll/components/Algorithm/AlgorithmTopDetails.vue
@@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
- * @LastEditTime: 2022-07-05 11:41:52
+ * @LastEditTime: 2022-07-15 17:30:19
* @Description: 算法详情页头部
-->
@@ -21,12 +21,18 @@
{{ props.dataList.type }}
+
+ {{ componentType }}
+
{{ props.dataList.shareType }}
{{ props.dataList.shareCondition }}
+
+ {{ deploymentLocation }}
+