前端问题修改
This commit is contained in:
parent
bd3fad2270
commit
a83d4c0170
|
|
@ -591,19 +591,24 @@ export default {
|
|||
handleSave() {
|
||||
console.log(this.chosenUserId, 'chosenUserId')
|
||||
console.log(this.ids, 'ids')
|
||||
let param = {
|
||||
userId: this.chosenUserId,
|
||||
unitId: this.ids[0]
|
||||
}
|
||||
unitPersonAll(param).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getList();
|
||||
if(this.chosenUserId){
|
||||
let param = {
|
||||
userId: this.chosenUserId,
|
||||
unitId: this.ids[0]
|
||||
}
|
||||
});
|
||||
unitPersonAll(param).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
this.$modal.msgError("请先选择配置人员!");
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/** 修改按钮操作 */
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ export default {
|
|||
codeId: true,
|
||||
isShowQrCode: -1,
|
||||
labelmaCode: '',
|
||||
qrUrl:'http://112.29.103.165:21626/qrCode/qrCodePage?qrCode=',
|
||||
qrUrl:'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode=',
|
||||
json_fields:{"二维码地址":'exportUrl',"标签编号":'labelCode',"设备编码":'maCode'},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="关键字" prop="labelType">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.labelType"
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable maxlength="50"
|
||||
style="width: 240px"
|
||||
|
|
@ -70,58 +70,6 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- >新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- @click="handleDelete"-->
|
||||
<!-- v-hasPermi="['system:dict:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="warning"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-download"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleExport"-->
|
||||
<!-- >导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-refresh"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleRefreshCache"-->
|
||||
<!-- >刷新缓存</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="historyList"
|
||||
|
|
@ -176,36 +124,6 @@
|
|||
/> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="标签编号" align="center" :show-overflow-tooltip="true">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <router-link :to="'/system/dict-data/index/' + scope.row.labelId" class="link-type">-->
|
||||
<!-- <span>{{ scope.row.dictType }}</span>-->
|
||||
<!-- </router-link>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="状态" align="center" prop="status">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
|
@ -231,38 +149,6 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="字典名称" prop="labelType">
|
||||
<el-input v-model="form.labelType" placeholder="请输入字典名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="字典类型" prop="dictType">
|
||||
<el-input v-model="form.dictType" placeholder="请输入字典类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -320,7 +206,7 @@ export default {
|
|||
rowObj: {},
|
||||
labelmaCode: '',
|
||||
uploadOpen: false,
|
||||
qrUrl:'http://112.29.103.165:21626/qrCode/qrCodePage?qrCode=',
|
||||
qrUrl:'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode=',
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -349,22 +235,6 @@ export default {
|
|||
}
|
||||
);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
labelId: undefined,
|
||||
labelType: undefined,
|
||||
dictType: undefined,
|
||||
status: "0",
|
||||
remark: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
|
@ -376,48 +246,14 @@ export default {
|
|||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加字典类型";
|
||||
},
|
||||
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.labelId)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const labelId = row.labelId || this.ids
|
||||
getType(labelId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改字典类型";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.labelId != undefined) {
|
||||
updateType(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addType(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//二维码查看
|
||||
labelUploadCode(row) {
|
||||
// if (row.maCode == null) {
|
||||
|
|
@ -444,29 +280,13 @@ export default {
|
|||
// });
|
||||
}, 500)
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const labelIds = row.labelId || this.ids;
|
||||
this.$modal.confirm('是否确认删除字典编号为"' + labelIds + '"的数据项?').then(function () {
|
||||
return delType(labelIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('system/dict/type/export', {
|
||||
// ...this.queryParams
|
||||
// }, `type_${new Date().getTime()}.xlsx`)
|
||||
this.download('base/maLabelBind/export', {
|
||||
...this.queryParams
|
||||
}, `二维码绑定历史_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/** 刷新缓存按钮操作 */
|
||||
handleRefreshCache() {
|
||||
refreshCache().then(() => {
|
||||
this.$modal.msgSuccess("刷新成功");
|
||||
this.$store.dispatch('dict/cleanDict');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -317,8 +317,8 @@ export default {
|
|||
disabledDate(time) {
|
||||
if (that.maForm.purchaseTime) {
|
||||
return (
|
||||
time.getTime() < Date.now() ||
|
||||
time.getTime() < new Date(that.maForm.purchaseTime).getTime()
|
||||
time.getTime() < Date.now()-8.64e7 ||
|
||||
time.getTime() < new Date(that.maForm.purchaseTime).getTime()-8.64e7
|
||||
);
|
||||
}
|
||||
return time.getTime() < Date.now(); //实现1效果
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ export default {
|
|||
title: "",
|
||||
uploadOpen: false,
|
||||
qrCode: '',
|
||||
qrUrl:'http://112.29.103.165:21626/qrCode/qrCodePage?qrCode=',
|
||||
qrUrl:'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode=',
|
||||
rowObj:{},
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue