|
|
@@ -4,10 +4,11 @@
|
|
|
:loading="loading">
|
|
|
<filterCustomTable @search="search">
|
|
|
<a-button class="operBtn"
|
|
|
- v-if="hasPermission('spot_contract_btn_add')"
|
|
|
- @click="addAction">新增</a-button>
|
|
|
+ v-for="item in commonBtn"
|
|
|
+ :key="item.lable"
|
|
|
+ @click="item.callback">{{item.lable}}</a-button>
|
|
|
</filterCustomTable>
|
|
|
- <contextMenu :contextMenuList="contextMenuList"
|
|
|
+ <contextMenu :contextMenuList="forDataBtn"
|
|
|
:tableList="spotContractList">
|
|
|
<a-table :columns="columns"
|
|
|
class="topTable"
|
|
|
@@ -33,20 +34,18 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, onUnmounted, ref, watchEffect } from 'vue';
|
|
|
+import { defineComponent, onUnmounted, ref } from 'vue';
|
|
|
import { initData } from '@/common/methods';
|
|
|
import filterCustomTable from '@/views/information/spot-contract/components/filterTable/index.vue';
|
|
|
import { getCustomList } from '../setup';
|
|
|
-import { openModal } from '@/common/setup/modal/index';
|
|
|
import contextMenu from '@/common/components/contextMenu/index.vue';
|
|
|
import { MenuItem } from '@/common/components/contextMenu/interface';
|
|
|
import AddSpotContract from '@/views/information/spot-contract/components/add/index.vue';
|
|
|
-import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
|
|
|
import SpotContractDeatil from '@/views/information/spot-contract/components/detail/index.vue';
|
|
|
import ModifySpotContract from '@/views/information/spot-contract/components/modify/index.vue';
|
|
|
import DeleteSpotContract from '@/views/information/spot-contract/components/delete/index.vue';
|
|
|
import ResubmitSpotContract from '@/views/information/spot-contract/components/resubmit/index.vue';
|
|
|
-
|
|
|
+import { getBtnList } from '@/common/setup/contextMenu/index';
|
|
|
export default defineComponent({
|
|
|
name: 'spot-contract-not-commit',
|
|
|
components: {
|
|
|
@@ -61,18 +60,8 @@ export default defineComponent({
|
|
|
setup() {
|
|
|
const contextMenuList = ref<MenuItem[]>([]);
|
|
|
const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
|
|
|
- const { hasPermission } = handlePermission('spot_contract_unsubmitted');
|
|
|
- const { openAction: addAction } = openModal('spot_contract_btn_add');
|
|
|
+ const { commonBtn, forDataBtn } = getBtnList('spot_contract_unsubmitted');
|
|
|
|
|
|
- detailButton('detail', contextMenuList);
|
|
|
- // const { action: modifyAction } = permissionButton('modifySpotContract', '修改', contextMenuList);
|
|
|
- // const { action: deleteAction } = permissionButton('deleteSpotContract', '删除', contextMenuList);
|
|
|
- // const { action: resubmitAction } = permissionButton('resubmitSpotContract', '重新提交', contextMenuList);
|
|
|
- // const stop = watchEffect(() => {
|
|
|
- // hasPermission('spot_contract_btn_modify') && modifyAction();
|
|
|
- // hasPermission('spot_contract_btn_delete') && deleteAction();
|
|
|
- // hasPermission('spot_contract_btn_resubmit') && resubmitAction();
|
|
|
- // });
|
|
|
onUnmounted(() => {
|
|
|
stop();
|
|
|
});
|
|
|
@@ -80,7 +69,7 @@ export default defineComponent({
|
|
|
actionQuery(1);
|
|
|
getColumns();
|
|
|
});
|
|
|
- return { spotContractList, columns, search, contextMenuList, addAction, loading, hasPermission };
|
|
|
+ return { spotContractList, columns, search, contextMenuList, commonBtn, forDataBtn, loading };
|
|
|
},
|
|
|
});
|
|
|
</script>
|