Browse Source

文件下载/表单回显

dev
mk 3 years ago
parent
commit
86ce40cf5f
  1. 12
      epmet-oper-web/src/views/modules/thirdparty/publishForm.vue
  2. 23
      epmet-oper-web/src/views/modules/thirdparty/thirdparty.vue

12
epmet-oper-web/src/views/modules/thirdparty/publishForm.vue

@ -197,6 +197,8 @@ export default {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.iconList = getIconList() this.iconList = getIconList()
this.dataForm.parentName = this.$t('menu.parentNameDefault') this.dataForm.parentName = this.$t('menu.parentNameDefault')
this.dataForm.name = this.appName
this.dataForm.url = this.appUrl
this.dataForm.resourceList = [] this.dataForm.resourceList = []
this.getMenuList().then(() => { this.getMenuList().then(() => {
if (this.dataForm.id) { if (this.dataForm.id) {
@ -315,7 +317,15 @@ export default {
id: { id: {
type: String, type: String,
default: '' default: ''
} },
appUrl: {
type: String,
default: ''
},
appName: {
type: String,
default: ''
},
} }
} }
</script> </script>

23
epmet-oper-web/src/views/modules/thirdparty/thirdparty.vue

@ -6,9 +6,12 @@
<div class="btn_box"> <div class="btn_box">
<el-button style="margin-right:20px" <el-button style="margin-right:20px"
size="small" size="small"
type="primary"
@click="handleAdd('add')">认证</el-button> @click="handleAdd('add')">认证</el-button>
<el-button style="margin-left:20px" <el-button style="margin-left:20px"
size="small">下载接口文档</el-button> type="primary"
size="small"
@click="handleDownDoc">下载接口文档</el-button>
</div> </div>
<el-table :data="tableData" <el-table :data="tableData"
@ -57,11 +60,13 @@
size="small" size="small"
@click="handleEdit('edit',scope.row)">查看</el-button> @click="handleEdit('edit',scope.row)">查看</el-button>
<el-button type="text" <el-button type="text"
v-if="scope.row.status!=3&&scope.row.status!=2"
size="small" size="small"
@click="handleEdit('check',scope.row)">审核</el-button> @click="handleEdit('check',scope.row)">审核</el-button>
<el-button type="text" <el-button type="text"
size="small" size="small"
@click="handlePublish(scope.row)">发布</el-button> @click="handlePublish(scope.row)"
v-if="scope.row.status==2">发布</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -104,7 +109,9 @@
:before-close="dialogCancle"> :before-close="dialogCancle">
<publish-form ref="ref_publish" <publish-form ref="ref_publish"
@dialogCancle="dialogCancle" @dialogCancle="dialogCancle"
:id='detailsId'></publish-form> :id='detailsId'
:appUrl="appUrl"
:appName="appName"></publish-form>
</el-dialog> </el-dialog>
</div> </div>
@ -116,10 +123,13 @@ import addForm from './addForm'
// import FootbarList from '../../productConfig/footbar/FootbarList' // import FootbarList from '../../productConfig/footbar/FootbarList'
import publishForm from "./publishForm.vue" import publishForm from "./publishForm.vue"
import { requestPost, requestGet } from "@/js/dai/request"; import { requestPost, requestGet } from "@/js/dai/request";
import debounce from 'lodash/debounce'
export default { export default {
data () { data () {
return { return {
tableData: [], tableData: [],
appUrl: "",
appName: "",
statusList: [ statusList: [
{ {
value: '0', value: '0',
@ -178,6 +188,10 @@ export default {
// this.getAgency(node, resolve) // this.getAgency(node, resolve)
// }, 200) // }, 200)
}, },
handleDownDoc: debounce(function () {
window.open('https://www.yantai1s.com/oss/20230209/637e6347f1aa484aa3d8c2778e8fee9a.docx')
}, 2000, { 'leading': true, 'trailing': false }),
async getAgency (node, resolve) { async getAgency (node, resolve) {
const url = '/third/dataSync/ytorglist' const url = '/third/dataSync/ytorglist'
@ -241,6 +255,9 @@ export default {
handlePublish (row) { handlePublish (row) {
this.showPublish = true this.showPublish = true
this.detailsId = row.id this.detailsId = row.id
this.appUrl = row.link
this.appName = row.name
console.log(row);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_publish.init() this.$refs.ref_publish.init()
}) })

Loading…
Cancel
Save