update
This commit is contained in:
parent
c60ee7cd58
commit
5ebb90dc07
|
@ -75,7 +75,7 @@
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
max-height="260"
|
max-height="300"
|
||||||
ref="filterTable"
|
ref="filterTable"
|
||||||
@filter-change="filterChange"
|
@filter-change="filterChange"
|
||||||
>
|
>
|
||||||
|
@ -106,10 +106,7 @@
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">{{ scope.row.sszx }}</template>
|
<template slot-scope="scope">{{ scope.row.sszx }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="header-center" label="限制范围">
|
<!-- <el-table-column align="center" label="操作">
|
||||||
<template slot-scope="scope">{{ scope.row.xzfw}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="操作">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="!checkPermission(['cma_update'])"
|
:disabled="!checkPermission(['cma_update'])"
|
||||||
|
@ -126,7 +123,7 @@
|
||||||
@click="handleDelete(scope)"
|
@click="handleDelete(scope)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
@ -145,7 +142,7 @@
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
max-height="260"
|
max-height="300"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
@ -161,11 +158,14 @@
|
||||||
<el-table-column align="header-center" label="标准编号">
|
<el-table-column align="header-center" label="标准编号">
|
||||||
<template slot-scope="scope">{{ scope.row.bzbh }}</template>
|
<template slot-scope="scope">{{ scope.row.bzbh }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="header-center" label="标准条款">
|
||||||
|
<template slot-scope="scope">{{ scope.row.bztk }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="header-center" label="所属中心"
|
<el-table-column align="header-center" label="所属中心"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">{{ scope.row.sszx }}</template>
|
<template slot-scope="scope">{{ scope.row.sszx }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作">
|
<!-- <el-table-column align="center" label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="!checkPermission(['cnas_update'])"
|
:disabled="!checkPermission(['cnas_update'])"
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
@click="handleDelete(scope)"
|
@click="handleDelete(scope)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 3.0.7 on 2020-06-15 01:18
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('ability', '0005_cnas'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='cnas',
|
||||||
|
name='bztk',
|
||||||
|
field=models.CharField(blank=True, max_length=400, null=True, verbose_name='标准条款'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -26,4 +26,5 @@ class CNAS(BaseModel):
|
||||||
xmmc = models.CharField('项目名称', max_length=200,null=True,blank=True)
|
xmmc = models.CharField('项目名称', max_length=200,null=True,blank=True)
|
||||||
bzmc = models.CharField('标准名称', max_length=400,null=True,blank=True)
|
bzmc = models.CharField('标准名称', max_length=400,null=True,blank=True)
|
||||||
bzbh = models.CharField('标准编号', max_length=400,null=True,blank=True)
|
bzbh = models.CharField('标准编号', max_length=400,null=True,blank=True)
|
||||||
|
bztk = models.CharField('标准条款', max_length=400,null=True,blank=True)
|
||||||
sszx = models.TextField('所属中心',null=True,blank=True)
|
sszx = models.TextField('所属中心',null=True,blank=True)
|
|
@ -68,7 +68,7 @@ class CNASViewSet(ModelViewSet):
|
||||||
'put': 'cnas_update', 'delete': 'cnas_delete'}
|
'put': 'cnas_update', 'delete': 'cnas_delete'}
|
||||||
queryset = CNAS.objects.all()
|
queryset = CNAS.objects.all()
|
||||||
serializer_class = CNASSerializer
|
serializer_class = CNASSerializer
|
||||||
search_fields = ['bzbh', 'bzmc', 'sszx', 'xmmc']
|
search_fields = ['bzbh', 'bzmc', 'sszx', 'xmmc', 'bztk']
|
||||||
ordering_fields = ['bzmc']
|
ordering_fields = ['bzmc']
|
||||||
ordering = 'bzmc'
|
ordering = 'bzmc'
|
||||||
|
|
||||||
|
@ -131,6 +131,7 @@ def import_cnas(filename, path):
|
||||||
data['xmmc'] = sheet['g'+str(i)].value
|
data['xmmc'] = sheet['g'+str(i)].value
|
||||||
data['bzmc'] = sheet['l'+str(i)].value
|
data['bzmc'] = sheet['l'+str(i)].value
|
||||||
data['bzbh'] = sheet['n'+str(i)].value
|
data['bzbh'] = sheet['n'+str(i)].value
|
||||||
|
data['bztk'] = sheet['q'+str(i)].value
|
||||||
data['sszx'] = sszx
|
data['sszx'] = sszx
|
||||||
print(data)
|
print(data)
|
||||||
datalist.append(CNAS(**data))
|
datalist.append(CNAS(**data))
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue