Skip to content

Commit

Permalink
fix(equipmentCloud): 通道编辑上传文件
Browse files Browse the repository at this point in the history
  • Loading branch information
dawnwinterLiu committed Aug 10, 2022
1 parent f04d2f4 commit 53d1e6d
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 134 deletions.
20 changes: 19 additions & 1 deletion CHANGELOG.EN.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
## [4.5.7](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.6...v4.5.7) (2022-08-04)
## [4.5.7](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.6...v4.5.7) (2022-08-10)


### Bug Fixes

* 物模型延时缓存 ([c8dd9d4](https://github.com/dgiot/dgiot-dashboard/commit/c8dd9d4713fb9f36129fb660ecc68c55c73df775))
* **appveyor:** script ([ce59370](https://github.com/dgiot/dgiot-dashboard/commit/ce593705fafa3c5b16062d27f43d66034139d561))
* **cloudTest:** evidence ([e8d0510](https://github.com/dgiot/dgiot-dashboard/commit/e8d051073aee73634a11fe3d31f0a7c4f54f67be))
* **dashboard): build(发布版本:** dgiot-dashboard@v4.5.6 ([1d4302c](https://github.com/dgiot/dgiot-dashboard/commit/1d4302cd183474db6bbbb6dbc4fbc46163d351c8)), closes [#511](https://github.com/dgiot/dgiot-dashboard/issues/511)
* **equipmentCloud:** 字典修复 ([24a9690](https://github.com/dgiot/dgiot-dashboard/commit/24a96904b4879da9a952c9f6bf7358048863198c))
* **ignore:** hidden test_script ([61b6326](https://github.com/dgiot/dgiot-dashboard/commit/61b632636fc8409b1e99f4235a9a865d22d72af4))
* **queryZetaProduct:** queryProductTemplet ([1c47a45](https://github.com/dgiot/dgiot-dashboard/commit/1c47a4511451818ecd1f8fdcf2b4cebd0e6b4761))


### Features

* **压测报告:** 报告查询 ([06608f7](https://github.com/dgiot/dgiot-dashboard/commit/06608f7df8edeef0dd0bb4005130dc88db9ced31))
* **压测报告:** 压测报告查询格式化 ([50cb7ff](https://github.com/dgiot/dgiot-dashboard/commit/50cb7ff858330f4ce24c9b45569190df37f4c9fd))
* **压测:** 完成压测报告生成 ([86dd1ef](https://github.com/dgiot/dgiot-dashboard/commit/86dd1ef83c73ef257251494e16ea99900526539a))
* add Konva Edit ([49883e0](https://github.com/dgiot/dgiot-dashboard/commit/49883e08dd84382c0cb7be0877c316f959c592a7))
* **cloudTest:** 检测项 ([76928b4](https://github.com/dgiot/dgiot-dashboard/commit/76928b4114b12cfd50afc5cc077f21f145e1f98e))
* dgiot_amis ([8c91153](https://github.com/dgiot/dgiot-dashboard/commit/8c91153c8ad5b6b32d91c57a36fe55fefa3da721))
* **equipmentCloud:** 通道添加上传文件功能 ([f04d2f4](https://github.com/dgiot/dgiot-dashboard/commit/f04d2f45d0e077d30ca1bb75c41d4bb12bc2a439))
* knova Configuration display ([d0d5cdb](https://github.com/dgiot/dgiot-dashboard/commit/d0d5cdba26aa779120718d7722c3fc48a88ebb07))
* **proxy:** nodejs_version ([25f0fea](https://github.com/dgiot/dgiot-dashboard/commit/25f0feaf77ee4662b206f9b01894839b74c04fca))
* **router:** 路由处理分离 ([e2023ed](https://github.com/dgiot/dgiot-dashboard/commit/e2023ed42854c38af414288faf4260a064ed2d7e))
* translate ([ebd3196](https://github.com/dgiot/dgiot-dashboard/commit/ebd3196a719d75bb8978143935d87529262c6980))
* update catalogue ([4530af6](https://github.com/dgiot/dgiot-dashboard/commit/4530af6825129925923dfd6e2000701b9cb5a63a))


### Reverts

* **修复应用管理 && 背景图丢失): feat(grafana:** url ([2ee8701](https://github.com/dgiot/dgiot-dashboard/commit/2ee87010a2ef7e6afdc580ad2a155f975447f885))



Expand Down
20 changes: 19 additions & 1 deletion CHANGELOG.ZH.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
## [4.5.7](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.6...v4.5.7) (2022-08-04)
## [4.5.7](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.6...v4.5.7) (2022-08-10)


### Bug Fixes

* 物模型延时缓存 ([c8dd9d4](https://github.com/dgiot/dgiot-dashboard/commit/c8dd9d4713fb9f36129fb660ecc68c55c73df775))
* **appveyor:** script ([ce59370](https://github.com/dgiot/dgiot-dashboard/commit/ce593705fafa3c5b16062d27f43d66034139d561))
* **cloudTest:** evidence ([e8d0510](https://github.com/dgiot/dgiot-dashboard/commit/e8d051073aee73634a11fe3d31f0a7c4f54f67be))
* **dashboard): build(发布版本:** dgiot-dashboard@v4.5.6 ([1d4302c](https://github.com/dgiot/dgiot-dashboard/commit/1d4302cd183474db6bbbb6dbc4fbc46163d351c8)), closes [#511](https://github.com/dgiot/dgiot-dashboard/issues/511)
* **equipmentCloud:** 字典修复 ([24a9690](https://github.com/dgiot/dgiot-dashboard/commit/24a96904b4879da9a952c9f6bf7358048863198c))
* **ignore:** hidden test_script ([61b6326](https://github.com/dgiot/dgiot-dashboard/commit/61b632636fc8409b1e99f4235a9a865d22d72af4))
* **queryZetaProduct:** queryProductTemplet ([1c47a45](https://github.com/dgiot/dgiot-dashboard/commit/1c47a4511451818ecd1f8fdcf2b4cebd0e6b4761))


### Features

* **压测报告:** 报告查询 ([06608f7](https://github.com/dgiot/dgiot-dashboard/commit/06608f7df8edeef0dd0bb4005130dc88db9ced31))
* **压测报告:** 压测报告查询格式化 ([50cb7ff](https://github.com/dgiot/dgiot-dashboard/commit/50cb7ff858330f4ce24c9b45569190df37f4c9fd))
* **压测:** 完成压测报告生成 ([86dd1ef](https://github.com/dgiot/dgiot-dashboard/commit/86dd1ef83c73ef257251494e16ea99900526539a))
* add Konva Edit ([49883e0](https://github.com/dgiot/dgiot-dashboard/commit/49883e08dd84382c0cb7be0877c316f959c592a7))
* **cloudTest:** 检测项 ([76928b4](https://github.com/dgiot/dgiot-dashboard/commit/76928b4114b12cfd50afc5cc077f21f145e1f98e))
* dgiot_amis ([8c91153](https://github.com/dgiot/dgiot-dashboard/commit/8c91153c8ad5b6b32d91c57a36fe55fefa3da721))
* **equipmentCloud:** 通道添加上传文件功能 ([f04d2f4](https://github.com/dgiot/dgiot-dashboard/commit/f04d2f45d0e077d30ca1bb75c41d4bb12bc2a439))
* knova Configuration display ([d0d5cdb](https://github.com/dgiot/dgiot-dashboard/commit/d0d5cdba26aa779120718d7722c3fc48a88ebb07))
* **proxy:** nodejs_version ([25f0fea](https://github.com/dgiot/dgiot-dashboard/commit/25f0feaf77ee4662b206f9b01894839b74c04fca))
* **router:** 路由处理分离 ([e2023ed](https://github.com/dgiot/dgiot-dashboard/commit/e2023ed42854c38af414288faf4260a064ed2d7e))
* translate ([ebd3196](https://github.com/dgiot/dgiot-dashboard/commit/ebd3196a719d75bb8978143935d87529262c6980))
* update catalogue ([4530af6](https://github.com/dgiot/dgiot-dashboard/commit/4530af6825129925923dfd6e2000701b9cb5a63a))


### Reverts

* **修复应用管理 && 背景图丢失): feat(grafana:** url ([2ee8701](https://github.com/dgiot/dgiot-dashboard/commit/2ee87010a2ef7e6afdc580ad2a155f975447f885))



Expand Down
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
## [4.5.7](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.6...v4.5.7) (2022-08-04)
## [4.5.7](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.6...v4.5.7) (2022-08-10)


### Bug Fixes

* 物模型延时缓存 ([c8dd9d4](https://github.com/dgiot/dgiot-dashboard/commit/c8dd9d4713fb9f36129fb660ecc68c55c73df775))
* **appveyor:** script ([ce59370](https://github.com/dgiot/dgiot-dashboard/commit/ce593705fafa3c5b16062d27f43d66034139d561))
* **cloudTest:** evidence ([e8d0510](https://github.com/dgiot/dgiot-dashboard/commit/e8d051073aee73634a11fe3d31f0a7c4f54f67be))
* **dashboard): build(发布版本:** dgiot-dashboard@v4.5.6 ([1d4302c](https://github.com/dgiot/dgiot-dashboard/commit/1d4302cd183474db6bbbb6dbc4fbc46163d351c8)), closes [#511](https://github.com/dgiot/dgiot-dashboard/issues/511)
* **equipmentCloud:** 字典修复 ([24a9690](https://github.com/dgiot/dgiot-dashboard/commit/24a96904b4879da9a952c9f6bf7358048863198c))
* **ignore:** hidden test_script ([61b6326](https://github.com/dgiot/dgiot-dashboard/commit/61b632636fc8409b1e99f4235a9a865d22d72af4))
* **queryZetaProduct:** queryProductTemplet ([1c47a45](https://github.com/dgiot/dgiot-dashboard/commit/1c47a4511451818ecd1f8fdcf2b4cebd0e6b4761))


### Features

* **压测报告:** 报告查询 ([06608f7](https://github.com/dgiot/dgiot-dashboard/commit/06608f7df8edeef0dd0bb4005130dc88db9ced31))
* **压测报告:** 压测报告查询格式化 ([50cb7ff](https://github.com/dgiot/dgiot-dashboard/commit/50cb7ff858330f4ce24c9b45569190df37f4c9fd))
* **压测:** 完成压测报告生成 ([86dd1ef](https://github.com/dgiot/dgiot-dashboard/commit/86dd1ef83c73ef257251494e16ea99900526539a))
* add Konva Edit ([49883e0](https://github.com/dgiot/dgiot-dashboard/commit/49883e08dd84382c0cb7be0877c316f959c592a7))
* **cloudTest:** 检测项 ([76928b4](https://github.com/dgiot/dgiot-dashboard/commit/76928b4114b12cfd50afc5cc077f21f145e1f98e))
* dgiot_amis ([8c91153](https://github.com/dgiot/dgiot-dashboard/commit/8c91153c8ad5b6b32d91c57a36fe55fefa3da721))
* **equipmentCloud:** 通道添加上传文件功能 ([f04d2f4](https://github.com/dgiot/dgiot-dashboard/commit/f04d2f45d0e077d30ca1bb75c41d4bb12bc2a439))
* knova Configuration display ([d0d5cdb](https://github.com/dgiot/dgiot-dashboard/commit/d0d5cdba26aa779120718d7722c3fc48a88ebb07))
* **proxy:** nodejs_version ([25f0fea](https://github.com/dgiot/dgiot-dashboard/commit/25f0feaf77ee4662b206f9b01894839b74c04fca))
* **router:** 路由处理分离 ([e2023ed](https://github.com/dgiot/dgiot-dashboard/commit/e2023ed42854c38af414288faf4260a064ed2d7e))
* translate ([ebd3196](https://github.com/dgiot/dgiot-dashboard/commit/ebd3196a719d75bb8978143935d87529262c6980))
* update catalogue ([4530af6](https://github.com/dgiot/dgiot-dashboard/commit/4530af6825129925923dfd6e2000701b9cb5a63a))


### Reverts

* **修复应用管理 && 背景图丢失): feat(grafana:** url ([2ee8701](https://github.com/dgiot/dgiot-dashboard/commit/2ee87010a2ef7e6afdc580ad2a155f975447f885))



Expand Down
164 changes: 41 additions & 123 deletions src/views/CloudFunction/engine/channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -295,59 +295,6 @@
/>
</el-select>
</el-form-item>
<!-- <el-form-item>-->
<!-- <el-row :gutter="24">-->
<!-- <el-col-->
<!-- v-for="(item, index) in channelregion"-->
<!-- :key="index"-->
<!-- :span="24"-->
<!-- style="cursor: pointer"-->
<!-- >-->
<!-- <el-card-->
<!-- v-if="item.params.ico && item.params.ico.default"-->
<!-- v-show="addchannel.region == item.cType"-->
<!-- class="box-card"-->
<!-- :shadow="addchannel.region == item.cType ? 'always' : 'hover'"-->
<!-- size="mini"-->
<!-- :style="{-->
<!-- display: addchannel.region == item.cType ? 'block' : 'none',-->
<!-- color:-->
<!-- addchannel.region == item.cType ? '#00bad0' : '#c0c4cc',-->
<!-- }"-->
<!-- >-->
<!-- <div slot="header" class="clearfix">-->
<!-- <span>{{ item.title.zh }}</span>-->
<!-- &lt;!&ndash; <el-button&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="resourceid != ''"&ndash;&gt;-->
<!-- &lt;!&ndash; size="mini"&ndash;&gt;-->
<!-- &lt;!&ndash; style="float: right"&ndash;&gt;-->
<!-- &lt;!&ndash; type="success"&ndash;&gt;-->
<!-- &lt;!&ndash; @click="setCard(item.cType)"&ndash;&gt;-->
<!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- &lt;!&ndash; &lt;!&ndash; 已选 &ndash;&gt;&ndash;&gt;-->
<!-- &lt;!&ndash; {{ $translateTitle('product.selected') }}&ndash;&gt;-->
<!-- &lt;!&ndash; </el-button>&ndash;&gt;-->
<!-- </div>-->
<!-- <div class="text item">-->
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="12">-->
<!-- <img-->
<!-- class="image"-->
<!-- :src="-->
<!-- item.params.ico.default ? item.params.ico.default : ''-->
<!-- "-->
<!-- style="width: 50px; height: 50px"-->
<!-- />-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-tag>{{ item.cType }}</el-tag>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </div>-->
<!-- </el-card>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-form-item>-->
<el-form-item
:label="$translateTitle('developer.channelname')"
prop="name"
Expand Down Expand Up @@ -423,12 +370,6 @@
<i class="el-icon-picture-outline"></i>
</div>
</el-image>
<!-- <el-button-->
<!-- v-else-if="item.showname == 'ico'"-->
<!-- slot="append"-->
<!-- icon="el-icon-upload"-->
<!-- @click="uploadCkick(addchannel[item.showname], index, 'arrlist')"-->
<!-- />-->
<el-input
v-else-if="item.type == 'integer'"
v-model.number="addchannel[item.showname]"
Expand Down Expand Up @@ -464,6 +405,14 @@
:value="item.enum[index1]"
/>
</el-select>
<div v-else-if="item.type == 'upload'">
&nbsp;
<el-button type="primary" @click.native="uploadCkick(item)">
{{ $translateTitle('application.uploadfile') }}
</el-button>
&nbsp;
<span>{{ addchannel[item.showname + 'filename'] }}</span>
</div>
<div v-else-if="item.allowCreate">
<el-button
@click.native="dybaneucForms[item.showname].unshift({})"
Expand Down Expand Up @@ -767,6 +716,7 @@
name: '',
},
channelregion: [],
inputParams: {},
addchannel: {
region: '',
desc: '',
Expand Down Expand Up @@ -1078,23 +1028,43 @@
)
}
},
uploadCkick(type, index, channeType) {
console.log(type, index)
this.channeindex = index
this.channeType = channeType
uploadCkick(item) {
// 触发子组件的点击事件
this.$refs['uploadFinish'].$refs.uploader.dispatchEvent(
new MouseEvent('click')
)
this.inputParams = {
item: item,
file: '',
scene: 'app',
path: 'product/csv/',
}
},
fileInfo(info) {
console.log('uploadFinish', info)
if (this.channeType == 'arrlist') {
this.arrlist[this.channeindex].default = info.url
console.log(this.arrlist[this.channeindex])
async fileInfo(info) {
const newname = this.inputParams.item.showname + 'filename'
this.$set(this.addchannel, this.inputParams.item.showname, info.src)
this.$set(this.addchannel, newname, this.inputParams.filename)
this.inputParams = {}
if (info.url) {
this.$message({
showClose: true,
duration: 2000,
type: 'success',
message: '上传成功',
})
} else {
this.channelregion[this.channeindex].params.ico.default = info.url
this.$message({
showClose: true,
duration: 2000,
type: 'error',
message: '上传失败',
})
}
},
files(file) {
this.inputParams.filename = file.name
this.inputParams.file = file
},
addchannelForm(formName) {
if (this.resourceid) {
// this.$message("编辑通道")
Expand Down Expand Up @@ -1196,7 +1166,6 @@
skip: this.start,
limit: this.length,
order: '-createdAt',
keys: 'count(*)',
where: {},
}
this.channelformsearch.name
Expand Down Expand Up @@ -1416,7 +1385,6 @@
this.removeauto(item)
},
removeauto(val) {
console.log(val)
var obj = {}
var obj1 = {
applicationtText: [
Expand Down Expand Up @@ -1448,68 +1416,19 @@
},
],
}
// if (this.resourceid == '') {
// this.channelregion.map((item) => {
// if (item.cType == val) {
// this.$forceUpdate()
// this.selectregion = item
// this.arrlist = this.orderObject(this.selectregion.params)
// this.arrlist.map((item) => {
// if (item.allowCreate) {
// this.dynamicTable(
// item,
// '回显',
// this.channelrow.config[item.showname],
// item.showname,
// 1485
// )
// }
// if (item.default) {
// obj[item.showname] = item.default
// } else {
// obj[item.showname] = ''
// }
// if (item.required) {
// if (item.type == 'string' || item.type == 'integer') {
// obj1[item.showname] = [
// {
// required: true,
// trigger: 'blur',
// },
// ]
// } else {
// obj1[item.showname] = [
// {
// required: true,
// trigger: 'change',
// },
// ]
// }
// }
// })
// obj.region = val
// obj.desc = ''
// obj.name = ''
// obj.type = this.selectregion.type
// obj.isEnable = false
// }
// })
// } else {
this.channelregion.map((item) => {
if (item.cType == val) {
this.selectregion = item
this.$forceUpdate()
this.arrlist = this.orderObject(this.selectregion.params)
const sortBy = _.sortBy(this.arrlist, ['order'])
this.arrlist = sortBy
console.log(this.arrlist)
this.arrlist.map((item) => {
for (var key in this.channelrow.config) {
if (item.showname == key) {
obj[item.showname] = this.channelrow.config[key]
}
if (item.allowCreate) {
console.error(item, '1532', item.showname)
this.dynamicTable(
item,
'回显',
Expand Down Expand Up @@ -1552,13 +1471,12 @@
obj.applicationtText = key ? key.substr(5) : ''
}
}
this.addchannel = obj
console.log(this.addchannel)
this.addchannel = this.channelrow.config
console.log('addchannel', this.addchannel)
this.addchannel.region = val
this.addrules = obj1
},
editorChannel(row) {
console.log(row)
this.channelrow = row
this.resourceid = row.objectId
this.channelupdated = '编辑'
Expand Down
Loading

1 comment on commit 53d1e6d

@vercel
Copy link

@vercel vercel bot commented on 53d1e6d Aug 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

dgiot-dashboard – ./

dgiot-dashboard.vercel.app
dgiot-dashboard-git-master-dgiot.vercel.app
dgiot-dashboard-dgiot.vercel.app

Please sign in to comment.