|
@@ -1,9 +1,10 @@
|
|
|
import React from 'react'
|
|
|
import { FilterTable } from 'wptpc-design'
|
|
|
import { thanos } from '@/conf/config'
|
|
|
-import { message } from 'antd'
|
|
|
+import { message, Divider } from 'antd'
|
|
|
import { update, writeLog, queryLog, reviewOk } from '../service.js'
|
|
|
import Rv from '@/pages/fengkong/view/other/review'
|
|
|
+import VCM from '@/pages/fengkong/view/other/viewCodeModal'
|
|
|
import { connect } from 'dva'
|
|
|
|
|
|
const apiUrl = `${thanos}/thanos-admin/api/v1/dsl/list`
|
|
@@ -14,7 +15,9 @@ const apiUrl = `${thanos}/thanos-admin/api/v1/dsl/list`
|
|
|
class OtherList extends React.PureComponent {
|
|
|
state = {
|
|
|
showModal: false,
|
|
|
- params: {}
|
|
|
+ showVCModal: false,
|
|
|
+ params: {},
|
|
|
+ vParams:{}
|
|
|
}
|
|
|
|
|
|
filterSetting = {
|
|
@@ -104,6 +107,8 @@ class OtherList extends React.PureComponent {
|
|
|
// 所有需要弹窗操作的都可以用编辑的逻辑;所有不需要弹窗的操作,比如上架、发布等,都可以用”删除“的逻辑
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
+ <a onClick={() => this.viewCode(record)}>查看代码</a>
|
|
|
+ <Divider type="vertical"/>
|
|
|
<a onClick={() => this.process(record)}>点击处理</a>
|
|
|
</span>)
|
|
|
}
|
|
@@ -144,11 +149,16 @@ class OtherList extends React.PureComponent {
|
|
|
queryLog({ name: record.name }).then(res => {
|
|
|
if (res.code === 0) {
|
|
|
res.data.rejectReason = ''
|
|
|
+ res.data.state = 1
|
|
|
this.setState({ showRv: true, params: res.data, record: record })
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ viewCode = (record) => {
|
|
|
+ this.setState({ showVCModal: true, vParams:record})
|
|
|
+ }
|
|
|
+
|
|
|
onRvOk = () => {
|
|
|
const { state } = this.state.params
|
|
|
console.log('数据1:' + JSON.stringify(this.state.params))
|
|
@@ -208,13 +218,18 @@ class OtherList extends React.PureComponent {
|
|
|
this.setState({ showRv: false })
|
|
|
}
|
|
|
|
|
|
+ onVCMCancel = () => {
|
|
|
+ this.setState({ showVCModal: false })
|
|
|
+ }
|
|
|
+
|
|
|
render () {
|
|
|
- const { params, showRv } = this.state
|
|
|
+ const { params, showRv, showVCModal, vParams} = this.state
|
|
|
return (
|
|
|
<div>
|
|
|
<FilterTable filterSetting={this.filterSetting} tableSetting={this.tableSetting} apiUrl={apiUrl}
|
|
|
/>
|
|
|
<Rv showModal={showRv} params={params} onChange={this.onParamsChange} onOk={this.onRvOk} onCancel={this.onRvCancel} />
|
|
|
+ <VCM showModal={showVCModal} params={vParams} onChange={this.onParamsChange} onOk={this.onVCMCancel} onCancel={this.onVCMCancel} />
|
|
|
</div>
|
|
|
)
|
|
|
}
|