布局认证目录
This commit is contained in:
@@ -879,4 +879,5 @@ module.exports = {
|
||||
testScheme:'Test Scheme',
|
||||
testReportLocation:'Test report location',
|
||||
explain:'Explain',
|
||||
dataCannotEmpty:'Data Cannot Empty',
|
||||
}
|
||||
@@ -884,4 +884,5 @@ module.exports = {
|
||||
testScheme:'试验方案',
|
||||
testReportLocation:'检测报告位置',
|
||||
explain:'说明',
|
||||
dataCannotEmpty:'数据不能为空'
|
||||
}
|
||||
@@ -42,6 +42,9 @@
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-col :md="12" :sm="24">
|
||||
<globalAdvancedQuery ref="globalAdvancedQueryRef"
|
||||
@handleSuperQuery="handleSuperQuery"
|
||||
:fieldList="fieldList"/>
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
</a-col>
|
||||
@@ -82,13 +85,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import currencySearch from '@/components/currencySearch/index'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
||||
|
||||
export default {
|
||||
name: 'addModel',
|
||||
components: {
|
||||
currencySearch
|
||||
globalAdvancedQuery
|
||||
},
|
||||
props: {
|
||||
url: {
|
||||
@@ -233,7 +236,20 @@
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
}
|
||||
},
|
||||
handleSuperQuery(params, matchType) {
|
||||
let sqp = {}
|
||||
if (!params || (params && params.length == 0)) {
|
||||
sqp['superQueryParams'] = ''
|
||||
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
|
||||
} else {
|
||||
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
|
||||
sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
|
||||
sqp['superQueryMatchType'] = matchType
|
||||
}
|
||||
this.queryParamQuery = sqp
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -44,25 +44,26 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="drawer-bootom-button">
|
||||
<!-- style="margin-right: 16px"-->
|
||||
<!-- style="margin-right: 16px"-->
|
||||
<a-button @click="handleCancel" type="danger">{{$t('cancel')}}</a-button>
|
||||
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>-->
|
||||
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>-->
|
||||
</div>
|
||||
</a-drawer>
|
||||
<certificationDirectoryAdd ref="certificationDirectoryAddRef" />
|
||||
<certificationDirectoryAdd @certificationDirectoryList="certificationDirectoryList"
|
||||
ref="certificationDirectoryAddRef"/>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
import certificationDirectoryAdd from './certificationDirectoryAdd'
|
||||
|
||||
export default {
|
||||
name: 'certificationDirectory',
|
||||
components: {
|
||||
certificationDirectoryAdd
|
||||
},
|
||||
props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
@@ -78,31 +79,31 @@
|
||||
},
|
||||
{
|
||||
title: this.$t('batch'),
|
||||
dataIndex: 'batch',
|
||||
dataIndex: 'lot',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('catalogFile'),
|
||||
dataIndex: 'catalogFile',
|
||||
dataIndex: 'directoryFile',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('testScheme'),
|
||||
dataIndex: 'testScheme',
|
||||
dataIndex: 'experimentFile',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('testReportLocation'),
|
||||
dataIndex: 'testReportLocation',
|
||||
dataIndex: 'detectionReportLocation',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('explain'),
|
||||
dataIndex: 'explain',
|
||||
dataIndex: 'explainInfo',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
@@ -124,7 +125,11 @@
|
||||
loading: false,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
total: 0,
|
||||
url: {
|
||||
page: '/project/projectCertificationDirectoryEO/page',
|
||||
delete: '/project/projectCertificationDirectoryEO/delete'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -162,7 +167,7 @@
|
||||
...this.queryParam
|
||||
}
|
||||
this.loading = true
|
||||
postAction(this.url.addModelList, query).then((res) => {
|
||||
getAction(this.url.page, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records || []
|
||||
this.total = res.result.total
|
||||
@@ -178,21 +183,39 @@
|
||||
handleSubmit() {
|
||||
this.visible = false
|
||||
},
|
||||
edit() {
|
||||
|
||||
edit(val) {
|
||||
this.$refs.certificationDirectoryAddRef.edit(JSON.parse(JSON.stringify(val)))
|
||||
},
|
||||
deleteData(){
|
||||
|
||||
deleteData(val) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
deleteAction(_this.url.delete, { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.replacePage()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
addData(){
|
||||
this.$refs.certificationDirectoryAddRef.add()
|
||||
addData() {
|
||||
this.$refs.certificationDirectoryAddRef.add()
|
||||
},
|
||||
certificationDirectoryList() {
|
||||
this.pageNo = 1
|
||||
this.replacePage()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
@@ -202,7 +225,7 @@
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index:100;
|
||||
z-index: 100;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
@@ -243,11 +266,13 @@
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
.table-operator{
|
||||
|
||||
.table-operator {
|
||||
text-align: right;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.text{
|
||||
|
||||
.text {
|
||||
margin-right: 8px;
|
||||
}
|
||||
</style>
|
||||
@@ -33,7 +33,7 @@
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.batch"
|
||||
v-model="formInline.lot"
|
||||
:placeholder="$t('PleaseEnter')+$t('batch')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -48,9 +48,9 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('catalogFile')">
|
||||
{{ (formInline.catalogFile === 'null' || formInline.catalogFile === ''||
|
||||
formInline.catalogFile == null) ? $t('clickUpload') : $t('viewUploadedFiles') }}
|
||||
@click="clickButtonToUpload('directoryFile')">
|
||||
{{ (formInline.directoryFile === 'null' || formInline.directoryFile === ''||
|
||||
formInline.directoryFile == null) ? $t('clickUpload') : $t('viewUploadedFiles') }}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -63,9 +63,9 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('testScheme')">
|
||||
{{ (formInline.testScheme === 'null' || formInline.testScheme === ''||
|
||||
formInline.testScheme == null) ? $t('clickUpload') : $t('viewUploadedFiles') }}
|
||||
@click="clickButtonToUpload('experimentFile')">
|
||||
{{ (formInline.experimentFile === 'null' || formInline.experimentFile === ''||
|
||||
formInline.experimentFile == null) ? $t('clickUpload') : $t('viewUploadedFiles') }}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -80,7 +80,7 @@
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.testReportLocation"
|
||||
v-model="formInline.detectionReportLocation"
|
||||
:placeholder="$t('PleaseEnter')+$t('testReportLocation')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -97,7 +97,7 @@
|
||||
<a-textarea
|
||||
style="width: 100%"
|
||||
:placeholder="$t('PleaseEnter')+$t('explain')"
|
||||
v-model="formInline.explain" :rows="4"/>
|
||||
v-model="formInline.explainInfo" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -115,7 +115,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { getAction, postAction, putAction } from '@/api/manage'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
|
||||
export default {
|
||||
@@ -128,28 +128,57 @@
|
||||
visible: false,
|
||||
formInline: {},
|
||||
confirmLoading: false,
|
||||
disabled: false
|
||||
disabled: false,
|
||||
url: {
|
||||
add: '/project/projectCertificationDirectoryEO/add',
|
||||
edit: '/project/projectCertificationDirectoryEO/edit'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
add(){
|
||||
this.visible = true
|
||||
this.formInline = {}
|
||||
},
|
||||
edit(val){
|
||||
add() {
|
||||
this.visible = true
|
||||
this.$nextTick(()=>{
|
||||
this.formInline = {}
|
||||
},
|
||||
edit(val) {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.formInline = val
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
|
||||
if (!this.formInline.directoryName && !this.formInline.lot && !this.formInline.directoryFile &&
|
||||
!this.formInline.experimentFile && !this.detectionReportLocation.lot && !this.formInline.explainInfo) {
|
||||
this.$message.warning(this.$t('dataCannotEmpty'))
|
||||
} else {
|
||||
let Action
|
||||
let url = ''
|
||||
if (this.formInline.id) {
|
||||
url = this.url.edit
|
||||
Action = putAction
|
||||
} else {
|
||||
url = this.url.add
|
||||
Action = postAction
|
||||
}
|
||||
this.confirmLoading = true
|
||||
Action(url, this.formInline).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('certificationDirectoryList')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
@@ -235,4 +264,12 @@
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.button-text {
|
||||
height: 38px;
|
||||
width: calc(100% - 100px);
|
||||
line-height: 38px;
|
||||
background: #fff;
|
||||
border: 1px #00B3BE solid;
|
||||
color: #00B3BE;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user