Compare commits

..

No commits in common. "0c0679cb1ed30a8f12a8c9f62d12c9dee9ee4cb7" and "c9d77e20a04ed9be8e6a6efe312cbbc5b16744ea" have entirely different histories.

View File

@ -63,7 +63,7 @@
</template> </template>
<script> <script>
import { add, update, getInfo, listBom, getCode } from '@/api/art-manage/art.js' import { add, update, getInfo, listSubstrate, listBom, getCode } from '@/api/art-manage/art.js'
import SubmitBar from '@/views/art/components/submit-bar' import SubmitBar from '@/views/art/components/submit-bar'
export default { export default {
@ -91,6 +91,7 @@ export default {
substrateId: '', substrateId: '',
bomId: '' bomId: ''
}, },
substrateList: [],
bomList: [], bomList: [],
rules: { rules: {
name: [ name: [
@ -128,6 +129,10 @@ export default {
}, },
methods: { methods: {
init: async function() { init: async function() {
if (this.substrateList.length === 0) {
const substrateRes = await listSubstrate()
this.substrateList = substrateRes.data
}
if (this.bomList.length === 0) { if (this.bomList.length === 0) {
const bomRes = await listBom() const bomRes = await listBom()
this.bomList = bomRes.data this.bomList = bomRes.data