|
@@ -65,11 +65,13 @@
|
|
|
<a-button type="danger" size="small" @click='addList'>新增</a-button>
|
|
|
<a-button size="small" @click='editList'>修改</a-button>
|
|
|
<a-button size="small" @click="delectList">删除</a-button>
|
|
|
+
|
|
|
<a-button size="small" @click="detailList">详情</a-button>
|
|
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" @change="handleUploadChange" :action="fileUpload">
|
|
|
<a-button size="small">导入</a-button>
|
|
|
</a-upload>
|
|
|
<a-button size="small" @click="exportList('编码器列表')">导出</a-button>
|
|
|
+ <a-button size="small" @click="syncList">同步至u9</a-button>
|
|
|
</div>
|
|
|
|
|
|
<!-- table区域-begin -->
|
|
@@ -82,12 +84,12 @@
|
|
|
:columns="columns"
|
|
|
:dataSource="dataSource"
|
|
|
:pagination="ipagination"
|
|
|
- :scroll="{ x: 1500, y: 300 }"
|
|
|
+
|
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
|
@change="handleTableChange"
|
|
|
:customRow ="clickRow"
|
|
|
>
|
|
|
-
|
|
|
+ <!-- :scroll="{ x: 1500, y: 300 }" -->
|
|
|
</a-table>
|
|
|
</div>
|
|
|
<AddEncoder ref="AddEncoder" @ok="getTableList"></AddEncoder>
|
|
@@ -191,6 +193,19 @@
|
|
|
ellipsis: true,
|
|
|
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '料品属性',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'attribute',
|
|
|
+ ellipsis: true,
|
|
|
+
|
|
|
+ }, {
|
|
|
+ title: '是否同步',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'sync',
|
|
|
+ ellipsis: true,
|
|
|
+
|
|
|
+ },
|
|
|
],
|
|
|
url: {
|
|
|
list: "/encoder/encoder/list",
|
|
@@ -291,6 +306,31 @@
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ //同步
|
|
|
+ syncList(){
|
|
|
+ if(this.selectedRowKeys.length==0){
|
|
|
+ this.$message.warning('请勾选数据!')
|
|
|
+ }else{
|
|
|
+ this.$confirm({
|
|
|
+ title: '确认同步',
|
|
|
+ content: '是否同步选中数据?',
|
|
|
+ onOk: ()=> {
|
|
|
+ var ids = this.selectedRowKeys.toString()
|
|
|
+ var that = this
|
|
|
+ alertModal.loading("执行中,请稍后!")
|
|
|
+ deleteAction('/encoder/encoder/syncBatch', {ids: ids}).then((res) => {
|
|
|
+ alertModal.closeLoading();
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('同步成功!');
|
|
|
+ this.getTableList()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
//删除
|
|
|
delectList(){
|
|
|
if(this.selectedRowKeys.length==0){
|
|
@@ -359,7 +399,8 @@
|
|
|
return {
|
|
|
on: {
|
|
|
dblclick: () => {
|
|
|
-
|
|
|
+ this.$refs.EncoderDetail.visible=true
|
|
|
+ this.$refs.EncoderDetail.getEditData(this.selectedRowKeys[0])
|
|
|
},
|
|
|
}
|
|
|
}
|