| | |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const selectedProjectNoa = ref(null); |
| | | const userName = ref(''); |
| | | const password = ref(''); |
| | | const configName = ref(''); |
| | | const configNamesearch = ref(''); |
| | | const configCode = ref(''); |
| | | const configCodesearch = ref(''); |
| | | const tableData = ref([]) |
| | | const currentPage2 = ref(1) |
| | | const totalRecords = ref(0) |
| | | const configValue = ref('') |
| | | const isEnable = ref('') |
| | | const configValuesearch = ref('') |
| | | const isEnablesearch = ref('') |
| | | const listByUserName = async () => { |
| | | try { |
| | | const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{ |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | pageSize: 10, |
| | | configName: "", |
| | | configCode: "", |
| | | configValue: "", |
| | | isEnable: 0 |
| | | isEnable: -1 |
| | | }); |
| | | if (response.code === 200) { |
| | | const formattedData = response.data.records.map(record => ({ |
| | |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | tableData.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | tableData.value = formattedData; |
| | | totalRecords.value = response.data.pages*10 |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | |
| | | onMounted(() => { |
| | | listByUserName(''); |
| | | }); |
| | | const handleClick = async () => { |
| | | try { |
| | | const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{ |
| | | pageNo: 1, |
| | | pageSize: 10, |
| | | configName: configNamesearch.value, |
| | | configCode: configCodesearch.value, |
| | | configValue: configValuesearch.value, |
| | | isEnable: isEnablesearch.value !== '' ? isEnablesearch.value : -1, |
| | | |
| | | }); |
| | | if (response.code === 200) { |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | tableData.value = formattedData; |
| | | totalRecords.value = response.data.pages*10 |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | | } catch (error) { |
| | | } |
| | | }; |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | window.localStorage.setItem('pagenumber', currentPage2.value) |
| | |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{ |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | pageSize: 10, |
| | | configName: "", |
| | | configCode: "", |
| | | configValue: "", |
| | | isEnable: 0 |
| | | isEnable: -1 |
| | | }); |
| | | if (response.code === 200) { |
| | | const formattedData = response.data.records.map(record => ({ |
| | |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | tableData.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | tableData.value = formattedData; |
| | | totalRecords.value = response.data.pages*10 |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | |
| | | adda.value = true; |
| | | configValue.value = row.configValue |
| | | isEnable.value = row.isEnable |
| | | configName.value = row.configName |
| | | window.localStorage.setItem('id', row.id) |
| | | window.localStorage.setItem('configName', row.configName) |
| | | window.localStorage.setItem('configCode', row.configCode) |
| | |
| | | label: t('sorter.start'), |
| | | } |
| | | ] |
| | | // function closeDialoga(row) { |
| | | // adda.value = false; |
| | | // userName.value = ''; |
| | | // nickName.value = ''; |
| | | // password.value = ''; |
| | | // } |
| | | // 编辑 |
| | | const getTableRowa = async () => { |
| | | let configName = window.localStorage.getItem('configName') |
| | | let configCode = window.localStorage.getItem('configCode') |
| | | let id = window.localStorage.getItem('id') |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | try { |
| | | const response = await request.post('/loadGlass/sys/sysConfig/updateConfig',{ |
| | | id: id, |
| | |
| | | <template> |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" > |
| | | <div style="display: flex;width: 1770px;"> |
| | | <el-input v-model="configNamesearch" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('productStock.configName')" /> |
| | | <el-input v-model="configCodesearch" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputa" :placeholder="$t('productStock.configCode')" /> |
| | | <el-input v-model="configValuesearch" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputb" :placeholder="$t('productStock.configValue')" /> |
| | | <el-select v-model="isEnablesearch" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('sorter.startstatus')"> |
| | | <el-option :label="$t('sorter.start')" value="1"></el-option> |
| | | <el-option :label="$t('sorter.disable')" value="0"></el-option> |
| | | </el-select> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="400" ref="table" :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }" |
| | | <el-table height="700" ref="table" :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }" |
| | | :data="tableData"> |
| | | <el-table-column prop="configName" align="center" :label="$t('productStock.configName')"/> |
| | | <el-table-column prop="configCode" align="center" :label="$t('productStock.configCode')"/> |
| | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <el-dialog v-model="adda" top="23vh" width="37%" :title="$t('productStock.reusername')" > |
| | | <el-dialog v-model="adda" top="23vh" width="37%" > |
| | | <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form ref="formRef" label-width="150px"> |
| | | <el-form label-width="100px" label-position="right"> |
| | | <el-form label-width="120px" label-position="right"> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('productStock.configNamea')" :required="true" style="width: 25vw"> |
| | | <el-input :placeholder="$t('productStock.configName')" disabled v-model="configName" autocomplete="off" style="width: 350px;"/> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px;margin-bottom: -2px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | |
| | | <el-button type="primary" @click="getTableRowa"> |
| | | {{ $t('productStock.sure') }} |
| | | </el-button> |
| | | <el-button @click="closeDialoga">{{ $t('productStock.cancel') }}</el-button> |
| | | <el-button @click="adda = false">{{ $t('productStock.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | <style scoped> |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 150px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | | text-align: center; |